Commit c64a443a by jianan

1.保单列表历史查询到去年最后一天

2.薪资单列表接口
parent bd3a59a7
......@@ -174,6 +174,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
} else if (Integer.valueOf("2") == time) {
startTime = CommonUtil.getBeginDayOfYear();
endTime = CommonUtil.getEndDayOfYear();
} else if (Integer.valueOf("4") == time) {
// 历史
endTime = CommonUtil.getSpecifiedDayBefore(CommonUtil.getBeginDayOfYear());
}
policyListQueryRequestBody.setStarttime(startTime);
......@@ -362,60 +365,6 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
Long practitionerId = requestVO.getPractitionerId();
Map<Long,PayScaleInfo> payScaleInfoMap = new HashMap<>();
// String mobileNo = aclPractitionerDALService.findMobileNoByPractitionerId(practitionerId);
// String n22LoginName = n22StaffService.queryN22LoginNameByMobileNo(mobileNo);
// if (n22LoginName == null) {
// responseVO.setCommonResult(new CommonResult(false, "未查询到N22LoginName"));
// return responseVO;
// }
//
// // 1.根据Agent_id当前经纪人的佣金明细
// SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody = new SalaryDetailsSearchRequestBody();
// salaryDetailsSearchRequestBody.setLoginName(n22LoginName);
// salaryDetailsSearchRequestBody.setSearchType("1");
// SalaryDetailsSearchResponseVO salaryDetailsSearchResponseVO = n22SalaryService.salaryDetailsSearch(salaryDetailsSearchRequestBody);
//
// if (!"查询成功".equals(salaryDetailsSearchResponseVO.getResponseHead().getMessage())){
// responseVO.setCommonResult(new CommonResult(false, "查询N22佣金明细列表错误"));
// return responseVO;
// }
// 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;
if(!Strings.isNullOrEmpty(practitionerIdEG)){
List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG);
if(!payScaleInfoListAll.isEmpty()){
......
......@@ -1596,4 +1596,37 @@ public class CommonUtil {
return dateParseString(c.getTime(), "yyyy-MM-dd");
}
/**
* 获得指定日期的前一天
*
* @param specifiedDay
* @return
* @throws Exception
*/
public static String getSpecifiedDayBefore(String specifiedDay) {
// SimpleDateFormat simpleDateFormat = new
// SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date date = null;
try {
date = new SimpleDateFormat("yy-MM-dd").parse(specifiedDay);
} catch (ParseException e) {
e.printStackTrace();
}
c.setTime(date);
int day = c.get(Calendar.DATE);
c.set(Calendar.DATE, day - 1);
String dayBefore = new SimpleDateFormat("yyyy-MM-dd").format(c.getTime());
return dayBefore;
}
}
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