Commit 043039b6 by jianan

注释N22薪资单列表

parent b58d8550
...@@ -362,105 +362,105 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -362,105 +362,105 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
Map<Long,PayScaleInfo> payScaleInfoMap = new HashMap<>(); Map<Long,PayScaleInfo> payScaleInfoMap = new HashMap<>();
String mobileNo = aclPractitionerDALService.findMobileNoByPractitionerId(practitionerId); // String mobileNo = aclPractitionerDALService.findMobileNoByPractitionerId(practitionerId);
String n22LoginName = n22StaffService.queryN22LoginNameByMobileNo(mobileNo); // String n22LoginName = n22StaffService.queryN22LoginNameByMobileNo(mobileNo);
if (n22LoginName == null) { // if (n22LoginName == null) {
responseVO.setCommonResult(new CommonResult(false, "未查询到N22LoginName")); // responseVO.setCommonResult(new CommonResult(false, "未查询到N22LoginName"));
return responseVO; // return responseVO;
} // }
//
// 1.根据Agent_id当前经纪人的佣金明细 // // 1.根据Agent_id当前经纪人的佣金明细
SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody = new SalaryDetailsSearchRequestBody(); // SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody = new SalaryDetailsSearchRequestBody();
salaryDetailsSearchRequestBody.setLoginName(n22LoginName); // salaryDetailsSearchRequestBody.setLoginName(n22LoginName);
salaryDetailsSearchRequestBody.setSearchType("1"); // salaryDetailsSearchRequestBody.setSearchType("1");
SalaryDetailsSearchResponseVO salaryDetailsSearchResponseVO = n22SalaryService.salaryDetailsSearch(salaryDetailsSearchRequestBody); // SalaryDetailsSearchResponseVO salaryDetailsSearchResponseVO = n22SalaryService.salaryDetailsSearch(salaryDetailsSearchRequestBody);
//
if (!"查询成功".equals(salaryDetailsSearchResponseVO.getResponseHead().getMessage())){ // if (!"查询成功".equals(salaryDetailsSearchResponseVO.getResponseHead().getMessage())){
responseVO.setCommonResult(new CommonResult(false, "查询N22佣金明细列表错误")); // responseVO.setCommonResult(new CommonResult(false, "查询N22佣金明细列表错误"));
return responseVO; // return responseVO;
} // }
List<SalaryDetails> salaryDetailsList = salaryDetailsSearchResponseVO.getResponseBody().getSalaryDetailsLIST(); // List<SalaryDetails> salaryDetailsList = salaryDetailsSearchResponseVO.getResponseBody().getSalaryDetailsLIST();
//
// // list分组
// Map<String, List<SalaryDetails>> group = this.groupByCheckDate(salaryDetailsList);
//
// // 组装返回参数
// List<PayScaleInfo> resultList = new ArrayList<>();
// // 应发佣金
// Double monDtlAmount = 0D;
// // 应发佣金
// Double monDtlRAmount = 0D;
// for (String key : group.keySet()) {
//
// System.out.println("Key = " + key);
//
// List<SalaryDetails> list = group.get(key);
// if (CollectionUtils.isNotEmpty(list)) {
// monDtlAmount = list.get(0).getSumcommission();
// monDtlRAmount = list.get(0).getTax_free_comis();
// }
//
// PayScaleInfo payScaleInfo = new PayScaleInfo();
// payScaleInfo.setMonDtlAmount(monDtlAmount);
// payScaleInfo.setMonDtlItem("实发薪水");
// payScaleInfo.setMonDtlRAmount(monDtlRAmount);
// payScaleInfo.setDrpTitleCode(list.get(0).getGrade());
// payScaleInfo.setMonDtlPeriod(Long.valueOf(key));
//
// resultList.add(payScaleInfo);
// }
//
// resultList.sort(Comparator.comparingLong(PayScaleInfo :: getMonDtlPeriod).reversed());
// responseVO.setPayScaleInfos(resultList);
//
// return responseVO;
// list分组
Map<String, List<SalaryDetails>> group = this.groupByCheckDate(salaryDetailsList);
// 组装返回参数 if(!Strings.isNullOrEmpty(practitionerIdEG)){
List<PayScaleInfo> resultList = new ArrayList<>(); List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG);
// 应发佣金 if(!payScaleInfoListAll.isEmpty()){
Double monDtlAmount = 0D; Map<String,String> dtlTypeMap = new HashMap<>();
// 应发佣金 Map<String,String> titleMap = new HashMap<>();
Double monDtlRAmount = 0D; List<OptionsEGolden> optionsEGoldenList = mdDropOptionsDALService.findByMasterIdsE(Collections.singletonList(101));
for (String key : group.keySet()) { 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;
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()));
System.out.println("Key = " + key); }
}
//修改金钱格式
for(PayScaleInfo item : payScaleInfoListAll){
item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
}
List<SalaryDetails> list = group.get(key);
if (CollectionUtils.isNotEmpty(list)) {
monDtlAmount = list.get(0).getSumcommission();
monDtlRAmount = list.get(0).getTax_free_comis();
} }
PayScaleInfo payScaleInfo = new PayScaleInfo();
payScaleInfo.setMonDtlAmount(monDtlAmount);
payScaleInfo.setMonDtlItem("实发薪水");
payScaleInfo.setMonDtlRAmount(monDtlRAmount);
payScaleInfo.setDrpTitleCode(list.get(0).getGrade());
payScaleInfo.setMonDtlPeriod(Long.valueOf(key));
resultList.add(payScaleInfo);
} }
List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values());
// 加入临时薪资表的数据
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerId(practitionerId);
translateObj(list, resultList);
// 排序
resultList.sort(Comparator.comparingLong(PayScaleInfo :: getMonDtlPeriod).reversed()); resultList.sort(Comparator.comparingLong(PayScaleInfo :: getMonDtlPeriod).reversed());
responseVO.setPayScaleInfos(resultList); responseVO.setPayScaleInfos(resultList);
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
return responseVO; return responseVO;
// 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;
// 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);
// translateObj(list, resultList);
//
// // 排序
// resultList.sort(Comparator.comparingLong(PayScaleInfo :: getMonDtlPeriod).reversed());
// responseVO.setPayScaleInfos(resultList);
//
// responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
// return responseVO;
} }
/** /**
......
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