Commit 58bf543e authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents d8a8dc09 8668b87d
......@@ -13,8 +13,8 @@ import java.util.concurrent.TimeUnit;
public class YFSocialImportThreadPoolExecutor extends ThreadPoolExecutor {
private static final int CORE_POOL_SIZE = 8;
private static final int MAX_POOL_SIZE = 12;
private static final int CORE_POOL_SIZE = 30;
private static final int MAX_POOL_SIZE = 30;
private static final long KEEP_ALIVE_TIME = 15;
private static final int CAPACITY = 1024;
......
......@@ -149,7 +149,7 @@ public class TPaymentInfoController {
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) {
return tPaymentInfoService.importSocialDiy(file.getInputStream(), random);
return tPaymentInfoService.importSocialDiy(file.getInputStream());
}
/**
......
......@@ -49,7 +49,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param inputStream
* @return
*/
R<List<ErrorMessage>> importSocialDiy(InputStream inputStream, String random);
R<List<ErrorMessage>> importSocialDiy(InputStream inputStream);
/**
* 批量新增缴费库-合肥三险
......
......@@ -399,9 +399,22 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public R<List<ErrorMessage>> importSocialDiy(InputStream inputStream, String random) {
public R<List<ErrorMessage>> importSocialDiy(InputStream inputStream) {
YifuUser user = SecurityUtils.getUser();
List<ErrorMessage> errorMessageList = new ArrayList<>();
//养老
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
//大病救助金
ConcurrentHashMap<String, BigDecimal> bigMoneyMap = new ConcurrentHashMap<>();
//失业
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap = new ConcurrentHashMap<>();
//生育
ConcurrentHashMap<String, BigDecimal> birMoneyMap = new ConcurrentHashMap<>();
//工伤
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap = new ConcurrentHashMap<>();
//医保
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap = new ConcurrentHashMap<>();
ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
......@@ -449,7 +462,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialInfo(cachedDataList, errorMessageList, user, rowNumber);
importTPaymentSocialInfo(cachedDataList, errorMessageList, user, rowNumber,pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,birMoneyMap,injuryMoneyMap,medicalMoneyMap);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -457,11 +471,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
pensionMoneyMap.clear();
bigMoneyMap.clear();
unEmpMoneyMap.clear();
birMoneyMap.clear();
injuryMoneyMap.clear();
medicalMoneyMap.clear();
return R.ok(errorMessageList);
}
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList,
YifuUser user, Integer rowNumber) {
YifuUser user, Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> birMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
......@@ -620,6 +646,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
}
redisUtil.set(importSuccessKey, maerialRatio, 360L);
......@@ -631,7 +658,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList), yfSocialImportThreadPoolExecutor);
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
}
......@@ -644,7 +672,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, finalList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList), yfSocialImportThreadPoolExecutor);
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
lastIdx = 1;
......@@ -658,7 +687,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList), yfSocialImportThreadPoolExecutor);
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
tempList = new ArrayList<>();
}
}
......@@ -682,7 +712,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList), yfSocialImportThreadPoolExecutor);
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
}
// 阻塞当前线程,等待所有的线程执行完毕
......@@ -756,7 +787,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
List<ErrorMessage> errorMessageList) {
List<ErrorMessage> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> birMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo;
TSocialFundInfo socialInfo;
......@@ -764,19 +801,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String temp;
int res;
//养老
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
//大病救助金
ConcurrentHashMap<String, BigDecimal> bigMoneyMap = new ConcurrentHashMap<>();
//失业
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap = new ConcurrentHashMap<>();
//生育
ConcurrentHashMap<String, BigDecimal> birMoneyMap = new ConcurrentHashMap<>();
//工伤
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap = new ConcurrentHashMap<>();
//医保
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap = new ConcurrentHashMap<>();
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
......@@ -1165,6 +1189,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
YifuUser user = SecurityUtils.getUser();
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TPaymentHeFeiVo> util1 = new ExcelUtil<>(TPaymentHeFeiVo.class);
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, BigDecimal> bigMoneyMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap = new ConcurrentHashMap<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
......@@ -1211,7 +1240,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialHeFei(cachedDataList, errorMessageList, user, type, rowNumber);
importTPaymentSocialHeFei(cachedDataList, errorMessageList, user, type, rowNumber,pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -1219,6 +1249,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
pensionMoneyMap.clear();
bigMoneyMap.clear();
unEmpMoneyMap.clear();
injuryMoneyMap.clear();
medicalMoneyMap.clear();
return R.ok(errorMessageList);
}
......@@ -1381,12 +1416,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ "的公积金数据(请查验公积金缴纳地)!"));
continue;
}
//查看是否有操作对应主体的权限
if (!Common.isNotNull(infoVo.getProvidentPayMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() +
CommonConstants.DOWN_LINE_STRING + "必填项校验失败:公积金缴纳月份不可为空!"));
continue;
}
//计算公积金合计,个人金额和单位金额一致
infoVo.setProvidentSum(BigDecimalUtils.safeAdd(infoVo.getUnitProvidentSum(), infoVo.getUnitProvidentSum()));
// 判重
......@@ -1491,7 +1520,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
private void importTPaymentSocialHeFei(List<TPaymentHeFeiVo> list, List<ErrorMessage> errorMessageList,
YifuUser user, String type, Integer rowNumber) {
YifuUser user, String type, Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
......@@ -1644,7 +1678,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
paymentInfoBigMap, type, errorMessageList),
paymentInfoBigMap, type, errorMessageList,pensionMoneyMap, bigMoneyMap,
unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap),
yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
}
......@@ -1658,7 +1693,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
-> executeImportSocialListThree(user, finalList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap, type,
errorMessageList), yfSocialImportThreadPoolExecutor);
errorMessageList,pensionMoneyMap, bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,
medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(oneCompletableFuture);
lastIdx = 1;
for (int i = 1; i < list.size(); i++) {
......@@ -1671,7 +1707,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
-> executeImportSocialListThree(user, finalTempList1
, areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap,
paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap, type,
errorMessageList), yfSocialImportThreadPoolExecutor);
errorMessageList,pensionMoneyMap, bigMoneyMap,unEmpMoneyMap,
injuryMoneyMap,medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
tempList = new ArrayList<>();
}
......@@ -1695,7 +1732,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, finalTempList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap, type, errorMessageList)
paymentInfoInjuryMap, paymentInfoBigMap, type, errorMessageList,pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap)
, yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
}
......@@ -1727,7 +1765,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
String type, List<ErrorMessage> errorMessageList) {
String type, List<ErrorMessage> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
if (Common.isNotNull(list)) {
TPaymentInfo payExists;
TSocialFundInfo socialInfo = null;
......@@ -1751,6 +1794,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String[] areaArray;
String exitMoney;
for (TPaymentHeFeiVo infoVo : list) {
if (Common.isNotNull(infoVo.getEmpIdcard())) {
......@@ -1786,14 +1830,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
//查看缴纳月是否为空
if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "必填项校验失败:社保缴纳月份不可为空!"));
//判断是否存在养老缴费数据
if (PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())) {
//导入模板判重 养老
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(socialInfo.getSettleDomainCode()).concat(SocialConstants.YL));
if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getUnitMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的养老缴费数据"));
continue;
} else {
pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())));
}
//判断是否存在养老缴费数据
if (PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())) {
payExists = paymentInfoPensionMap.get(infoVo.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getEmpIdcard().trim()
......@@ -1817,6 +1868,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在失业缴费数据
if (PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType())) {
//导入模板判重 失业
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(socialInfo.getSettleDomainCode()).concat(SocialConstants.SY));
if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的失业缴费数据"));
continue;
} else {
unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney())));
}
payExists = paymentInfoUnEmpMap.get(infoVo.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getEmpIdcard().trim()
......@@ -1840,6 +1905,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医保缴费数据
if (CommonConstants.ONE_STRING.equals(type)) {
//导入模板判重 医疗
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(socialInfo.getSettleDomainCode()).concat(SocialConstants.YB));
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的医保缴费数据"));
continue;
} else {
medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())));
}
payExists = paymentInfoMedicalMap.get(infoVo.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getEmpIdcard().trim()
......@@ -1864,6 +1943,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在工伤缴费数据
if (PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())) {
//导入模板判重 工伤
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(socialInfo.getSettleDomainCode()).concat(SocialConstants.GS));
if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())),
injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的工伤缴费数据"));
continue;
} else {
injuryMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())));
}
payExists = paymentInfoInjuryMap.get(infoVo.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getEmpIdcard().trim()
......@@ -1887,6 +1981,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医疗救助金缴费数据
if (CommonConstants.ONE_STRING.equals(type)) {
//导入模板判重 医疗救助金
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(socialInfo.getSettleDomainCode()).concat(SocialConstants.DB));
if (bigMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())),
bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的医疗救助金缴费数据"));
continue;
} else {
bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())));
}
payExists = paymentInfoBigMap.get(infoVo.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getEmpIdcard().trim()
......
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