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
4f029726
Commit
4f029726
authored
Apr 15, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):移装告知列表字段调整,搜索条件调整,列表日期字段支持排序
parent
63b14cae
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
39 deletions
+107
-39
JgTransferNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
+16
-1
JgTransferNoticeMapper.java
...mos/boot/module/jg/api/mapper/JgTransferNoticeMapper.java
+6
-1
IJgTransferNoticeService.java
.../boot/module/jg/api/service/IJgTransferNoticeService.java
+1
-1
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+1
-1
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+66
-16
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+3
-2
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+14
-17
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/JgTransferNoticeDto.java
View file @
4f029726
...
@@ -221,9 +221,24 @@ public class JgTransferNoticeDto extends BaseDto {
...
@@ -221,9 +221,24 @@ public class JgTransferNoticeDto extends BaseDto {
private
String
supervisoryCode
;
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"设备种类"
)
private
String
equList
;
private
String
equList
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"设备品种"
)
private
String
equDefine
;
@ApiModelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
@ApiModelProperty
(
value
=
"告知书编号"
)
private
String
informNumber
;
@ApiModelProperty
(
value
=
"96333码"
)
private
String
code96333
;
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgTransferNoticeMapper.java
View file @
4f029726
...
@@ -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.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
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
;
...
@@ -17,7 +18,11 @@ import java.util.Map;
...
@@ -17,7 +18,11 @@ import java.util.Map;
*/
*/
public
interface
JgTransferNoticeMapper
extends
CustomBaseMapper
<
JgTransferNotice
>
{
public
interface
JgTransferNoticeMapper
extends
CustomBaseMapper
<
JgTransferNotice
>
{
Page
<
JgTransferNotice
>
queryForPage
(
Page
<
JgTransferNotice
>
page
,
@Param
(
"param"
)
JgTransferNoticeDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
Page
<
Map
<
String
,
Object
>>
queryForPage
(
Page
<
JgTransferNotice
>
page
,
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"param"
)
JgTransferNoticeDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
@MapKey
(
"sequenceNbr"
)
@MapKey
(
"sequenceNbr"
)
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgTransferNoticeService.java
View file @
4f029726
...
@@ -23,7 +23,7 @@ public interface IJgTransferNoticeService extends IService<JgTransferNotice> {
...
@@ -23,7 +23,7 @@ public interface IJgTransferNoticeService extends IService<JgTransferNotice> {
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
);
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
);
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
);
Page
<
Map
<
String
,
Object
>>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
String
sort
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
);
Boolean
deleteForBatch
(
Long
[]
sequenceNbrs
);
Boolean
deleteForBatch
(
Long
[]
sequenceNbrs
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
4f029726
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
isn.next_execute_ids as nextExecuteIds,
isn.next_execute_ids as nextExecuteIds,
isn.inform_number AS informNumber,
isn.inform_number AS informNumber,
isn.equ_category AS equCategory,
isn.equ_category AS equCategory,
isn.next_task_id as nextTaskId
isn.next_task_id as nextTaskId
,
ri.EQU_CODE AS equCode,
ri.EQU_CODE AS equCode,
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.CODE96333 as code96333,
oi.CODE96333 as code96333,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
4f029726
...
@@ -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.JgTransferNoticeMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper"
>
<select
id=
"queryForPage"
resultType=
"
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
"
>
<select
id=
"queryForPage"
resultType=
"
java.util.Map
"
>
select
select
tjtn.sequence_nbr AS sequenceNbr,
tjtn.sequence_nbr AS sequenceNbr,
tjtn.apply_no AS applyNo,
tjtn.apply_no AS applyNo,
tjtn.notice_date AS noticeDate,
tjtn.use_unit_name AS useUnitName,
tjtn.use_unit_name AS useUnitName,
tjtn.receive_org_name AS receiveOrgName,
tjtn.receive_org_name AS receiveOrgName,
tjtn.address AS address,
tjtn.address AS address,
...
@@ -18,25 +17,31 @@
...
@@ -18,25 +17,31 @@
tjtn.street_name AS streetName,
tjtn.street_name AS streetName,
tjtn.instance_id AS instanceId,
tjtn.instance_id AS instanceId,
tjtn.transfer_type AS transferType,
tjtn.transfer_type AS transferType,
tjtn.plan_date AS planDate,
tjtn.promoter AS promoter,
tjtn.promoter AS promoter,
tjtn.next_execute_ids AS nextExecuteIds,
tjtn.next_execute_ids AS nextExecuteIds,
tjtn.instance_status AS instanceStatus,
tjtn.instance_status AS instanceStatus,
tjtn.notice_report_url AS noticeReportUrl,
tjtn.notice_report_url AS noticeReportUrl,
(select ec."name" from tz_equipment_category ec WHERE ec.code = ri.equ_category) AS equipCateName,
tjtn.inform_number AS informNumber,
tjtn.handle_date AS handleDate,
tjtn.create_user_id as createUserId,
tjtn.create_user_id as createUserId,
tjtn.next_execute_user_ids as nextExecuteUserIds,
tjtn.next_execute_user_ids as nextExecuteUserIds,
(select oi.SUPERVISORY_CODE from idx_biz_jg_other_info oi WHERE oi.RECORD = re.equ_id) as supervisoryCode,
tjtn.next_task_id AS nextTaskId,
tjtn.next_task_id AS nextTaskId,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress,
ibjui."ADDRESS" as detailedAddress,
ei.address as useUnitLeaderAddress
ri.EQU_CODE AS equCode,
oi.CODE96333 as code96333,
oi.SUPERVISORY_CODE AS supervisoryCode,
DATE_FORMAT(tjtn.notice_date,'%Y-%m-%d') AS noticeDate,
DATE_FORMAT(tjtn.handle_date,'%Y-%m-%d') AS handleDate,
DATE_FORMAT(tjtn.plan_date,'%Y-%m-%d') AS planDate,
(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,
(select ec."name" from tz_equipment_category ec WHERE ec.code = ri.equ_category) AS equipCateName,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as equAddress
FROM
FROM
tzs_jg_transfer_notice tjtn
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.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 re.equ_id = ibjui.RECORD
LEFT JOIN idx_biz_jg_use_info ibjui on ibjui.RECORD = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = tjtn.use_unit_credit_code
LEFT JOIN idx_biz_jg_other_info oi ON oi.RECORD = re.equ_id
<where>
<where>
tjtn.is_delete = false
tjtn.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param != null "
>
...
@@ -61,19 +66,61 @@
...
@@ -61,19 +66,61 @@
<if
test=
"param.transferType != null and param.transferType != '' and param.transferType == '10003'"
>
<if
test=
"param.transferType != null and param.transferType != '' and param.transferType == '10003'"
>
AND tjtn.transfer_type = '跨区移装'
AND tjtn.transfer_type = '跨区移装'
</if>
</if>
<if
test=
"param.equList != null and param.equList != ''"
>
AND ri."EQU_LIST" = #{param.equList}
</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 tjtn.inform_number like concat('%',#{param.informNumber},'%')
</if>
<if
test=
"param.code96333 != null and param.code96333 != ''"
>
AND oi.CODE96333 like concat('%',#{param.code96333},'%')
</if>
<if
test=
"param.supervisoryCode != null and param.supervisoryCode != ''"
>
AND oi.SUPERVISORY_CODE like concat('%',#{param.supervisoryCode},'%')
</if>
<if
test=
"param.noticeDate != null"
>
AND tjtn.notice_date LIKE CONCAT('%', DATE_FORMAT(#{param.noticeDate},'%Y-%m-%d'), '%')
</if>
<if
test=
"param.equAddress != null and param.equAddress != ''"
>
AND (
ibjui."PROVINCE_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."CITY_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."COUNTY_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."STREET_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
)
</if>
<if
test=
"param.useUnitCreditCode != null and param.useUnitCreditCode != ''"
>
AND tjtn."use_unit_credit_code" = #{param.useUnitCreditCode}
</if>
<if
test=
"param.installUnitCreditCode != null and param.installUnitCreditCode != ''"
>
AND tjtn."install_unit_credit_code" = #{param.installUnitCreditCode}
</if>
<if
test=
"param.receiveCompanyCode != null and param.receiveCompanyCode != ''"
>
AND tjtn.receive_company_code = #{param.receiveCompanyCode}
</if>
</if>
</if>
<if
test=
"param.roleIds != null and type == 'supervision'"
>
<if
test=
"param.roleIds != null and type == 'supervision'"
>
<foreach
collection=
'param.roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
<foreach
collection=
'param.roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
tjtn.instance_status like concat('%',#{role},'%')
tjtn.instance_status like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND (tjtn.receive_company_code = #{orgCode} or tjtn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
AND (tjtn.receive_company_code = #{orgCode} or tjtn.transfer_to_user_ids like
concat('%',#{param.transferToUserIds},'%'))
AND tjtn.instance_id
<![CDATA[<>]]>
''
AND tjtn.instance_id
<![CDATA[<>]]>
''
</if>
</if>
<if
test=
"type == 'company'"
>
<if
test=
"type == 'company'"
>
AND (tjtn.install_unit_credit_code = #{orgCode} or tjtn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
AND (tjtn.install_unit_credit_code = #{orgCode} or tjtn.transfer_to_user_ids like
concat('%',#{param.transferToUserIds},'%'))
</if>
</if>
<if
test=
"type == 'testAdmin'"
>
<if
test=
"type == 'testAdmin'"
>
((AND tjtn.receive_company_code = #{orgCode}
((AND tjtn.receive_company_code = #{orgCode}
...
@@ -83,6 +130,9 @@
...
@@ -83,6 +130,9 @@
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
<if
test=
"sort != null"
>
tjtn.${sort.field} ${sort.sortType},
</if>
tjtn.apply_no DESC
tjtn.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/JgTransferNoticeController.java
View file @
4f029726
...
@@ -146,16 +146,17 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -146,16 +146,17 @@ public class JgTransferNoticeController 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
<
JgTransferNoticeDto
>>
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
,
@ApiParam
(
value
=
"类型:enterprise-企业端、supervision-监管端"
,
required
=
true
)
@RequestParam
(
value
=
"type"
,
defaultValue
=
"enterprise"
)
String
type
,
@ApiParam
(
value
=
"类型:enterprise-企业端、supervision-监管端"
,
required
=
true
)
@RequestParam
(
value
=
"type"
,
defaultValue
=
"enterprise"
)
String
type
,
@RequestBody
(
required
=
false
)
JgTransferNoticeDto
model
@RequestBody
(
required
=
false
)
JgTransferNoticeDto
model
)
{
)
{
Page
<
JgTransferNotice
>
page
=
new
Page
<>(
current
,
size
);
Page
<
JgTransferNotice
>
page
=
new
Page
<>(
current
,
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
type
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyLevel"
);
type
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyLevel"
);
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
queryForJgTransferNoticePage
(
page
,
model
,
type
,
reginParams
));
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
queryForJgTransferNoticePage
(
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/JgTransferNoticeServiceImpl.java
View file @
4f029726
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeEqMapper;
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeEqMapper;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
...
@@ -354,26 +355,22 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -354,26 +355,22 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
* 分页查询
* 分页查询
*/
*/
@Override
@Override
public
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
Map
<
String
,
Object
>>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
String
sort
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
model
.
setTransferToUserIds
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setTransferToUserIds
(
reginParams
.
getUserModel
().
getUserId
());
Page
<
JgTransferNotice
>
noticePage
=
jgTransferNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
Map
<
String
,
Object
>>
noticePage
=
jgTransferNoticeMapper
.
queryForPage
(
page
,
sortMap
,
model
,
type
,
orgCode
);
// 将Page<JgTransferNotice>转化为Page<JgTransferNoticeDto>
List
<
Map
<
String
,
Object
>>
mappedRecords
=
noticePage
.
getRecords
().
stream
().
peek
(
notice
->
{
Page
<
JgTransferNoticeDto
>
noticeDtoPage
=
new
Page
<>();
Optional
<
Long
>
noticeStatusOpt
=
Optional
.
ofNullable
((
String
)
notice
.
get
(
"noticeStatus"
)).
map
(
Long:
:
valueOf
);
BeanUtils
.
copyProperties
(
noticePage
,
noticeDtoPage
,
"records"
);
noticeStatusOpt
.
ifPresent
(
status
->
{
List
<
JgTransferNoticeDto
>
records
=
noticePage
.
getRecords
().
stream
().
map
(
notice
->
{
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
((
String
)
notice
.
get
(
"noticeStatus"
)));
JgTransferNoticeDto
noticeDto
=
new
JgTransferNoticeDto
();
notice
.
put
(
"noticeStatusDesc"
,
noticeStatusDesc
);
BeanUtils
.
copyProperties
(
notice
,
noticeDto
);
});
if
(
Objects
.
nonNull
(
notice
.
getNoticeStatus
()))
{
}).
collect
(
Collectors
.
toList
());
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getNoticeStatus
()));
noticeDto
.
setNoticeStatusDesc
(
noticeStatusDesc
);
}
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
return
noticeDtoPage
;
noticePage
.
setRecords
(
mappedRecords
);
return
noticePage
;
}
}
@Override
@Override
...
...
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