Commit 5031a452 by jianan

薪资单-历史薪资排序,薪资状态

parent 1b285263
......@@ -391,9 +391,6 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
e.printStackTrace();
}
// 排序
resultList.sort(Comparator.comparing(PayScaleInfo :: getMonDtlPeriod).reversed());
responseVO.setPayScaleInfos(resultList);
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
......@@ -405,18 +402,41 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
Map<String, PayScaleInfo> map = new HashMap<>();
String yearMonth = "";
for (PayScaleInfo infoN22 : listN22) {
yearMonth = infoN22.getYears() + infoN22.getMonth();
map.put(yearMonth, infoN22);
}
String year = "";
String month = "";
for (PayScaleInfo infoEG : historyEG) {
yearMonth = infoEG.getYears() + infoEG.getMonth();
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 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, infoEG);
map.put(yearMonth, infoN22);
}
}
ArrayList<PayScaleInfo> resultList = new ArrayList<>(map.values());
// 排序
resultList.sort(Comparator.comparing(PayScaleInfo :: getMonDtlPeriod).reversed());
return new ArrayList<>(map.values());
return resultList;
}
private String getYearMonth(String year, String month) {
String yearMonth = "";
if (month.length() == 2) {
yearMonth = year + "-" + month;
} else if (month.length() == 1) {
yearMonth = year + "-0" + month;
}
return yearMonth;
}
private List<PayScaleInfo> queryPayScaleListFromN22(PayScaleQueryRequestVO requestVO) throws Exception {
......@@ -434,6 +454,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody = new SalaryDetailsSearchRequestBody();
salaryDetailsSearchRequestBody.setLoginName(staff.getAgent_id());
salaryDetailsSearchRequestBody.setSearchType("1");
salaryDetailsSearchRequestBody.setPaid_Status("3");
if ("0".equals(isHistory)) {
String beginDayOfYear = this.calculateDate(CommonUtil.getBeginDayOfYear());
String endDayOfYear = this.calculateDate(CommonUtil.getEndDayOfYear());
......@@ -692,7 +713,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
this.handleDateParams(salaryDetailsSearchRequestBody, requestVO);
salaryDetailsSearchRequestBody.setLoginName(requestVO.getAgent_id());
salaryDetailsSearchRequestBody.setSearchType("1");
salaryDetailsSearchRequestBody.setPaid_Status("");
salaryDetailsSearchRequestBody.setPaid_Status("3");
salaryDetailsSearchRequestBody.setCheckStatus("1");
SalaryDetailsSearchResponseVO salaryDetailsSearchResponseVO = n22SalaryService.salaryDetailsSearch(salaryDetailsSearchRequestBody);
......
......@@ -535,30 +535,31 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
}
private void disposalPractitionerInfo(PractitionerInfoForAchievement practitionerInfo, Map<Integer,PractitionerBasicInfo> practitionerBasicInfoMap, Integer time, Integer platform) {
private void disposalPractitionerInfo(PractitionerInfoForAchievement practitionerInfo, Map<Integer, PractitionerBasicInfo> practitionerBasicInfoMap, Integer time, Integer platform) {
Double fyc = practitionerInfo.getFyc();
PractitionerRankInfo practitionerRankInfo = null;
Double fycOther;
PractitionerBasicInfo practitionerBasicInfoYD = practitionerBasicInfoMap.get(1);
if(practitionerBasicInfoYD != null){
if (practitionerBasicInfoYD != null) {
String practitionerIdYD = practitionerBasicInfoYD.getPractitionerId();
if(!Strings.isNullOrEmpty(practitionerIdYD)){
if (!Strings.isNullOrEmpty(practitionerIdYD)) {
Long practitionerId = Long.parseLong(practitionerIdYD);
if(platform == 1){
if (platform == 1) {
PractitionerBasicInfo practitionerBasicInfoEG = practitionerBasicInfoMap.get(2);
if(practitionerBasicInfoEG != null){
if (practitionerBasicInfoEG != null) {
String practitionerIdEG = practitionerBasicInfoEG.getPractitionerId();
if(!Strings.isNullOrEmpty(practitionerIdEG)){
practitionerRankInfo = aclPractitionerDALService.getPractitionerRankInfoByPractitionerIdEG(practitionerIdEG,time);
if (!Strings.isNullOrEmpty(practitionerIdEG)) {
// practitionerRankInfo = aclPractitionerDALService.getPractitionerRankInfoByPractitionerIdEG(practitionerIdEG, time);
}
}
}else{
practitionerRankInfo = aclPractitionerDALService.getPractitionerRankInfoByPractitionerIdYD(practitionerId,time);
} else {
practitionerRankInfo = aclPractitionerDALService.getPractitionerRankInfoByPractitionerIdYD(practitionerId, time);
}
fycOther = practitionerRankInfo != null ? practitionerRankInfo.getFyc() : 0D;
Double fycSum = CommonUtil.doubleFormat(fyc+fycOther,2);
if(fycSum != 0){
Double completeRate = getCompletionRate(practitionerId,null,fycSum,time);
Double fycSum = CommonUtil.doubleFormat(fyc + fycOther, 2);
if (fycSum != 0) {
Double completeRate = getCompletionRate(practitionerId, null, fycSum, time);
practitionerInfo.setCompletionRate(completeRate);
}
}
......
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