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
445309e9
Commit
445309e9
authored
Jan 17, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 提交验收管理相关接口
parent
9e7f618b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
164 additions
and
27 deletions
+164
-27
AcceptanceStatusEnum.java
.../amos/boot/module/hygf/api/Enum/AcceptanceStatusEnum.java
+10
-10
AcceptanceDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/AcceptanceDto.java
+20
-1
AcceptanceMapper.java
...in/amos/boot/module/hygf/api/mapper/AcceptanceMapper.java
+0
-1
IAcceptanceService.java
...amos/boot/module/hygf/api/service/IAcceptanceService.java
+1
-1
AcceptanceMapper.xml
...-api/src/main/resources/mapper/mysql/AcceptanceMapper.xml
+36
-2
AcceptanceController.java
...boot/module/hygf/biz/controller/AcceptanceController.java
+73
-8
AcceptanceServiceImpl.java
...t/module/hygf/biz/service/impl/AcceptanceServiceImpl.java
+24
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/AcceptanceStatusEnum.java
View file @
445309e9
...
@@ -11,25 +11,25 @@ import lombok.Getter;
...
@@ -11,25 +11,25 @@ import lombok.Getter;
@SuppressWarnings
(
"ALL"
)
@SuppressWarnings
(
"ALL"
)
public
enum
AcceptanceStatusEnum
{
public
enum
AcceptanceStatusEnum
{
待提交验收
(
"待提交验收"
,
0
),
待提交验收
(
"待提交验收"
,
1
),
待投融验收
(
"待投融验收"
,
1
),
待投融验收
(
"待投融验收"
,
2
),
投融验收不通过
(
"投融验收不通过"
,
2
),
投融验收不通过
(
"投融验收不通过"
,
3
),
待法务验收
(
"待法务验收"
,
3
),
待法务验收
(
"待法务验收"
,
4
),
法务验收不通过
(
"法务验收不通过"
,
4
),
法务验收不通过
(
"法务验收不通过"
,
5
),
待工程验收
(
"待工程验收"
,
5
),
待工程验收
(
"待工程验收"
,
6
),
工程验收不通过
(
"工程验收不通过"
,
6
),
工程验收不通过
(
"工程验收不通过"
,
7
),
待线下验收
(
"待线下验收"
,
7
),
待线下验收
(
"待线下验收"
,
8
),
线下验收不通过
(
"线下验收不通过"
,
8
),
线下验收不通过
(
"线下验收不通过"
,
9
),
验收完成
(
"验收完成"
,
9
);
验收完成
(
"验收完成"
,
10
);
/**
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/AcceptanceDto.java
View file @
445309e9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -23,7 +24,15 @@ public class AcceptanceDto extends BaseDto {
...
@@ -23,7 +24,15 @@ public class AcceptanceDto extends BaseDto {
private
String
serviceAgent
;
private
String
serviceAgent
;
@ApiModelProperty
(
value
=
"提交日期"
)
@ApiModelProperty
(
value
=
"提交日期"
)
private
Date
submitDate
;
private
Object
submitDate
;
@JsonIgnore
@ApiModelProperty
(
value
=
"开始提交日期-[查询参数使用]"
)
private
String
startSubmitDate
;
@JsonIgnore
@ApiModelProperty
(
value
=
"截至提交日期-[查询参数使用]"
)
private
Object
endSubmitDate
;
@ApiModelProperty
(
value
=
"整改单数量"
)
@ApiModelProperty
(
value
=
"整改单数量"
)
private
Integer
rectificationOrderCount
;
private
Integer
rectificationOrderCount
;
...
@@ -39,4 +48,14 @@ public class AcceptanceDto extends BaseDto {
...
@@ -39,4 +48,14 @@ public class AcceptanceDto extends BaseDto {
@ApiModelProperty
(
value
=
"整改状态描述"
)
@ApiModelProperty
(
value
=
"整改状态描述"
)
private
String
rectificationStatusDesc
;
private
String
rectificationStatusDesc
;
@ApiModelProperty
(
value
=
"平台经销商单位ID"
)
private
Long
amosDealerId
;
@ApiModelProperty
(
value
=
"区域公司ID"
)
private
Long
regionCompanyId
;
@ApiModelProperty
(
value
=
"区域公司名称"
)
private
String
regionalCompaniesName
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/AcceptanceMapper.java
View file @
445309e9
...
@@ -16,7 +16,6 @@ public interface AcceptanceMapper extends BaseMapper<BaseEntity> {
...
@@ -16,7 +16,6 @@ public interface AcceptanceMapper extends BaseMapper<BaseEntity> {
*/
*/
IPage
<
AcceptanceDto
>
page
(
IPage
<
AcceptanceDto
>
page
(
@Param
(
"page"
)
IPage
<
AcceptanceDto
>
page
,
@Param
(
"page"
)
IPage
<
AcceptanceDto
>
page
,
@Param
(
"sourceType"
)
Integer
sourceType
,
@Param
(
"param"
)
AcceptanceDto
acceptanceDto
@Param
(
"param"
)
AcceptanceDto
acceptanceDto
);
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IAcceptanceService.java
View file @
445309e9
...
@@ -13,7 +13,7 @@ public interface IAcceptanceService {
...
@@ -13,7 +13,7 @@ public interface IAcceptanceService {
* @param acceptanceDto 查询参数
* @param acceptanceDto 查询参数
* @return 分页结果
* @return 分页结果
*/
*/
IPage
<
AcceptanceDto
>
page
(
IPage
<
AcceptanceDto
>
page
,
Integer
sourceType
,
AcceptanceDto
acceptanceDto
);
IPage
<
AcceptanceDto
>
page
(
IPage
<
AcceptanceDto
>
page
,
AcceptanceDto
acceptanceDto
);
/**
/**
* 根据sequenceNbr查询验收详情(线下验收)
* 根据sequenceNbr查询验收详情(线下验收)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/AcceptanceMapper.xml
View file @
445309e9
...
@@ -9,9 +9,11 @@
...
@@ -9,9 +9,11 @@
ph.peasant_household_no AS powerStationCode,
ph.peasant_household_no AS powerStationCode,
ph.developer_name as serviceAgent,
ph.developer_name as serviceAgent,
ph.owners_name AS ownersName,
ph.owners_name AS ownersName,
ph.project_address AS projectAddress,
ph.project_address
_name
AS projectAddress,
bga.acceptance_rec_date AS acceptanceRecDate,
bga.acceptance_rec_date AS acceptanceRecDate,
bga.acceptance_status AS acceptanceStatus,
bga.acceptance_status AS acceptanceStatus,
ph.regional_companies_code AS regionalCompaniesCode,
ph.regional_companies_name AS regionalCompaniesName,
ifnull((
ifnull((
SELECT count(1) FROM hygf_acceptance_rectification_order aro WHERE aro.peasant_household_id = bga.peasant_household_id
SELECT count(1) FROM hygf_acceptance_rectification_order aro WHERE aro.peasant_household_id = bga.peasant_household_id
), 0) AS rectificationOrderCount,
), 0) AS rectificationOrderCount,
...
@@ -21,8 +23,40 @@
...
@@ -21,8 +23,40 @@
FROM
FROM
hygf_basic_grid_acceptance bga
hygf_basic_grid_acceptance bga
LEFT JOIN hygf_peasant_household ph ON ph.sequence_nbr = bga.peasant_household_id
LEFT JOIN hygf_peasant_household ph ON ph.sequence_nbr = bga.peasant_household_id
WHERE
<where>
bga.is_delete = 0
bga.is_delete = 0
AND bga.acceptance_status IS NOT NULL AND bga.acceptance_status != ''
AND bga.acceptance_status IS NOT NULL AND bga.acceptance_status != ''
<if
test=
"param != null"
>
<if
test=
"param.sequenceNbr != null and param.sequenceNbr != ''"
>
AND bga.sequence_nbr = #{param.sequenceNbr}
</if>
<if
test=
"param.projectAddress != null and param.projectAddress != ''"
>
AND ph.project_address LIKE CONCAT('%', #{param.projectAddress}, '%')
</if>
<if
test=
"param.serviceAgent != null and param.serviceAgent != ''"
>
AND ph.developer_name LIKE CONCAT('%', #{param.serviceAgent}, '%')
</if>
<if
test=
"param.powerStationCode != null and param.powerStationCode != ''"
>
AND ph.peasant_household_no = #{param.powerStationCode}
</if>
<if
test=
"param.acceptanceStatus != null and param.acceptanceStatus != ''"
>
AND JSON_SEARCH(#{param.acceptanceStatus}, 'ALL', bga.acceptance_status) IS NOT NULL
</if>
<if
test=
"param.startSubmitDate != null and param.startSubmitDate != ''"
>
AND bga.acceptance_rec_date
>
= #{param.startSubmitDate}
</if>
<if
test=
"param.endSubmitDate != null and param.endSubmitDate != ''"
>
AND bga.acceptance_rec_date
<
= #{param.endSubmitDate}
</if>
<if
test=
"param.amosDealerId != null and param.amosDealerId != ''"
>
AND ph.amos_user_id = #{param.amosDealerId}
</if>
<if
test=
"param.regionCompanyId != null and param.regionCompanyId != ''"
>
AND ph.regional_companies_seq = #{param.regionCompanyId}
</if>
</if>
</where>
ORDER BY
bga.acceptance_rec_date DESC
</select>
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/AcceptanceController.java
View file @
445309e9
...
@@ -2,44 +2,109 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
...
@@ -2,44 +2,109 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.AcceptanceStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.AcceptanceDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.AcceptanceDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@Api
(
tags
=
"验收管理"
)
@Api
(
tags
=
"验收管理"
)
@RequestMapping
(
value
=
"/acceptance"
)
@RequestMapping
(
value
=
"/acceptance"
)
public
class
AcceptanceController
{
public
class
AcceptanceController
extends
BaseController
{
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
@Autowired
private
IAcceptanceService
acceptanceService
;
private
IAcceptanceService
acceptanceService
;
@
GetMapping
(
"/page"
)
@
PostMapping
(
value
=
"/page"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"Get"
,
value
=
"获取验收单列表"
,
notes
=
"获取验收单列表"
)
@ApiOperation
(
httpMethod
=
"Get"
,
value
=
"获取验收单列表"
,
notes
=
"获取验收单列表"
)
public
ResponseModel
<
IPage
<
AcceptanceDto
>>
page
(
public
ResponseModel
<
IPage
<
AcceptanceDto
>>
page
(
@RequestParam
(
value
=
"current"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
current
,
@RequestParam
(
value
=
"current"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
current
,
@RequestParam
(
value
=
"size"
,
required
=
false
,
defaultValue
=
"20"
)
Integer
size
,
@RequestParam
(
value
=
"size"
,
required
=
false
,
defaultValue
=
"20"
)
Integer
size
,
@RequestParam
(
value
=
"sourceType"
,
required
=
false
)
Integer
sourceType
,
@RequestBody
AcceptanceDto
param
AcceptanceDto
acceptanceDto
)
{
)
{
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
getUserInfo
().
getUserId
());
param
.
setRegionCompanyId
(
userUnitInformationDto
.
getRegionalCompaniesSeq
());
param
.
setAmosDealerId
(
userUnitInformationDto
.
getAmosDealerId
());
// 获取用户权限
Set
<
String
>
roles
=
new
HashSet
<>();
try
{
FeignClientResult
<
AgencyUserModel
>
response
=
Privilege
.
agencyUserClient
.
getme
();
if
(
response
.
getStatus
()
==
200
)
{
AgencyUserModel
agencyUser
=
response
.
getResult
();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
agencyUser
.
getOrgRoles
();
orgRoles
.
values
().
forEach
(
roleModels
->
roles
.
addAll
(
roleModels
.
stream
().
map
(
RoleModel:
:
getRoleTypeName
).
collect
(
Collectors
.
toSet
())));
}
else
{
throw
new
RuntimeException
(
"获取用户权限失败"
);
}
}
catch
(
RuntimeException
e
)
{
throw
new
RuntimeException
(
e
.
getMessage
());
}
Set
<
String
>
acceptanceStatusSet
=
this
.
getFullAcceptanceStatus
();
// 用户光伏-法务:看不到未通过投融审核的电站
if
(
roles
.
contains
(
"户用光伏-法务"
)
||
roles
.
contains
(
"户用光伏-经销商-法务"
))
{
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
待提交验收
.
getCode
()));
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
待投融验收
.
getCode
()));
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
投融验收不通过
.
getCode
()));
}
// 用户光伏-工程: 看不到未通过法务审核的电站
else
if
(
roles
.
contains
(
"户用光伏-工程"
)
||
roles
.
contains
(
"户用光伏-经销商-工程"
))
{
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
待提交验收
.
getCode
()));
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
待投融验收
.
getCode
()));
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
投融验收不通过
.
getCode
()));
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
待法务验收
.
getCode
()));
acceptanceStatusSet
.
remove
(
String
.
valueOf
(
AcceptanceStatusEnum
.
法务验收不通过
.
getCode
()));
}
IPage
<
AcceptanceDto
>
page
=
new
Page
<>(
current
,
size
);
IPage
<
AcceptanceDto
>
page
=
new
Page
<>(
current
,
size
);
page
=
acceptanceService
.
page
(
page
,
sourceType
,
acceptanceDto
);
if
(
StringUtils
.
hasText
(
param
.
getAcceptanceStatus
()))
{
if
(
acceptanceStatusSet
.
contains
(
param
.
getAcceptanceStatus
()))
{
acceptanceStatusSet
=
new
HashSet
<>(
Collections
.
singletonList
(
param
.
getAcceptanceStatus
()));
}
else
{
return
ResponseHelper
.
buildResponse
(
page
);
}
}
param
.
setAcceptanceStatus
(
String
.
join
(
","
,
acceptanceStatusSet
));
page
=
acceptanceService
.
page
(
page
,
param
);
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
}
@GetMapping
(
"/offline-acceptance-details
/{sequenceNbr}
"
)
@GetMapping
(
"/offline-acceptance-details"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"Get"
,
value
=
"获取验收单列表"
,
notes
=
"获取验收单列表"
)
@ApiOperation
(
httpMethod
=
"Get"
,
value
=
"获取验收单列表"
,
notes
=
"获取验收单列表"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
offlineAcceptanceDetails
(
@
PathVariable
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
offlineAcceptanceDetails
(
@
RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
acceptanceService
.
offlineAcceptanceDetails
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
acceptanceService
.
offlineAcceptanceDetails
(
sequenceNbr
));
}
}
private
Set
<
String
>
getFullAcceptanceStatus
()
{
String
[]
array
=
new
String
[
AcceptanceStatusEnum
.
验收完成
.
getCode
()
+
1
];
for
(
int
i
=
AcceptanceStatusEnum
.
待提交验收
.
getCode
();
i
<=
AcceptanceStatusEnum
.
验收完成
.
getCode
();
i
++)
{
array
[
i
]
=
String
.
valueOf
(
i
);
}
return
Arrays
.
stream
(
array
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toSet
());
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceServiceImpl.java
View file @
445309e9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.AcceptanceStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.AcceptanceStatusEnum
;
...
@@ -16,9 +17,10 @@ import org.springframework.beans.BeanUtils;
...
@@ -16,9 +17,10 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
java.util.
HashMap
;
import
java.util.
*
;
import
java.util.
Map
;
import
java.util.
stream.Collectors
;
@Slf4j
@Slf4j
@Service
@Service
...
@@ -39,8 +41,26 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
...
@@ -39,8 +41,26 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
* @return 分页结果
* @return 分页结果
*/
*/
@Override
@Override
public
IPage
<
AcceptanceDto
>
page
(
IPage
<
AcceptanceDto
>
page
,
Integer
sourceType
,
AcceptanceDto
acceptanceDto
)
{
public
IPage
<
AcceptanceDto
>
page
(
IPage
<
AcceptanceDto
>
page
,
AcceptanceDto
acceptanceDto
)
{
IPage
<
AcceptanceDto
>
resultPage
=
acceptanceMapper
.
page
(
page
,
sourceType
,
acceptanceDto
);
if
(
Objects
.
nonNull
(
acceptanceDto
))
{
// 处理验收状态
if
(
StringUtils
.
hasText
(
acceptanceDto
.
getAcceptanceStatus
()))
{
String
[]
vars
=
acceptanceDto
.
getAcceptanceStatus
().
split
(
","
);
JSONArray
jsonArray
=
new
JSONArray
();
jsonArray
.
addAll
(
Arrays
.
asList
(
vars
));
acceptanceDto
.
setAcceptanceStatus
(
jsonArray
.
toJSONString
());
}
// 处理提交日期
if
(
Objects
.
nonNull
(
acceptanceDto
.
getSubmitDate
())
&&
acceptanceDto
.
getSubmitDate
()
instanceof
List
)
{
Object
submitDate
=
acceptanceDto
.
getSubmitDate
();
List
<
String
>
dates
=
((
ArrayList
<
String
>)
submitDate
).
stream
().
map
(
String:
:
trim
).
collect
(
Collectors
.
toList
());
if
(!
dates
.
isEmpty
())
{
acceptanceDto
.
setStartSubmitDate
(
dates
.
get
(
0
)
+
" 00:00:00"
);
acceptanceDto
.
setEndSubmitDate
(
dates
.
get
(
1
)
+
" 23:59:59"
);
}
}
}
IPage
<
AcceptanceDto
>
resultPage
=
acceptanceMapper
.
page
(
page
,
acceptanceDto
);
resultPage
.
getRecords
().
forEach
(
v
->
{
resultPage
.
getRecords
().
forEach
(
v
->
{
AcceptanceStatusEnum
statusEnum
=
AcceptanceStatusEnum
.
getNodeByCode
(
Integer
.
parseInt
(
v
.
getAcceptanceStatus
()));
AcceptanceStatusEnum
statusEnum
=
AcceptanceStatusEnum
.
getNodeByCode
(
Integer
.
parseInt
(
v
.
getAcceptanceStatus
()));
v
.
setAcceptanceStatusDesc
(
statusEnum
.
getName
());
v
.
setAcceptanceStatusDesc
(
statusEnum
.
getName
());
...
...
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