Commit f1880701 by jianan

薪资单-历史薪资

parent 3767368a
......@@ -377,8 +377,10 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
List<PayScaleInfo> listFromN22 = null;
List<PayScaleInfo> historyEG = null;
try {
listFromN22 = this.queryPayScaleListFromN22(requestVO);
// 查询全部才需要执行
if ("0".equals(isHistory)) {
listFromN22 = this.queryPayScaleListFromN22(requestVO);
}
// 查询历史才需要执行
if ("1".equals(isHistory)) {
historyEG = this.historyEG(requestVO);
}
......@@ -508,45 +510,10 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
}
private List<PayScaleInfo> historyEG(PayScaleQueryRequestVO requestVO) {
String practitionerIdEG = requestVO.getPractitionerIdEG();
Long practitionerId = requestVO.getPractitionerId();
Map<String,PayScaleInfo> payScaleInfoMap = new HashMap<>();
if(!Strings.isNullOrEmpty(practitionerIdEG)){
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()));
PayScaleInfo payScaleInfo;
String 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()));
Long practitionerId = requestVO.getPractitionerId();
}
}
//修改金钱格式
for(PayScaleInfo item : payScaleInfoListAll){
item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
}
}
}
List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values());
List<PayScaleInfo> resultList = aclPractitionerDALService.queryEGHistorySalaryPDFByPractitionerId(practitionerId);
// 加入临时薪资表的数据
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerId(practitionerId);
......@@ -590,14 +557,16 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
payScaleInfo.setMonDtlAmount(salary.getPayableAmount().doubleValue());
payScaleInfo.setMonDtlRAmount(salary.getNetAmount().doubleValue());
if (StringUtils.isNotBlank(payScaleInfo.getMonDtlPeriod())) {
time = payScaleInfo.getMonDtlPeriod();
payScaleInfo.setYears(time.substring(0, 4));
payScaleInfo.setMonth(time.substring(4));
}
resultList.add(payScaleInfo);
}
for (PayScaleInfo info : resultList) {
if (StringUtils.isNotBlank(info.getMonDtlPeriod())) {
time = info.getMonDtlPeriod();
info.setYears(time.substring(0, 4));
info.setMonth(time.substring(4));
}
}
}
@Override
......
......@@ -6,7 +6,7 @@ public class PayScaleQueryRequestVO {
private Long practitionerId;
/**
* 0-查本年 1-查全部
* 0-查本年 1-查历史
*/
private String isHistory;
......
......@@ -86,4 +86,6 @@ public interface AclPractitionerMapper {
List<PractitionerInfo> findPractitionerInfoByNameList(List<String> nameList);
List<PractitionerInfo> findPractitionerInfoByMobileList(List<String> mobileList);
List<PayScaleInfo> queryEGHistorySalaryPDFByPractitionerId(Long practitionerId);
}
\ No newline at end of file
......@@ -207,4 +207,6 @@ public interface AclPractitionerDALService {
List<PractitionerInfo> findPractitionerInfoByNameList(List<String> nameList);
List<PractitionerInfo> findPractitionerInfoByMobileList(List<String> mobileList);
List<PayScaleInfo> queryEGHistorySalaryPDFByPractitionerId(Long practitionerId);
}
......@@ -226,4 +226,9 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public List<PractitionerInfo> findPractitionerInfoByMobileList(List<String> mobileList) {
return aclPractitionerMapper.findPractitionerInfoByMobileList(mobileList);
}
@Override
public List<PayScaleInfo> queryEGHistorySalaryPDFByPractitionerId(Long practitionerId) {
return aclPractitionerMapper.queryEGHistorySalaryPDFByPractitionerId(practitionerId);
}
}
......@@ -1807,4 +1807,24 @@
and p.is_active = 1
</select>
<select id="queryEGHistorySalaryPDFByPractitionerId" resultType="com.yd.api.practitioner.vo.payscale.PayScaleInfo">
select p.id,
f.file_path pdfOssPath,
f.yearMonth monDtlPeriod,
o.drop_option_name drpTitleCode,
'实发薪水' monDtlItem
from (select f.file_name, f.file_path,
SUBSTRING(f.file_name ,8 ,6) yearMonth,
SUBSTRING(f.file_name ,15 ,9) practitionerCode
from ag_acl_file_upload f where f.target_no = 'payScale'
) f
left join ag_acl_practitioner p on p.practitioner_code = f.practitionerCode
left join ag_acl_practitioner_subordinate_system sys on p.subordinate_system_id = sys.id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
left join ag_md_drop_options o on s.practitioner_level = o.id
where p.id = #{practitionerId}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment