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
63b14cae
Commit
63b14cae
authored
Apr 15, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):改造告知列表字段调整,搜索条件调整,列表日期字段支持排序
parent
fa12a7d4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
52 deletions
+126
-52
JgReformNoticeDto.java
...eejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
+24
-0
JgReformNoticeMapper.java
.../amos/boot/module/jg/api/mapper/JgReformNoticeMapper.java
+4
-1
IJgReformNoticeService.java
...os/boot/module/jg/api/service/IJgReformNoticeService.java
+1
-1
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+1
-3
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+66
-12
JgReformNoticeController.java
...ot/module/jg/biz/controller/JgReformNoticeController.java
+3
-2
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+27
-33
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
View file @
63b14cae
...
@@ -208,12 +208,36 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -208,12 +208,36 @@ public class JgReformNoticeDto extends BaseDto {
private
String
supervisoryCode
;
private
String
supervisoryCode
;
/**
/**
* 设备代码
*/
@ApiModelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
/**
* 设备类型
* 设备类型
*/
*/
@ApiModelProperty
(
value
=
"设备类型"
)
@ApiModelProperty
(
value
=
"设备类型"
)
private
String
equList
;
private
String
equList
;
/**
/**
* 设备品种
*/
@ApiModelProperty
(
value
=
"设备品种"
)
private
String
equDefine
;
/**
* 告知书编号
*/
@ApiModelProperty
(
value
=
"告知书编号"
)
private
String
informNumber
;
/**
* 电梯96333码
*/
@ApiModelProperty
(
value
=
"电梯96333码"
)
private
String
code96333
;
/**
* 下一节点可执行人逗号分割
* 下一节点可执行人逗号分割
*/
*/
@ApiModelProperty
(
value
=
"下一节点可执行人逗号分割-数据隔离使用"
)
@ApiModelProperty
(
value
=
"下一节点可执行人逗号分割-数据隔离使用"
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgReformNoticeMapper.java
View file @
63b14cae
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -24,7 +25,9 @@ public interface JgReformNoticeMapper extends CustomBaseMapper<JgReformNotice> {
...
@@ -24,7 +25,9 @@ public interface JgReformNoticeMapper extends CustomBaseMapper<JgReformNotice> {
* @param type 类型:enterprise-企业端、supervision-监管端
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 改造告知列表
* @return 改造告知列表
*/
*/
Page
<
JgReformNotice
>
queryForPage
(
Page
<
JgReformNotice
>
page
,
@Param
(
"param"
)
JgReformNoticeDto
model
,
Page
<
Map
<
String
,
Object
>>
queryForPage
(
Page
<
JgReformNotice
>
page
,
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"param"
)
JgReformNoticeDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"currentUserId"
)
String
currentUserId
);
@Param
(
"currentUserId"
)
String
currentUserId
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgReformNoticeService.java
View file @
63b14cae
...
@@ -41,7 +41,7 @@ public interface IJgReformNoticeService extends IService<JgReformNotice> {
...
@@ -41,7 +41,7 @@ public interface IJgReformNoticeService extends IService<JgReformNotice> {
* @param type 类型:enterprise-企业端、supervision-监管端
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 改造告知列表
* @return 改造告知列表
*/
*/
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
);
Page
<
Map
<
String
,
Object
>>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
String
sort
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
);
/**
/**
* 批量删除
* 批量删除
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
63b14cae
...
@@ -68,12 +68,10 @@
...
@@ -68,12 +68,10 @@
isn.next_execute_user_ids AS nextExecuteUserIds,
isn.next_execute_user_ids AS nextExecuteUserIds,
isn.transfer_to_user_ids AS transferToUserIds,
isn.transfer_to_user_ids AS transferToUserIds,
isn.inform_number AS informNumber,
isn.inform_number AS informNumber,
isn.receive_company_org_code AS receiveCompanyOrgCode,
ri.EQU_CODE AS equCode,
ri.EQU_CODE AS equCode,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equListName,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equListName,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefineName,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefineName,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as fullAddress,
fullAddress,
ibjui."ADDRESS" as detailedAddress,
ibjui."ADDRESS" as detailedAddress,
ibjoi.SUPERVISORY_CODE as supervisoryCode,
ibjoi.SUPERVISORY_CODE as supervisoryCode,
ibjoi.CODE96333 as code96333
ibjoi.CODE96333 as code96333
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
63b14cae
...
@@ -2,11 +2,10 @@
...
@@ -2,11 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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.jg.api.mapper.JgReformNoticeMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper"
>
<select
id=
"queryForPage"
resultType=
"
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
"
>
<select
id=
"queryForPage"
resultType=
"
java.util.Map
"
>
select
select
isn.sequence_nbr AS sequenceNbr,
isn.sequence_nbr AS sequenceNbr,
isn.apply_no AS applyNo,
isn.apply_no AS applyNo,
isn.notice_date AS noticeDate,
isn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
isn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
isn.address AS address,
isn.address AS address,
...
@@ -16,28 +15,39 @@
...
@@ -16,28 +15,39 @@
isn.province,
isn.province,
isn.city,
isn.city,
isn.county,
isn.county,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.street_name AS streetName,
isn.street,
isn.street,
isn.instance_id AS instanceId,
isn.plan_date AS planDate,
isn.receive_company_code AS receiveCompanyCode,
isn.receive_org_name AS receiveOrgName,
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.promoter,
isn.notice_report_url,
isn.notice_report_url,
isn.accept_date,
isn.equ_list_code,
isn.equ_list_code,
isn.equ_category,
isn.equ_category,
isn.create_user_id,
isn.create_user_id,
isn.next_execute_user_ids,
isn.next_execute_user_ids,
(select oi.SUPERVISORY_CODE from idx_biz_jg_other_info oi WHERE ri.RECORD = oi.RECORD) AS supervisoryCode,
isn.instance_id AS instanceId,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.street_name AS streetName,
isn.receive_company_code AS receiveCompanyCode,
isn.receive_org_name AS receiveOrgName,
isn.next_execute_ids as nextExecuteIds,
isn.inform_number AS informNumber,
isn.equ_category AS equCategory,
isn.next_task_id as nextTaskId
isn.next_task_id as nextTaskId
ri.EQU_CODE AS equCode,
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.CODE96333 as code96333,
DATE_FORMAT(isn.plan_date,'%Y-%m-%d') AS planDate,
DATE_FORMAT(isn.notice_date,'%Y-%m-%d') AS noticeDate,
DATE_FORMAT(isn.accept_date,'%Y-%m-%d') AS acceptDate,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equList,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as fullAddress,
ibjui."ADDRESS" as detailedAddress
FROM
FROM
tzs_jg_reform_notice isn
tzs_jg_reform_notice isn
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.record = re.equ_id
LEFT JOIN idx_biz_jg_other_info oi ON oi.RECORD = re.equ_id
<where>
<where>
isn.is_delete = false
isn.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param != null "
>
...
@@ -59,6 +69,47 @@
...
@@ -59,6 +69,47 @@
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND isn.notice_status = #{param.noticeStatus}
AND isn.notice_status = #{param.noticeStatus}
</if>
</if>
<if
test=
"param.noticeDate != null "
>
AND isn.notice_date like concat('%',DATE_FORMAT(#{param.noticeDate},'%Y-%m-%d'),'%')
</if>
<if
test=
"param.equListCode != null and param.equListCode != ''"
>
AND ri."EQU_LIST" = #{param.equListCode}
</if>
<if
test=
"param.equCategory != null and param.equCategory != ''"
>
AND ri."equ_category" = #{param.equCategory}
</if>
<if
test=
"param.equDefine != null and param.equDefine != ''"
>
AND ri."EQU_DEFINE" = #{param.equDefine}
</if>
<if
test=
"param.equCode != null and param.equCode != ''"
>
AND ri."EQU_CODE" like concat('%',#{param.equCode},'%')
</if>
<if
test=
"param.informNumber != null and param.informNumber != ''"
>
AND isn.inform_number like concat('%',#{param.informNumber},'%')
</if>
<if
test=
"param.supervisoryCode != null and param.supervisoryCode != ''"
>
AND oi.SUPERVISORY_CODE like concat('%',#{param.supervisoryCode},'%')
</if>
<if
test=
"param.code96333 != null and param.code96333 != ''"
>
AND oi.CODE96333 like concat('%',#{param.code96333},'%')
</if>
<if
test=
"param.address != null and param.address != ''"
>
AND (
ibjui."PROVINCE_NAME" LIKE CONCAT('%', #{param.address}, '%')
OR ibjui."CITY_NAME" LIKE CONCAT('%', #{param.address}, '%')
OR ibjui."COUNTY_NAME" LIKE CONCAT('%', #{param.address}, '%')
OR ibjui."STREET_NAME" LIKE CONCAT('%', #{param.address}, '%')
)
</if>
<if
test=
"param.useUnitCreditCode != null and param.useUnitCreditCode != ''"
>
AND isn.use_unit_credit_code = #{param.useUnitCreditCode}
</if>
<if
test=
"param.installUnitCreditCode != null and param.installUnitCreditCode != ''"
>
AND isn.install_unit_credit_code = #{param.installUnitCreditCode}
</if>
<if
test=
"param.receiveCompanyCode != null and param.receiveCompanyCode != ''"
>
AND isn.receive_company_code = #{param.receiveCompanyCode}
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND (isn.notice_status in ('6612', '6613', '6614', '6616') )
AND (isn.notice_status in ('6612', '6613', '6614', '6616') )
...
@@ -70,6 +121,9 @@
...
@@ -70,6 +121,9 @@
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
<if
test=
"sort != null"
>
isn.${sort.field} ${sort.sortType},
</if>
isn.apply_no DESC
isn.apply_no DESC
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeController.java
View file @
63b14cae
...
@@ -122,15 +122,16 @@ public class JgReformNoticeController extends BaseController {
...
@@ -122,15 +122,16 @@ public class JgReformNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/page"
)
@PostMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知分页查询"
,
notes
=
"改造告知分页查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知分页查询"
,
notes
=
"改造告知分页查询"
)
public
ResponseModel
<
Page
<
JgReformNoticeDto
>>
queryForPage
(
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>
>>
queryForPage
(
@ApiParam
(
value
=
"当前页码"
,
required
=
true
)
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
@ApiParam
(
value
=
"当前页码"
,
required
=
true
)
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
@ApiParam
(
value
=
"每页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
int
size
,
@ApiParam
(
value
=
"每页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
int
size
,
@ApiParam
(
value
=
"排序字段"
,
required
=
false
)
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestBody
(
required
=
false
)
JgReformNoticeDto
model
@RequestBody
(
required
=
false
)
JgReformNoticeDto
model
)
{
)
{
Page
<
JgReformNotice
>
page
=
new
Page
<>(
current
,
size
);
Page
<
JgReformNotice
>
page
=
new
Page
<>(
current
,
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
type
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyLevel"
);
String
type
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyLevel"
);
return
ResponseHelper
.
buildResponse
(
jgReformNoticeService
.
queryForJgReformNoticePage
(
page
,
model
,
type
,
reginParams
));
return
ResponseHelper
.
buildResponse
(
jgReformNoticeService
.
queryForJgReformNoticePage
(
page
,
sort
,
model
,
type
,
reginParams
));
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
View file @
63b14cae
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgReformNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgReformNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
...
@@ -91,19 +92,16 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -91,19 +92,16 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@Autowired
private
JgReformNoticeMapper
jgReformNoticeMapper
;
private
JgReformNoticeMapper
jgReformNoticeMapper
;
@Autowired
@Autowired
private
CommonServiceImpl
commonService
;
private
CommonServiceImpl
commonService
;
@Autowired
@Autowired
private
CmWorkflowServiceImpl
cmWorkflowService
;
private
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@Autowired
private
RedissonClient
redissonClient
;
private
RedissonClient
redissonClient
;
/**
/**
...
@@ -116,7 +114,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -116,7 +114,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 改造告知信息
// 改造告知信息
JgReformNotice
notice
=
jgReformNoticeMapper
.
selectById
(
sequenceNbr
);
JgReformNotice
notice
=
jgReformNoticeMapper
.
selectById
(
sequenceNbr
);
Map
<
String
,
Object
>
reformNoticeMap
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
Map
<
String
,
Object
>
reformNoticeMap
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
reformNoticeMap
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
reformNoticeMap
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
reformNoticeMap
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
reformNoticeMap
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
reformNoticeMap
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
reformNoticeMap
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
...
@@ -127,11 +125,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -127,11 +125,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
reformNoticeMap
.
put
(
"street"
,
notice
.
getStreet
()
+
"_"
+
notice
.
getStreetName
());
reformNoticeMap
.
put
(
"street"
,
notice
.
getStreet
()
+
"_"
+
notice
.
getStreetName
());
}
}
reformNoticeMap
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
reformNoticeMap
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
if
(
Integer
.
parseInt
(
notice
.
getNoticeStatus
())
==
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
{
if
(
Integer
.
parseInt
(
notice
.
getNoticeStatus
())
==
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
{
// 完成时显示历史数据
// 完成时显示历史数据
JSONObject
hisData
=
commonService
.
queryHistoryData
(
notice
.
getSequenceNbr
());
JSONObject
hisData
=
commonService
.
queryHistoryData
(
notice
.
getSequenceNbr
());
// 兼容老数据
// 兼容老数据
if
(
hisData
==
null
)
{
if
(
hisData
==
null
)
{
// 老数据逻辑
// 老数据逻辑
Map
<
String
,
Object
>
equipMap
=
setEquipInfoNew
(
sequenceNbr
);
Map
<
String
,
Object
>
equipMap
=
setEquipInfoNew
(
sequenceNbr
);
equipMap
.
putAll
(
reformNoticeMap
);
equipMap
.
putAll
(
reformNoticeMap
);
...
@@ -209,7 +207,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -209,7 +207,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
notice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
notice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgReformNoticeMapper
.
updateById
(
notice
);
jgReformNoticeMapper
.
updateById
(
notice
);
//删除暂存
//
删除暂存
commonService
.
deleteTaskModel
(
notice
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTaskModel
(
notice
.
getSequenceNbr
()
+
""
);
// 如果为保存并提交,则创建代办
// 如果为保存并提交,则创建代办
this
.
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
));
this
.
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
));
...
@@ -247,7 +245,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -247,7 +245,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 创建新的代办
// 创建新的代办
this
.
createNewTodo
(
notice
,
workflowResultDto
,
taskV2Model
,
FlowStatusEnum
.
TO_BE_PROCESSED
);
this
.
createNewTodo
(
notice
,
workflowResultDto
,
taskV2Model
,
FlowStatusEnum
.
TO_BE_PROCESSED
);
}
}
commonService
.
saveExecuteFlowData2Redis
(
notice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
notice
));
commonService
.
saveExecuteFlowData2Redis
(
notice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
notice
));
}
else
{
}
else
{
JgReformNotice
bean
=
new
JgReformNotice
();
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
...
@@ -266,26 +264,22 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -266,26 +264,22 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* @return 改造告知列表
* @return 改造告知列表
*/
*/
@Override
@Override
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
Map
<
String
,
Object
>>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
String
sort
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
Page
<
JgReformNotice
>
noticePage
=
jgReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
,
reginParams
.
getUserModel
().
getUserId
());
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
Page
<
Map
<
String
,
Object
>>
noticePage
=
jgReformNoticeMapper
.
queryForPage
(
page
,
sortMap
,
model
,
type
,
orgCode
,
reginParams
.
getUserModel
().
getUserId
());
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
Page
<
JgReformNoticeDto
>
noticeDtoPage
=
new
Page
<>();
List
<
Map
<
String
,
Object
>>
mappedRecords
=
noticePage
.
getRecords
().
stream
().
peek
(
notice
->
{
BeanUtils
.
copyProperties
(
noticePage
,
noticeDtoPage
,
"records"
);
Optional
<
Long
>
noticeStatusOpt
=
Optional
.
ofNullable
((
String
)
notice
.
get
(
"noticeStatus"
)).
map
(
Long:
:
valueOf
);
List
<
JgReformNoticeDto
>
records
=
noticePage
.
getRecords
().
stream
().
map
(
notice
->
{
noticeStatusOpt
.
ifPresent
(
status
->
{
JgReformNoticeDto
noticeDto
=
new
JgReformNoticeDto
();
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
((
String
)
notice
.
get
(
"noticeStatus"
)));
BeanUtils
.
copyProperties
(
notice
,
noticeDto
);
notice
.
put
(
"noticeStatusDesc"
,
noticeStatusDesc
);
if
(
Objects
.
nonNull
(
notice
.
getNoticeStatus
()))
{
});
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getNoticeStatus
()));
noticeDto
.
setNoticeStatusDesc
(
noticeStatusDesc
);
}
return
noticeDto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
return
noticeDtoPage
;
noticePage
.
setRecords
(
mappedRecords
);
return
noticePage
;
}
}
/**
/**
...
@@ -336,7 +330,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -336,7 +330,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
}
}
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
String
tempFileName
=
"改造告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
String
tempFileName
=
"改造告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
String
url
=
WordTemplateUtils
.
templateToPdf
(
tempFileName
,
"installation-notification-report.ftl"
,
placeholders
);
String
url
=
WordTemplateUtils
.
templateToPdf
(
tempFileName
,
"installation-notification-report.ftl"
,
placeholders
);
...
@@ -352,7 +346,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -352,7 +346,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Override
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgReformNotice
>
saveNotice
(
String
submitType
,
Map
<
String
,
Object
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
public
List
<
JgReformNotice
>
saveNotice
(
String
submitType
,
Map
<
String
,
Object
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
JgReformNoticeDto
model
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
)),
JgReformNoticeDto
.
class
);
JgReformNoticeDto
model
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
)),
JgReformNoticeDto
.
class
);
convertField
(
model
);
convertField
(
model
);
// 获取告知设备列表
// 获取告知设备列表
...
@@ -372,7 +366,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -372,7 +366,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
throw
new
BadRequest
(
"申请单编号生成失败,请稍后重试!"
);
throw
new
BadRequest
(
"申请单编号生成失败,请稍后重试!"
);
}
}
//启动工作流
//
启动工作流
List
<
WorkflowResultDto
>
workflowResultList
=
this
.
startWorkFlow
(
model
.
getReceiveCompanyCode
(),
submitType
,
deviceList
);
List
<
WorkflowResultDto
>
workflowResultList
=
this
.
startWorkFlow
(
model
.
getReceiveCompanyCode
(),
submitType
,
deviceList
);
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
...
@@ -442,7 +436,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -442,7 +436,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
private
void
updateRedisBatch
(
List
<
JgReformNotice
>
jgReformNotices
)
{
private
void
updateRedisBatch
(
List
<
JgReformNotice
>
jgReformNotices
)
{
jgReformNotices
.
stream
().
filter
(
n
->
StringUtil
.
isNotEmpty
(
n
.
getInstanceId
())).
forEach
(
jgReformNotice
->
{
jgReformNotices
.
stream
().
filter
(
n
->
StringUtil
.
isNotEmpty
(
n
.
getInstanceId
())).
forEach
(
jgReformNotice
->
{
commonService
.
saveExecuteFlowData2Redis
(
jgReformNotice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgReformNotice
));
commonService
.
saveExecuteFlowData2Redis
(
jgReformNotice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgReformNotice
));
});
});
}
}
...
@@ -779,7 +773,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -779,7 +773,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
jgReformNotice
.
setEquList
(
dto
.
getEquList
());
jgReformNotice
.
setEquList
(
dto
.
getEquList
());
jgReformNotice
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgReformNotice
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgReformNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgReformNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
//jgReformNotice.setInstanceId(workflowResultDto.getInstanceId());
//
jgReformNotice.setInstanceId(workflowResultDto.getInstanceId());
// 上个代办改为驳回
// 上个代办改为驳回
taskV2Model
=
this
.
updateLastTodo
(
jgReformNotice
,
FlowStatusEnum
.
REJECTED
);
taskV2Model
=
this
.
updateLastTodo
(
jgReformNotice
,
FlowStatusEnum
.
REJECTED
);
...
...
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