Commit 097f316a authored by fangxinjiang's avatar fangxinjiang

派单优化及限制项导入优化-fxj

parent ab597f07
......@@ -2222,7 +2222,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
if (Common.isEmpty(entity)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"项目编码配置不存在: " + excel.getDeptNo(),excel));
"项目编码不存在: " + excel.getDeptNo(),excel));
return;
}
//档案默认不限制
......@@ -2240,7 +2240,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
// 校验autoFlag的值必须为0或1
if (!CommonConstants.ZERO_STRING.equals(newAutoFlag) && !CommonConstants.ONE_STRING.equals(newAutoFlag)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"是否限制值不合法,必须为限制或不限制",excel));
"是否限制值不合法,必须为0或1",excel));
return;
}
......@@ -2249,7 +2249,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
!CommonConstants.ZERO_STRING.equals(newRestrictInsurance) &&
!CommonConstants.ONE_STRING.equals(newRestrictInsurance)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"商险限制值不合法,必须为限制或不限制",excel));
"商险限制值不合法,必须为0或1",excel));
return;
}
......@@ -2258,7 +2258,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
!CommonConstants.ZERO_STRING.equals(newRestrictContract) &&
!CommonConstants.ONE_STRING.equals(newRestrictContract)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"合同限制值不合法,必须为限制或不限制",excel));
"合同限制值不合法,必须为0或1",excel));
return;
}
......@@ -2267,7 +2267,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
!CommonConstants.ZERO_STRING.equals(newRestrictSocialFund) &&
!CommonConstants.ONE_STRING.equals(newRestrictSocialFund)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"社保公积金限制值不合法,必须为限制或不限制",excel));
"社保公积金限制值不合法,必须为0或1",excel));
return;
}
......@@ -2275,17 +2275,17 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
if (CommonConstants.ZERO_STRING.equals(newAutoFlag)) {
if (Common.isEmpty(newRestrictInsurance)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"是否限制为是时,商险不能为空",excel));
"是否限制为是时,限制商险不能为空",excel));
return;
}
if (Common.isEmpty(newRestrictContract)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"是否限制为是时,合同不能为空",excel));
"是否限制为是时,限制合同不能为空",excel));
return;
}
if (Common.isEmpty(newRestrictSocialFund)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"是否限制为是时,社保公积金不能为空",excel));
"是否限制为是时,限制社保公积金不能为空",excel));
return;
}
// 限制项至少有一项为限制(1)
......
......@@ -490,6 +490,11 @@ public interface ErrorCodes {
* 派增异常: 社保各项基数不一致,委托备注必填
*/
String EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR = "emp.dispatch.social.base.limit.error";
/**
* 派增异常: 社保各项基数与备案基数不一致,自定义类型 备案基数需要与各项基数一致(不含大病)
*/
String EMP_DISPATCH_SOCIAL_BASE_RECORD_ERROR = "emp.dispatch.social.base.record.error";
/**
* 派增异常: 社保各项起缴日不一致,委托备注必填
*/
......
......@@ -178,6 +178,8 @@ emp.dispatch.fund.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u516C\u79EF\u91D1\
emp.dispatch.social.base.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5907\u6848\u57FA\u6570\u4E0E\u793E\u4FDD\u4EFB\u610F\u57FA\u6570\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
emp.dispatch.social.base.record.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u5404\u9879\u57FA\u6570\u4E0E\u5907\u6848\u57FA\u6570\u4E0D\u4E00\u81F4\uFF0C\u81EA\u5B9A\u4E49\u7C7B\u578B \u5907\u6848\u57FA\u6570\u9700\u8981\u4E0E\u5404\u9879\u57FA\u6570\u4E00\u81F4\uFF08\u4E0D\u542B\u5927\u75C5\uFF09
emp.dispatch.social.date.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u9669\u79CD\u8D77\u7F34\u65E5\u671F\u4E0D\u4E00\u81F4\u65F6\uFF0C\u201C\u59D4\u6258\u5907\u6CE8\u201D\u5217\u5FC5\u586B\uFF0C\u4E0D\u53EF\u4E3A\u7A7A
emp.dispatch.social.date.limit.error2=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5408\u540C\u8D77\u59CB\u65E5\u671F\u4E0E\u793E\u4FDD\u8D77\u7F34\u65E5\u671F\u4E0D\u4E00\u81F4\u65F6\uFF0C\u201C\u59D4\u6258\u5907\u6CE8\u201D\u5217\u5FC5\u586B\uFF0C\u4E0D\u53EF\u4E3A\u7A7A
......
......@@ -2855,10 +2855,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
if (Common.isNotNull(excel.getSocialHousehold())) {
// 校验备案基数范围(不含大病)
if (validateRecordBaseRange(errorMessageList, excel, socialSet)) {
return true;
}
// 自定义 各项基数配置与备案基数不一致,就提示(不含大病)
if (CommonConstants.ONE_STRING.equals(excel.getPaymentType())) {
boolean flag = Common.isBlankToBigDecimalZero(excel.getPensionCardinal()).compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| Common.isBlankToBigDecimalZero(excel.getMedicalCardinal()).compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| Common.isBlankToBigDecimalZero(excel.getUnemploymentCardinal()).compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| Common.isBlankToBigDecimalZero(excel.getWorkInjuryCardinal()).compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT
|| Common.isBlankToBigDecimalZero(excel.getBirthCardinal()).compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT;
if (flag) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_RECORD_ERROR)));
return true;
}
}
// 根据缴纳类型赋值各险种基数(不含大病)
assignSocialCardinalByPaymentType(excel, socialSet);
// 各个社保基数和日期空 默认养老日期和基数(兜底逻辑,包含大病)
......@@ -3047,27 +3060,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if (Common.isNotNull(excel.getRecordBase()) && Common.isNotNull(excel.getSocialHousehold())) {
// 自定义 只要有一个不相同的 日期或基数 就要提示
/*if (CommonConstants.ONE_STRING.equals(excel.getPaymentType()) && Common.isEmpty(excel.getTrustRemark())) {
boolean flag = (Common.isNotNull(excel.getPensionCardinal())
&& excel.getPensionCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getMedicalCardinal())
&& excel.getMedicalCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getUnemploymentCardinal())
&& excel.getUnemploymentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getWorkInjuryCardinal())
&& excel.getWorkInjuryCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBirthCardinal())
&& excel.getBirthCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBigailmentCardinal())
&& CommonConstants.ONE_STRING.equals(socialSet.getCollectType())
&& CommonConstants.ONE_STRING.equals(socialSet.getValueType())
&& excel.getBigailmentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT);
if (flag) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true;
}
}*/
Date temp;
if (Common.isEmpty(empVo)) {
temp = excel.getContractStart();
......
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