Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
1778e993
Commit
1778e993
authored
Aug 08, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出的excel字段需求变更
parent
036b1a4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+4
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+42
-0
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+1
-1
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
1778e993
...
...
@@ -11,6 +11,10 @@ public class InsurancesConstants {
* 新增
*/
public
static
final
String
ADD
=
"新增"
;
/**
* 离职
*/
public
static
final
String
QUIT
=
"离职"
;
/**
* 批增
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
1778e993
...
...
@@ -801,6 +801,48 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
EXPORT
);
//针对是替换类型的做处理,每一条替换数据对应一条被替换数据
List
<
InsuranceExportListVO
>
listVOS
=
insuranceExportList
.
stream
().
filter
(
e
->
e
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
).
collect
(
Collectors
.
toList
());
List
<
InsuranceExportListVO
>
list
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listVOS
)){
for
(
InsuranceExportListVO
listVO
:
listVOS
)
{
listVO
.
setRemark
(
InsurancesConstants
.
ADD
);
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
listVO
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
InsuranceExportListVO
vo
=
new
InsuranceExportListVO
();
BeanCopyUtils
.
copyProperties
(
byId
,
vo
);
//购买月数
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
//购买天数
vo
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
vo
.
setRemark
(
InsurancesConstants
.
QUIT
);
vo
.
setBuyType
(
CommonConstants
.
FOUR_INT
);
list
.
add
(
vo
);
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
//根据项目编码获取项目名称
List
<
String
>
collectList
=
list
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodesList
=
archivesDaprUtil
.
getSetInfoByCodes
(
collectList
);
if
(
null
!=
setInfoByCodesList
&&
setInfoByCodesList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodesList
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodesList
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceExportListVO
record
:
list
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
}
}
}
insuranceExportList
.
addAll
(
list
);
}
}
}
return
insuranceExportList
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
1778e993
...
...
@@ -342,7 +342,7 @@
detail.CREATE_NAME as createName,
detail.REMARK as remark
from t_insurance_detail detail
where detail.id in
where detail.
DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1 and detail.
id in
<foreach
collection=
"idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
...
...
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