Commit 48ed1f97 authored by huyuchen's avatar huyuchen

实缴导入校验项目

parent ab1c348b
......@@ -1261,9 +1261,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
if (Common.isNotNull(domain)) {
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageMap.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(socialInfo.getSettleDomain());
paymentInfo.setSettleDomainName(socialInfo.getSettleDomainName());
......@@ -1289,9 +1286,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setUnitId(domain.getCustomerId());
paymentInfo.setUnitName(domain.getCustomerName());
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageMap.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(tSocialInfo.getSettleDomainCode());
paymentInfo.setSettleDomainCode(tSocialInfo.getSettleDomain());
......@@ -1300,6 +1294,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSocialTown(tSocialInfo.getSocialTown());
paymentInfo.setSocialHousehold(tSocialInfo.getSocialHouseholdName());
}
// 项目信息校验
String erroeInfo = settleInfoCheck(paymentInfo);
if (!Common.isEmpty(erroeInfo)){
errorMessageMap.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(),
CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(),
paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "该人员归属的" + erroeInfo + "信息缺失,将导致后续无法结算,请联系卢名旭处理"));
continue;
}
if (Common.isNotNull(tSocialInfo)) {
paymentInfo.setInauguralTeam(tSocialInfo.getInauguralTeam());
paymentInfo.setEmpNo(tSocialInfo.getEmpNo());
......@@ -1759,9 +1761,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
if (Common.isNotNull(domain)) {
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(fund.getSettleDomainFund());
paymentInfo.setSettleDomainName(fund.getSettleDomainNameFund());
......@@ -1787,9 +1786,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setUnitId(domain.getCustomerId());
paymentInfo.setUnitName(domain.getCustomerName());
paymentInfo.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
paymentInfo.setSettleDomainId(tProvidentFund.getSettleDomain());
paymentInfo.setSettleDomainCode(tProvidentFund.getSettleDomainCode());
......@@ -1798,6 +1794,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setFundTown(tProvidentFund.getFundTown());
paymentInfo.setProvidentHousehold(tProvidentFund.getProvidentHouseholdName());
}
// 项目信息校验
String erroeInfo = settleInfoCheck(paymentInfo);
if (!Common.isEmpty(erroeInfo)){
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(),
CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(),
paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "该人员归属的" + erroeInfo + "信息缺失,将导致后续无法结算,请联系卢名旭处理"));
continue;
}
if (Common.isNotNull(tProvidentFund)) {
paymentInfo.setInauguralTeam(Common.isNotNull(tProvidentFund.getInauguralTeam()) ? tProvidentFund.getInauguralTeam(): "");
paymentInfo.setEmpNo(tProvidentFund.getEmpNo());
......@@ -2428,9 +2432,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
if (Common.isNotNull(domain)) {
payExists.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
payExists.setSettleDomainId(socialInfo.getSettleDomain());
payExists.setSettleDomainCode(Common.isNotNull(socialInfo.getSettleDomainCode()) ? socialInfo.getSettleDomainCode(): "");
......@@ -2450,22 +2451,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} else {
domain = null;
}
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
payExists.setSettleDomainCode(tSocialInfo.getSettleDomainCode());
if (Common.isNotNull(domain)) {
payExists.setSettleDomainName(domain.getDepartName());
payExists.setUnitId(domain.getCustomerId());
payExists.setUnitName(domain.getCustomerName());
payExists.setBpoFlag(domain.getBpoFlag());
} else {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "未找到对应的项目信息,请核实"));
continue;
}
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
payExists.setSettleDomainCode(tSocialInfo.getSettleDomainCode());
payExists.setSocialProvince(tSocialInfo.getSocialProvince());
payExists.setSocialCity(tSocialInfo.getSocialCity());
payExists.setSocialTown(tSocialInfo.getSocialTown());
payExists.setSocialHousehold(tSocialInfo.getSocialHouseholdName());
}
// 项目信息校验
String erroeInfo = settleInfoCheck(payExists);
if (!Common.isEmpty(erroeInfo)){
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(),
CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(),
payExists.getProvidentHousehold(), infoVo.getEmpName(), "该人员归属的" + erroeInfo + "信息缺失,将导致后续无法结算,请联系卢名旭处理"));
continue;
}
if (Common.isNotNull(tSocialInfo)) {
payExists.setInauguralTeam(Common.isNotNull(tSocialInfo.getInauguralTeam()) ? tSocialInfo.getInauguralTeam(): "");
payExists.setEmpNo(tSocialInfo.getEmpNo());
......@@ -3798,4 +3804,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
// hgw2023-1-6 10:44:31以上,B端相关
//项目信息校验
private String settleInfoCheck(TPaymentInfo payExists) {
StringBuilder errorInfo = new StringBuilder();
if (Common.isEmpty(payExists.getSettleDomainName())) {
errorInfo.append("项目名称、");
}
if (Common.isEmpty(payExists.getSettleDomainCode())) {
errorInfo.append("项目编码、");
}
if (Common.isEmpty(payExists.getBpoFlag())) {
errorInfo.append("是否BPO、");
}
if (errorInfo.toString().isEmpty()) {
return null;
}else {
return errorInfo.substring(0,errorInfo.length() - 1);
}
}
}
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