Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
817eff04
Commit
817eff04
authored
Oct 14, 2022
by
dqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安高告知页面增加,提交
parent
217929e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
52 deletions
+86
-52
InstallNoticeMapper.java
.../amos/boot/module/ugp/api/mapper/InstallNoticeMapper.java
+8
-0
ProjectMapper.java
...eejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
+5
-0
InstallNoticeMapper.xml
...ugp-api/src/main/resources/mapper/InstallNoticeMapper.xml
+15
-22
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+7
-0
InstallNoticeController.java
...ot/module/ugp/biz/controller/InstallNoticeController.java
+51
-30
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/InstallNoticeMapper.java
View file @
817eff04
...
...
@@ -30,7 +30,15 @@ public interface InstallNoticeMapper extends BaseMapper<InstallNotice> {
//安装告知申请页面分页列表
Page
<
InstallNoticePageDto
>
installNoticePage
(
IPage
<
InstallNoticePageDto
>
page
,
@RequestParam
String
name
,
@RequestParam
String
constructionUnit
);
//根据project_id提交改变申请状态
void
submit
(
Long
sequenceNbr
);
//根据project_id查询一条数据
InstallNoticeDto
selectOneByPid
(
Long
sequenceNbr
);
//根据sequenceNbr查询告知申请详情
InstallNoticeDto
selectoneById
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
View file @
817eff04
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
* 项目信息表 Mapper 接口
...
...
@@ -13,4 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
ProjectMapper
extends
BaseMapper
<
Project
>
{
//通过name查询一条数据
ProjectDto
selectOneByName
(
@RequestParam
String
name
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/InstallNoticeMapper.xml
View file @
817eff04
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper"
>
<!-- 查询安装告知申请列表-->
<select
id=
"installNoticeList"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto"
>
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_project.name LIKE '%'|| #{name} || '%' AND construction_unit LIKE '%'|| #{constructionUnit} || '%'
</select>
<!-- 安装告知申请列表按name,unit筛选-->
<select
id=
"selectByName"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto"
>
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_project.name = #{name} and construction_unit = #{unit}
and tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- 通过id查询页面数据-->
<select
id=
"selectById"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto"
>
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
...
...
@@ -28,13 +9,11 @@
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
AND tz_ugp_project.sequence_nbr=#{sequenceNbr}
</select>
<!-- 查询安装告知申请页面-->
<select
id=
"installNoticePage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto"
>
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,charge_person,installation_unit,install_pri,supervise_dept_id
SELECT tz_ugp_install_notice.sequence_nbr,tz_ugp_project.name,install_region,start_date,construction_unit,charge_person,installation_unit,install_pri,supervise_dept_id
,charge_person_id,inspection_unit_id,notice_status,notice_date
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_verify
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr
...
...
@@ -44,6 +23,20 @@
</select>
<!-- //根据project_id提交改变申请状态-->
<update
id=
"submit"
>
update tz_ugp_install_notice
set notice_status='已提交'
where project_id=#{sequenceNbr}
</update>
<!-- //根据project_id查询一条数据-->
<select
id=
"selectOneByPid"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto"
>
SELECT*
FROM tz_ugp_install_notice
WHERE project_id=#{sequenceNbr};
</select>
<!-- selectoneById-->
<select
id=
"selectoneById"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto"
>
SELECT*
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
817eff04
...
...
@@ -2,4 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper"
>
<!-- //通过name查询一条数据-->
<select
id=
"selectOneByName"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto"
>
select *
from tz_ugp_project
where name = #{name}
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InstallNoticeController.java
View file @
817eff04
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.NoticeStatusEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl
;
import
org.apache.poi.ss.formula.functions.T
;
...
...
@@ -43,6 +50,12 @@ public class InstallNoticeController extends BaseController {
InstallNoticeServiceImpl
installNoticeServiceImpl
;
@Autowired
InstallNoticeMapper
installNoticeMapper
;
@Autowired
ProjectMapper
projectMapper
;
@Autowired
ProjectInitiationServiceImpl
projectInitiationServiceImpl
;
@Autowired
...
...
@@ -62,17 +75,15 @@ public class InstallNoticeController extends BaseController {
}
/**
* 根据sequenceNbr更新
提交申请
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新
提交申请"
,
notes
=
"根据sequenceNbr更新提交申请
"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新
"
,
notes
=
"根据sequenceNbr更新
"
)
public
ResponseModel
<
InstallNoticeDto
>
updateBySequenceNbrInstallNotice
(
@RequestBody
InstallNoticeDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setNoticeStatus
(
"已提交"
);
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
updateWithModel
(
model
));
}
...
...
@@ -159,16 +170,6 @@ public class InstallNoticeController extends BaseController {
}
/**
* 根据项目名称和建设单位查询安装告知申请列表
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/installApplyListByNameUnit"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"安装告知申请表筛选"
,
notes
=
"安装告知申请表筛选"
)
public
ResponseModel
<
List
<
InstallNoticePageDto
>>
queryForPageByName
(
@RequestParam
(
value
=
"name"
)
String
name
,
@RequestParam
(
value
=
"unit"
)
String
unit
)
{
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
selectByName
(
name
,
unit
));
}
/**
* 根据主键sequenceNbr查询安装告知申请详情
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
@@ -177,34 +178,54 @@ public class InstallNoticeController extends BaseController {
public
ResponseModel
<
InstallNoticeDto
>
installNoticeinfoById
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
selectOneById
(
sequenceNbr
));
}
/**
*
根据sequenceNbr更新
*
提交申请
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
"/change/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
InstallNoticeDto
>
updateInstallNotice
(
@RequestBody
InstallNoticeDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
updateWithModel
(
model
));
@PutMapping
(
value
=
"/submit/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"put"
,
value
=
"根据sequenceNbr更新提交申请"
,
notes
=
"根据sequenceNbr更新提交申请"
)
public
ResponseModel
<
InstallNoticeDto
>
InstallNoticeSubmit
(
@RequestBody
InstallNoticeDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
if
(
model
.
getNoticeStatus
().
isEmpty
()){
model
.
setNoticeStatus
(
"已提交"
);
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
updateWithModel
(
model
));
}
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
*
提交申请
*
新增安装告知申请,保存/提交
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"根据sequenceNbr更新提交申请"
,
notes
=
"根据sequenceNbr更新提交申请"
)
public
ResponseModel
<
InstallNoticeDto
>
InstallNotice
(
@RequestBody
InstallNoticeDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setProjectId
(
sequenceNbr
);
model
.
setNoticeStatus
(
"已提交"
);
model
=
installNoticeServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/saveInstallNotice"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"新增安装告知申请"
,
notes
=
"新增安装告知申请"
)
public
ResponseModel
<
InstallNoticeDto
>
saveInstallNotice
(
@RequestBody
JSONObject
object
,
@RequestParam
(
required
=
false
)
String
noticeStatus
)
{
InstallNoticeDto
installNoticeDto
=
new
InstallNoticeDto
();
final
ProjectDto
projectDto
=
projectMapper
.
selectOneByName
((
String
)
object
.
get
(
"name"
));
installNoticeDto
.
setProjectId
(
projectDto
.
getSequenceNbr
());
installNoticeDto
.
setNoticeStatus
(
noticeStatus
);
final
JSONArray
subForm
=
object
.
getJSONArray
(
"subForm"
);
installNoticeDto
.
setLicenseNum
(
object
.
getString
(
"licenseNum"
));
installNoticeDto
.
setLicenseCompany
(
object
.
getString
(
"licenseCompany"
));
for
(
Object
o:
subForm
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
final
JSONArray
licenseAttch
=
jsonObject
.
getJSONArray
(
"licenseAttch"
);
final
JSONArray
contractAttch
=
jsonObject
.
getJSONArray
(
"contractAttch"
);
installNoticeDto
.
setLicenseAttch
(
JSON
.
toJSONString
(
licenseAttch
));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
break
;
}
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
createWithModel
(
installNoticeDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment