Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
16a32e35
Commit
16a32e35
authored
Feb 07, 2022
by
hongzhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_20210330' into dev_20210330
parents
097a05c7
3f7d9415
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
4 deletions
+66
-4
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+66
-4
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
16a32e35
...
...
@@ -401,12 +401,10 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
// 查询全部和历史,把新表数据和EG历史集合合并到一起
resultList
=
aclPractitionerDALService
.
queryEGHistorySalaryPDFByPractitionerId
(
practitionerId
);
}
translateObj
(
newList
,
resultList
,
requestVO
.
getPreFlag
());
// 排序
resultList
.
sort
(
Comparator
.
comparing
(
PayScaleInfo:
:
getMonDtlPeriod
).
reversed
());
List
<
PayScaleInfo
>
list
=
translateObjNew
(
newList
,
resultList
,
requestVO
.
getPreFlag
());
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
responseVO
.
setPayScaleInfos
(
resultL
ist
);
responseVO
.
setPayScaleInfos
(
l
ist
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -415,6 +413,65 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return
responseVO
;
}
private
List
<
PayScaleInfo
>
translateObjNew
(
List
<
AgAclLifePractitionerSalary
>
salaryList
,
List
<
PayScaleInfo
>
historyEG
,
String
preFlag
)
{
PayScaleInfo
payScaleInfo
;
String
time
;
List
<
PayScaleInfo
>
newList
=
new
ArrayList
<>();
if
(
salaryList
!=
null
&&
salaryList
.
size
()
>
0
)
{
for
(
AgAclLifePractitionerSalary
salary
:
salaryList
)
{
payScaleInfo
=
new
PayScaleInfo
();
payScaleInfo
.
setMonShId
(
salary
.
getId
());
payScaleInfo
.
setPdfOssPath
(
salary
.
getPdfOssPath
());
payScaleInfo
.
setMonDtlPeriod
(
salary
.
getYearMonth
());
payScaleInfo
.
setMonDtlAmount
(
salary
.
getPayableAmount
().
doubleValue
());
payScaleInfo
.
setMonDtlRAmount
(
salary
.
getNetAmount
().
doubleValue
());
payScaleInfo
.
setIsBasic
(
salary
.
getIsBasic
());
payScaleInfo
.
setIsActive
(
salary
.
getIsActive
());
payScaleInfo
.
setPreFlag
(
preFlag
);
time
=
payScaleInfo
.
getMonDtlPeriod
();
if
(
StringUtils
.
isNotBlank
(
time
))
{
payScaleInfo
.
setYears
(
time
.
substring
(
0
,
4
));
payScaleInfo
.
setMonth
(
time
.
substring
(
4
));
}
newList
.
add
(
payScaleInfo
);
}
}
// 去重及合并两个集合
Map
<
String
,
PayScaleInfo
>
map
=
new
HashMap
<>();
String
yearMonth
=
""
;
String
year
=
""
;
String
month
=
""
;
for
(
PayScaleInfo
infoEG
:
historyEG
)
{
if
(
StringUtils
.
isNotBlank
(
infoEG
.
getMonDtlPeriod
()))
{
time
=
infoEG
.
getMonDtlPeriod
();
infoEG
.
setYears
(
time
.
substring
(
0
,
4
));
infoEG
.
setMonth
(
time
.
substring
(
4
));
}
year
=
infoEG
.
getYears
()
==
null
?
"0"
:
infoEG
.
getYears
();
month
=
infoEG
.
getMonth
()
==
null
?
"0"
:
infoEG
.
getMonth
();
yearMonth
=
this
.
getYearMonth
(
year
,
month
);
infoEG
.
setMonDtlPeriod
(
yearMonth
);
map
.
put
(
yearMonth
,
infoEG
);
}
for
(
PayScaleInfo
infoNew
:
newList
)
{
year
=
infoNew
.
getYears
()
==
null
?
"0"
:
infoNew
.
getYears
();
month
=
infoNew
.
getMonth
()
==
null
?
"0"
:
infoNew
.
getMonth
();
yearMonth
=
this
.
getYearMonth
(
year
,
month
);
infoNew
.
setMonDtlPeriod
(
yearMonth
);
if
(!
map
.
containsKey
(
yearMonth
))
{
map
.
put
(
yearMonth
,
infoNew
);
}
}
ArrayList
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>(
map
.
values
());
// 排序
resultList
.
sort
(
Comparator
.
comparing
(
PayScaleInfo
::
getMonDtlPeriod
).
reversed
());
return
resultList
;
}
private
List
<
PayScaleInfo
>
queryNew
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Integer
isActive
=
requestVO
.
getIsActive
();
...
...
@@ -684,6 +741,11 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
payScaleInfo
.
setIsBasic
(
salary
.
getIsBasic
());
payScaleInfo
.
setIsActive
(
salary
.
getIsActive
());
payScaleInfo
.
setPreFlag
(
preFlag
);
time
=
payScaleInfo
.
getMonDtlPeriod
();
if
(
StringUtils
.
isNotBlank
(
time
))
{
payScaleInfo
.
setYears
(
time
.
substring
(
0
,
4
));
payScaleInfo
.
setMonth
(
time
.
substring
(
4
));
}
resultList
.
add
(
payScaleInfo
);
}
}
...
...
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