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
7f607ba8
Commit
7f607ba8
authored
Jul 30, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新零时薪资单
parent
fbee436d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
2 deletions
+66
-2
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+57
-2
yd-api/src/main/java/com/yd/api/practitioner/vo/payscale/PayScaleInfo.java
+9
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
7f607ba8
...
@@ -35,7 +35,9 @@ import com.yd.dal.entity.practitioner.payscale.PayScaleBasicInfo;
...
@@ -35,7 +35,9 @@ import com.yd.dal.entity.practitioner.payscale.PayScaleBasicInfo;
import
com.yd.dal.entity.product.Product
;
import
com.yd.dal.entity.product.Product
;
import
com.yd.dal.entity.product.ProductE
;
import
com.yd.dal.entity.product.ProductE
;
import
com.yd.dal.entity.product.ProductPlan
;
import
com.yd.dal.entity.product.ProductPlan
;
import
com.yd.dal.entity.salary.AgAclSalary
;
import
com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper
;
import
com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper
;
import
com.yd.dal.mapper.salary.AgAclSalaryMapper
;
import
com.yd.dal.service.agms.AgmsFortuneDALService
;
import
com.yd.dal.service.agms.AgmsFortuneDALService
;
import
com.yd.dal.service.customer.AclFileUploadDALService
;
import
com.yd.dal.service.customer.AclFileUploadDALService
;
import
com.yd.dal.service.customer.AclPractitionerDALService
;
import
com.yd.dal.service.customer.AclPractitionerDALService
;
...
@@ -111,6 +113,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -111,6 +113,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private
N22SalaryService
n22SalaryService
;
private
N22SalaryService
n22SalaryService
;
@Autowired
@Autowired
private
AgmsFortuneDALService
agmsFortuneDalService
;
private
AgmsFortuneDALService
agmsFortuneDalService
;
@Autowired
private
AgAclSalaryMapper
agAclSalaryMapper
;
@Override
@Override
public
PolicyListQueryResponseVO
policyListQuery
(
PolicyListQueryRequestVO
requestVO
)
{
public
PolicyListQueryResponseVO
policyListQuery
(
PolicyListQueryRequestVO
requestVO
)
{
...
@@ -378,7 +382,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -378,7 +382,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
try
{
try
{
if
(
"0"
.
equals
(
isHistory
))
{
if
(
"0"
.
equals
(
isHistory
))
{
// 查询本年
// 查询本年
resultList
=
this
.
query
PayScaleListFromN22
(
requestVO
);
resultList
=
this
.
query
New
(
requestVO
);
}
else
if
(
"1"
.
equals
(
isHistory
))
{
}
else
if
(
"1"
.
equals
(
isHistory
))
{
// 查询历史才需要执行
// 查询历史才需要执行
resultList
=
this
.
historyEG
(
requestVO
);
resultList
=
this
.
historyEG
(
requestVO
);
...
@@ -396,8 +400,59 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -396,8 +400,59 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return
responseVO
;
return
responseVO
;
}
}
private
List
<
PayScaleInfo
>
queryAll
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
private
List
<
PayScaleInfo
>
queryNew
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
// 1.先查本地新基本法的薪资
List
<
AgAclSalary
>
newSalaryList
=
agAclSalaryMapper
.
queryListByPractitionerId
(
requestVO
.
getPractitionerId
());
List
<
PayScaleInfo
>
salaryList
=
this
.
translateAgAclSalaryToPayScaleInfo
(
newSalaryList
);
// 2.再查N22
List
<
PayScaleInfo
>
listN22
=
this
.
queryPayScaleListFromN22
(
requestVO
);
List
<
PayScaleInfo
>
listN22
=
this
.
queryPayScaleListFromN22
(
requestVO
);
// 3.合并结果集,先取new的,再取N22的
Map
<
String
,
PayScaleInfo
>
map
=
new
HashMap
<>();
String
yearMonth
=
""
;
String
year
=
""
;
String
month
=
""
;
for
(
PayScaleInfo
newSalary
:
salaryList
)
{
map
.
put
(
newSalary
.
getMonDtlPeriod
(),
newSalary
);
}
for
(
PayScaleInfo
infoN22
:
listN22
)
{
year
=
infoN22
.
getYears
()
==
null
?
"0"
:
infoN22
.
getYears
();
month
=
infoN22
.
getMonth
()
==
null
?
"0"
:
infoN22
.
getMonth
();
yearMonth
=
this
.
getYearMonth
(
year
,
month
);
infoN22
.
setMonDtlPeriod
(
yearMonth
);
if
(!
map
.
containsKey
(
yearMonth
))
{
map
.
put
(
yearMonth
,
infoN22
);
}
}
ArrayList
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>(
map
.
values
());
// 排序
resultList
.
sort
(
Comparator
.
comparing
(
PayScaleInfo
::
getMonDtlPeriod
).
reversed
());
return
resultList
;
}
private
List
<
PayScaleInfo
>
translateAgAclSalaryToPayScaleInfo
(
List
<
AgAclSalary
>
newSalaryList
)
{
List
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>();
PayScaleInfo
payScaleInfo
;
for
(
AgAclSalary
item
:
newSalaryList
)
{
payScaleInfo
=
new
PayScaleInfo
();
payScaleInfo
.
setMonShId
(
item
.
getId
());
payScaleInfo
.
setIsBasic
(
1
);
payScaleInfo
.
setMonDtlPeriod
(
item
.
getYearMonth
());
payScaleInfo
.
setMonDtlAmount
(
item
.
getAmount
().
doubleValue
());
payScaleInfo
.
setMonDtlRAmount
(
item
.
getAfterTaxAmount
().
doubleValue
());
resultList
.
add
(
payScaleInfo
);
}
return
resultList
;
}
private
List
<
PayScaleInfo
>
queryAll
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
List
<
PayScaleInfo
>
listN22
=
this
.
queryNew
(
requestVO
);
List
<
PayScaleInfo
>
historyEG
=
this
.
historyEG
(
requestVO
);
List
<
PayScaleInfo
>
historyEG
=
this
.
historyEG
(
requestVO
);
Map
<
String
,
PayScaleInfo
>
map
=
new
HashMap
<>();
Map
<
String
,
PayScaleInfo
>
map
=
new
HashMap
<>();
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/payscale/PayScaleInfo.java
View file @
7f607ba8
...
@@ -15,6 +15,7 @@ public class PayScaleInfo {
...
@@ -15,6 +15,7 @@ public class PayScaleInfo {
private
String
loginName
;
private
String
loginName
;
private
String
years
;
private
String
years
;
private
String
month
;
private
String
month
;
private
Integer
isBasic
;
public
Long
getMonShId
()
{
public
Long
getMonShId
()
{
return
monShId
;
return
monShId
;
...
@@ -147,4 +148,12 @@ public class PayScaleInfo {
...
@@ -147,4 +148,12 @@ public class PayScaleInfo {
", month='"
+
month
+
'\''
+
", month='"
+
month
+
'\''
+
'}'
;
'}'
;
}
}
public
Integer
getIsBasic
()
{
return
isBasic
;
}
public
void
setIsBasic
(
Integer
isBasic
)
{
this
.
isBasic
=
isBasic
;
}
}
}
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