Commit 4b11e2b8 authored by huyuchen's avatar huyuchen

ekp推送接口修改

parent c6bc6479
......@@ -730,7 +730,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String[] areaArray;
String checkRes;
for (TPaymentInfoVo infoVo : list) {
atomicLine.incrementAndGet();
......@@ -775,12 +774,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)"));
continue;
}
//如果导入项目数大于办理成功项目数给提示,少于给进,有问题自行删除后导入
checkRes = checkRepeatInfo(socialInfo, infoVo);
if (null != checkRes) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), checkRes));
continue;
}
//查看缴纳月是否为空
if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
......@@ -1045,60 +1038,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return errorMessageList;
}
private String concatStr(String socialType) {
return "存在未办理成功的险种:" + socialType + ",请办理成功后,再行导入!";
}
/**
* 验证部分办理失败的导入是否有超出部分的数据导入
*
* @param socialInfo
* @param infoVo
* @return
* @Author fxj
* @Date 2021-06-21
**/
private String checkRepeatInfo(TSocialFundInfo socialInfo, TPaymentInfoVo infoVo) {
if (checkHandleMoney(socialInfo.getPensionHandle(),
infoVo.getUnitPensionMoney(), infoVo.getPersonalPensionMoney())) {
return concatStr("养老");
}
if (checkHandleMoney(socialInfo.getMedicalHandle(),
infoVo.getUnitMedicalMoney(), infoVo.getPersonalMedicalMoney())) {
return concatStr("医疗");
}
if (checkHandleMoney(socialInfo.getUnemployHandle(),
infoVo.getUnitUnemploymentMoney(), infoVo.getPersonalUnemploymentMoney())) {
return concatStr("失业");
}
if (checkHandleMoney(socialInfo.getWorkInjuryHandle(),
infoVo.getUnitInjuryMoney(), BigDecimal.ZERO)) {
return concatStr("工伤");
}
if (checkHandleMoney(socialInfo.getBirthHandle(),
infoVo.getUnitBirthMoney(), BigDecimal.ZERO)) {
return concatStr("生育");
}
if (CommonConstants.ONE_STRING.equals(socialInfo.getIsIllness()) &&
(Common.isBlankToBigDecimalZero(infoVo.getUnitBigmailmentMoney()).compareTo(
BigDecimal.ZERO) > CommonConstants.ZERO_INT ||
Common.isBlankToBigDecimalZero(infoVo.getPersonalBigmailmentMoney()).compareTo(
BigDecimal.ZERO) > CommonConstants.ZERO_INT)) {
return "无大病,无需导入大病!";
}
if (checkHandleMoney(socialInfo.getBigailmentHandle(),
infoVo.getUnitBigmailmentMoney(), infoVo.getPersonalBigmailmentMoney())) {
return concatStr("大病");
}
return null;
}
private boolean checkHandleMoney(String handleStatus, BigDecimal unitMoney, BigDecimal personalMoney) {
return CommonConstants.TWO_STRING.equals(handleStatus) &&
(Common.isBlankToBigDecimalZero(unitMoney).compareTo(BigDecimal.ZERO) > CommonConstants.ZERO_INT ||
Common.isBlankToBigDecimalZero(personalMoney).compareTo(BigDecimal.ZERO) > CommonConstants.ZERO_INT);
}
/**
* 拼接排序字段并插入
*
......@@ -1728,7 +1667,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String[] areaArray;
String checkRes;
for (TPaymentHeFeiVo infoVo : list) {
atomicLine.incrementAndGet();
......@@ -1765,12 +1703,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
"的社保数据(请查验社保缴纳地)"));
continue;
}
//如果导入项目数大于办理成功项目数给提示,少于给进,有问题自行删除后导入
checkRes = checkRepeatInfoThree(socialInfo, infoVo, type);
if (null != checkRes) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), checkRes));
continue;
}
//查看缴纳月是否为空
if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
......@@ -2068,46 +2000,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return s;
}
/**
* 验证部分办理失败的导入是否有超出部分的数据导入
*
* @param socialInfo
* @param infoVo
* @return
* @Author huyc
* @Date 2022-07-27
**/
private String checkRepeatInfoThree(TSocialFundInfo socialInfo, TPaymentHeFeiVo infoVo, String type) {
if (CommonConstants.ZERO_STRING.equals(type)) {
if (PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())
&& checkHandleMoney(socialInfo.getPensionHandle(),
infoVo.getUnitMoney(), infoVo.getPersonalMoney())) {
return concatStr(PaymentConstants.PENSION);
}
if (PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType())
&& checkHandleMoney(socialInfo.getUnemployHandle(),
infoVo.getUnitMoney(), infoVo.getPersonalMoney())) {
return concatStr(PaymentConstants.UNEMPLOYEEMENT);
}
if (PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())
&& checkHandleMoney(socialInfo.getWorkInjuryHandle(),
infoVo.getUnitMoney(), infoVo.getPersonalMoney())) {
return concatStr(PaymentConstants.INJURY);
}
} else if (CommonConstants.ONE_STRING.equals(type)) {
if (checkHandleMoney(socialInfo.getMedicalHandle(),
infoVo.getUnitMedicalMoney(), infoVo.getPersonalMedicalMoney())) {
return concatStr(PaymentConstants.MEDICAL);
}
if (CommonConstants.ONE_STRING.equals(socialInfo.getIsIllness()) &&
(BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()).compareTo(
BigDecimal.ZERO) != CommonConstants.ZERO_INT)) {
return "无大病,无需导入大病!";
}
}
return null;
}
//比对缴纳地是否一致
private TSocialFundInfo checkAddress(String[] areaArray, HashMap<String, String> areaMap, TSocialFundInfo s) {
if (null == areaArray || null == areaMap || null == s) {
......
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