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
1b8c4d62
Commit
1b8c4d62
authored
Mar 02, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时薪资单2
parent
f95cc6e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
49 deletions
+75
-49
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+60
-43
yd-api/src/main/java/com/yd/api/practitioner/vo/payscale/PayScaleInfo.java
+15
-6
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
1b8c4d62
...
@@ -137,51 +137,68 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -137,51 +137,68 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
String
practitionerIdEG
=
requestVO
.
getPractitionerIdEG
();
String
practitionerIdEG
=
requestVO
.
getPractitionerIdEG
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
if
(!
Strings
.
isNullOrEmpty
(
practitionerIdEG
)
&&
practitionerId
!=
null
){
List
<
PayScaleInfo
>
payScaleInfoListAll
=
aclPractitionerDALService
.
findPayScaleByPractitionerEG
(
practitionerIdEG
);
if
(!
payScaleInfoListAll
.
isEmpty
()){
Map
<
String
,
String
>
dtlTypeMap
=
new
HashMap
<>();
Map
<
String
,
String
>
titleMap
=
new
HashMap
<>();
List
<
OptionsEGolden
>
optionsEGoldenList
=
mdDropOptionsDALService
.
findByMasterIdsE
(
Collections
.
singletonList
(
101
));
optionsEGoldenList
.
forEach
(
i
->
dtlTypeMap
.
put
(
i
.
getOptAttr
(),
i
.
getOptName
()));
List
<
OptionsEGolden
>
titleList
=
mdDropOptionsDALService
.
findAllTitleEG
();
titleList
.
forEach
(
i
->
titleMap
.
put
(
i
.
getTitleCode
(),
i
.
getTitleName
()));
Map
<
Long
,
PayScaleInfo
>
payScaleInfoMap
=
new
HashMap
<>();
PayScaleInfo
payScaleInfo
;
Long
time
;
for
(
PayScaleInfo
item
:
payScaleInfoListAll
){
time
=
item
.
getMonDtlPeriod
();
if
(
payScaleInfoMap
.
containsKey
(
time
)){
payScaleInfo
=
payScaleInfoMap
.
get
(
time
);
calculateRAmount
(
payScaleInfo
,
item
);
}
else
{
calculateRAmount
(
item
,
item
);
item
.
setMonDtlItem
(
"实发薪水"
);
payScaleInfoMap
.
put
(
time
,
item
);
item
.
setDrpTitleCode
(
titleMap
.
get
(
item
.
getDrpTitleCode
()));
item
.
setMonDtlType
(
dtlTypeMap
.
get
(
item
.
getMonDtlType
()));
}
}
//修改金钱格式
for
(
PayScaleInfo
item
:
payScaleInfoListAll
){
item
.
setMonDtlRAmount
(
CommonUtil
.
doubleFormat
(
item
.
getMonDtlRAmount
(),
2
));
}
List
<
PayScaleInfo
>
resultList
=
new
ArrayList
<>(
payScaleInfoMap
.
values
());
// 加入临时薪资表的数据
List
<
AgAclLifePractitionerSalary
>
list
=
practitionerSalaryMapper
.
queryListByPractitionerId
(
practitionerId
);
List
<
AgAclLifePractitionerSalary
>
list
=
practitionerSalaryMapper
.
queryListByPractitionerId
(
practitionerId
);
responseVO
.
setList
(
list
);
translateObj
(
list
,
resultList
);
// if(!Strings.isNullOrEmpty(practitionerIdEG)){
// 排序
// List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG);
resultList
.
sort
(
Comparator
.
comparingLong
(
PayScaleInfo
::
getMonDtlPeriod
).
reversed
());
// if(!payScaleInfoListAll.isEmpty()){
responseVO
.
setPayScaleInfos
(
resultList
);
// Map<String,String> dtlTypeMap = new HashMap<>();
}
// Map<String,String> titleMap = new HashMap<>();
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
// List<OptionsEGolden> optionsEGoldenList = mdDropOptionsDALService.findByMasterIdsE(Collections.singletonList(101));
}
else
{
// optionsEGoldenList.forEach(i->dtlTypeMap.put(i.getOptAttr(),i.getOptName()));
String
[]
params
=
{
"practitionerIdEG, practitionerId"
};
// List<OptionsEGolden> titleList = mdDropOptionsDALService.findAllTitleEG();
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"610002"
,
params
)));
// titleList.forEach(i->titleMap.put(i.getTitleCode(),i.getTitleName()));
}
// Map<Integer,PayScaleInfo> payScaleInfoMap = new HashMap<>();
// PayScaleInfo payScaleInfo;
// Integer time;
// for(PayScaleInfo item : payScaleInfoListAll){
// time = item.getMonDtlPeriod();
// if(payScaleInfoMap.containsKey(time)){
// payScaleInfo = payScaleInfoMap.get(time);
// calculateRAmount(payScaleInfo,item);
// }else{
// calculateRAmount(item,item);
// item.setMonDtlItem("实发薪水");
// payScaleInfoMap.put(time,item);
// item.setDrpTitleCode(titleMap.get(item.getDrpTitleCode()));
// item.setMonDtlType(dtlTypeMap.get(item.getMonDtlType()));
//
// }
// }
// //修改金钱格式
// for(PayScaleInfo item : payScaleInfoListAll){
// item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
// }
// List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values());
// resultList.sort(Comparator.comparingInt(PayScaleInfo :: getMonDtlPeriod).reversed());
// responseVO.setPayScaleInfos(resultList);
// }
// responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
// }else{
// String[] params = {"practitionerIdEG"};
// responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610002", params)));
// }
return
responseVO
;
return
responseVO
;
}
}
private
void
translateObj
(
List
<
AgAclLifePractitionerSalary
>
list
,
List
<
PayScaleInfo
>
resultList
)
{
PayScaleInfo
payScaleInfo
;
for
(
AgAclLifePractitionerSalary
salary
:
list
)
{
payScaleInfo
=
new
PayScaleInfo
();
payScaleInfo
.
setMonShId
(
salary
.
getId
());
payScaleInfo
.
setPdfOssPath
(
salary
.
getPdfOssPath
());
payScaleInfo
.
setMonDtlPeriod
(
Long
.
valueOf
(
salary
.
getYearMonth
()));
payScaleInfo
.
setMonDtlAmount
(
salary
.
getPayableAmount
().
doubleValue
());
payScaleInfo
.
setMonDtlRAmount
(
salary
.
getNetAmount
().
doubleValue
());
resultList
.
add
(
payScaleInfo
);
}
}
@Override
@Override
public
PayScalePdfResponseVO
payScalePdf
(
PayScalePdfRequestVO
requestVO
)
{
public
PayScalePdfResponseVO
payScalePdf
(
PayScalePdfRequestVO
requestVO
)
{
PayScalePdfResponseVO
responseVO
=
new
PayScalePdfResponseVO
();
PayScalePdfResponseVO
responseVO
=
new
PayScalePdfResponseVO
();
...
@@ -452,8 +469,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
...
@@ -452,8 +469,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private
void
calculateRAmount
(
PayScaleInfo
payScaleInfoMain
,
PayScaleInfo
payScaleInfoElse
)
{
private
void
calculateRAmount
(
PayScaleInfo
payScaleInfoMain
,
PayScaleInfo
payScaleInfoElse
)
{
if
(
payScaleInfoMain
!=
null
&&
payScaleInfoElse
!=
null
){
if
(
payScaleInfoMain
!=
null
&&
payScaleInfoElse
!=
null
){
Integer
shIdMain
=
payScaleInfoMain
.
getMonShId
();
Long
shIdMain
=
payScaleInfoMain
.
getMonShId
();
Integer
shIdElse
=
payScaleInfoElse
.
getMonShId
();
Long
shIdElse
=
payScaleInfoElse
.
getMonShId
();
Double
all
=
payScaleInfoMain
.
getMonDtlRAmount
();
Double
all
=
payScaleInfoMain
.
getMonDtlRAmount
();
double
allA
=
(
shIdMain
.
equals
(
shIdElse
))?
0
D
:
payScaleInfoMain
.
getMonDtlAmount
();
double
allA
=
(
shIdMain
.
equals
(
shIdElse
))?
0
D
:
payScaleInfoMain
.
getMonDtlAmount
();
Double
temp
=
payScaleInfoElse
.
getMonDtlAmount
();
Double
temp
=
payScaleInfoElse
.
getMonDtlAmount
();
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/payscale/PayScaleInfo.java
View file @
1b8c4d62
package
com
.
yd
.
api
.
practitioner
.
vo
.
payscale
;
package
com
.
yd
.
api
.
practitioner
.
vo
.
payscale
;
public
class
PayScaleInfo
{
public
class
PayScaleInfo
{
private
Integer
monShId
;
private
Long
monShId
;
private
String
salMstId
;
private
String
salMstId
;
private
String
drpTitleCode
;
private
String
drpTitleCode
;
private
String
monDtlType
;
private
String
monDtlType
;
private
String
monDtlItem
;
private
String
monDtlItem
;
private
Integer
monDtlPeriod
;
private
Long
monDtlPeriod
;
private
Double
monDtlAmount
;
private
Double
monDtlAmount
;
private
Double
monDtlRAmount
;
private
Double
monDtlRAmount
;
private
String
createDate
;
private
String
createDate
;
private
String
createUser
;
private
String
createUser
;
private
String
pdfOssPath
;
public
Integer
getMonShId
()
{
public
Long
getMonShId
()
{
return
monShId
;
return
monShId
;
}
}
public
void
setMonShId
(
Integer
monShId
)
{
public
void
setMonShId
(
Long
monShId
)
{
this
.
monShId
=
monShId
;
this
.
monShId
=
monShId
;
}
}
...
@@ -84,11 +85,19 @@ public class PayScaleInfo {
...
@@ -84,11 +85,19 @@ public class PayScaleInfo {
this
.
createUser
=
createUser
;
this
.
createUser
=
createUser
;
}
}
public
Integer
getMonDtlPeriod
()
{
public
Long
getMonDtlPeriod
()
{
return
monDtlPeriod
;
return
monDtlPeriod
;
}
}
public
void
setMonDtlPeriod
(
Integer
monDtlPeriod
)
{
public
void
setMonDtlPeriod
(
Long
monDtlPeriod
)
{
this
.
monDtlPeriod
=
monDtlPeriod
;
this
.
monDtlPeriod
=
monDtlPeriod
;
}
}
public
String
getPdfOssPath
()
{
return
pdfOssPath
;
}
public
void
setPdfOssPath
(
String
pdfOssPath
)
{
this
.
pdfOssPath
=
pdfOssPath
;
}
}
}
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