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
9c7cdb8a
Commit
9c7cdb8a
authored
Jun 01, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
薪资单-历史薪资加全部,A+B+C = "SalaryType": "业绩佣金" + "SalaryType": "加扣款项"
parent
f1880701
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
19 deletions
+35
-19
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+34
-18
yd-api/src/main/java/com/yd/api/practitioner/vo/payscale/PayScaleQueryRequestVO.java
+1
-1
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
9c7cdb8a
...
@@ -70,6 +70,7 @@ import com.yd.util.CommonUtil;
...
@@ -70,6 +70,7 @@ import com.yd.util.CommonUtil;
import
com.yd.util.config.ZHBErrorConfig
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.BeanUtils
;
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
;
...
@@ -374,27 +375,22 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -374,27 +375,22 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
String
isHistory
=
requestVO
.
getIsHistory
();
String
isHistory
=
requestVO
.
getIsHistory
();
List
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>();
List
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>();
List
<
PayScaleInfo
>
listFromN22
=
null
;
List
<
PayScaleInfo
>
historyEG
=
null
;
try
{
try
{
if
(
"0"
.
equals
(
isHistory
))
{
if
(
"0"
.
equals
(
isHistory
))
{
listFromN22
=
this
.
queryPayScaleListFromN22
(
requestVO
);
// 查询本年
}
resultList
=
this
.
queryPayScaleListFromN22
(
requestVO
);
// 查询历史才需要执行
}
else
if
(
"1"
.
equals
(
isHistory
))
{
if
(
"1"
.
equals
(
isHistory
))
{
// 查询历史才需要执行
historyEG
=
this
.
historyEG
(
requestVO
);
resultList
=
this
.
historyEG
(
requestVO
);
}
else
{
// 查询全部,把N22和历史集合合并到一起
resultList
=
this
.
queryAll
(
requestVO
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(
CollectionUtils
.
isNotEmpty
(
listFromN22
))
{
resultList
.
addAll
(
listFromN22
);
}
if
(
CollectionUtils
.
isNotEmpty
(
historyEG
))
{
resultList
.
addAll
(
historyEG
);
}
// 排序
// 排序
resultList
.
sort
(
Comparator
.
comparing
(
PayScaleInfo
::
getMonDtlPeriod
).
reversed
());
resultList
.
sort
(
Comparator
.
comparing
(
PayScaleInfo
::
getMonDtlPeriod
).
reversed
());
...
@@ -403,6 +399,26 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -403,6 +399,26 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return
responseVO
;
return
responseVO
;
}
}
private
List
<
PayScaleInfo
>
queryAll
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
List
<
PayScaleInfo
>
listN22
=
this
.
queryPayScaleListFromN22
(
requestVO
);
List
<
PayScaleInfo
>
historyEG
=
this
.
historyEG
(
requestVO
);
Map
<
String
,
PayScaleInfo
>
map
=
new
HashMap
<>();
String
yearMonth
=
""
;
for
(
PayScaleInfo
infoN22
:
listN22
)
{
yearMonth
=
infoN22
.
getYears
()
+
infoN22
.
getMonth
();
map
.
put
(
yearMonth
,
infoN22
);
}
for
(
PayScaleInfo
infoEG
:
historyEG
)
{
yearMonth
=
infoEG
.
getYears
()
+
infoEG
.
getMonth
();
if
(!
map
.
containsKey
(
yearMonth
))
{
map
.
put
(
yearMonth
,
infoEG
);
}
}
return
new
ArrayList
<>(
map
.
values
());
}
private
List
<
PayScaleInfo
>
queryPayScaleListFromN22
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
private
List
<
PayScaleInfo
>
queryPayScaleListFromN22
(
PayScaleQueryRequestVO
requestVO
)
throws
Exception
{
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
...
@@ -790,7 +806,11 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -790,7 +806,11 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
List
<
SalaryDetails
>
salaryDetailsList
=
staffSalaryDetails
.
getSalaryDetailsLIST
();
List
<
SalaryDetails
>
salaryDetailsList
=
staffSalaryDetails
.
getSalaryDetailsLIST
();
// 1.过滤掉SalaryName=FYC的元素
// 1.过滤掉SalaryName=FYC的元素
salaryDetailsList
=
salaryDetailsList
.
stream
()
salaryDetailsList
=
salaryDetailsList
.
stream
()
.
filter
((
SalaryDetails
i
)
->
!
"FYC"
.
equals
(
i
.
getSalaryName
()))
.
filter
((
SalaryDetails
i
)
->
(
"业绩佣金"
.
equals
(
i
.
getSalaryType
())
||
"加扣款项"
.
equals
(
i
.
getSalaryType
())
)
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
salaryDetailsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
salaryDetailsList
))
{
...
@@ -803,10 +823,6 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -803,10 +823,6 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
responseVO
.
setRate
(
rate
);
responseVO
.
setRate
(
rate
);
// 佣金合计
// 佣金合计
for
(
SalaryDetails
item
:
salaryDetailsList
)
{
for
(
SalaryDetails
item
:
salaryDetailsList
)
{
if
(
"d771080c-5424-11e9-9745-00163e0040a8"
.
equals
(
item
.
getProject_id
()))
{
// 过滤掉salaryName: "二年续期佣金"
continue
;
}
abc
=
abc
.
add
(
BigDecimal
.
valueOf
(
item
.
getCommission
()));
abc
=
abc
.
add
(
BigDecimal
.
valueOf
(
item
.
getCommission
()));
}
}
responseVO
.
setAbc
(
abc
.
toString
());
responseVO
.
setAbc
(
abc
.
toString
());
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/payscale/PayScaleQueryRequestVO.java
View file @
9c7cdb8a
...
@@ -6,7 +6,7 @@ public class PayScaleQueryRequestVO {
...
@@ -6,7 +6,7 @@ public class PayScaleQueryRequestVO {
private
Long
practitionerId
;
private
Long
practitionerId
;
/**
/**
* 0-查本年 1-查历史
* 0-查本年 1-查历史
2-查全部
*/
*/
private
String
isHistory
;
private
String
isHistory
;
...
...
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