Commit e51f17fc authored by huyuchen's avatar huyuchen

派单校验修改

parent 0f1f7abb
...@@ -608,7 +608,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -608,7 +608,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = lastIdx + 1; i < list.size(); i++) { for (int i = lastIdx + 1; i < list.size(); i++) {
tempList.add(list.get(i)); tempList.add(list.get(i));
} }
lastIdx += 1;
} }
List<TPaymentInfoVo> finalTempList = tempList; List<TPaymentInfoVo> finalTempList = tempList;
...@@ -698,7 +697,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -698,7 +697,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
List<ErrorMessage> errorMessageList) { List<ErrorMessage> errorMessageList) {
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo = null; TPaymentInfo paymentInfo;
TSocialFundInfo socialInfo; TSocialFundInfo socialInfo;
TSocialInfo tSocialInfo; TSocialInfo tSocialInfo;
String temp; String temp;
...@@ -782,7 +781,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -782,7 +781,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ infoVo.getSocialCreateMonth().trim() + infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.YL); + SocialConstants.YL);
}
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()),
...@@ -792,8 +791,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -792,8 +791,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} else { }
paymentInfo = null;
} }
//判断是否存在失业缴费数据 //判断是否存在失业缴费数据
...@@ -808,7 +806,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -808,7 +806,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ infoVo.getSocialCreateMonth().trim() + infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.SY); + SocialConstants.SY);
}
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()),
...@@ -818,8 +815,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -818,8 +815,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} else { }
paymentInfo = null;
} }
//判断是否存在医保缴费数据 //判断是否存在医保缴费数据
...@@ -834,7 +830,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -834,7 +830,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ infoVo.getSocialCreateMonth().trim() + infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.YB); + SocialConstants.YB);
}
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()),
...@@ -844,8 +840,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -844,8 +840,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} else { }
paymentInfo = null;
} }
//判断是否存在医疗救助金缴费数据 //判断是否存在医疗救助金缴费数据
...@@ -860,7 +855,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -860,7 +855,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ infoVo.getSocialCreateMonth().trim() + infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.DB); + SocialConstants.DB);
}
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()),
...@@ -870,8 +864,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -870,8 +864,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} else { }
paymentInfo = null;
} }
//判断是否存在工伤缴费数据 //判断是否存在工伤缴费数据
...@@ -885,15 +878,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -885,15 +878,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ infoVo.getSocialCreateMonth().trim() + infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.GS); + SocialConstants.GS);
}
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()), if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0) { BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} else { }
paymentInfo = null;
} }
//判断是否存在生育缴费数据 //判断是否存在生育缴费数据
...@@ -907,7 +898,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -907,7 +898,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ infoVo.getSocialCreateMonth().trim() + infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ SocialConstants.BIR); + SocialConstants.BIR);
}
//存在社保缴费数据 //存在社保缴费数据
if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()), if (null != paymentInfo && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0) { BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0) {
...@@ -915,6 +905,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -915,6 +905,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ "的单位生育缴费数据,请勿重复导入!")); + "的单位生育缴费数据,请勿重复导入!"));
continue; continue;
} }
}
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -936,8 +927,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -936,8 +927,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSocialProvince(socialInfo.getSocialProvince()); paymentInfo.setSocialProvince(socialInfo.getSocialProvince());
paymentInfo.setSocialCity(socialInfo.getSocialCity()); paymentInfo.setSocialCity(socialInfo.getSocialCity());
paymentInfo.setSocialTown(socialInfo.getSocialTown()); paymentInfo.setSocialTown(socialInfo.getSocialTown());
paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName()); paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName());
paymentInfo.setSocialPayMonth(infoVo.getSocialPayMonth()); paymentInfo.setSocialPayMonth(infoVo.getSocialPayMonth());
...@@ -1005,22 +994,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1005,22 +994,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSumAll(paymentInfo.getSocialSum()); paymentInfo.setSumAll(paymentInfo.getSocialSum());
paymentInfo.setCreateBy(user.getId()); paymentInfo.setCreateBy(user.getId());
paymentInfo.setCreateName(user.getNickname()); paymentInfo.setCreateName(user.getNickname());
if (Common.isEmpty(paymentInfo.getSocialId())) {
paymentInfo.setSocialId(UUID.randomUUID().toString()); paymentInfo.setSocialId(UUID.randomUUID().toString());
}
if (Common.isNotNull(paymentInfo.getId())) {
res = baseMapper.updateById(paymentInfo);
if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库更新失败!"));
}
} else {
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库保存失败!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库保存失败!"));
} }
} }
} }
}
return errorMessageList; return errorMessageList;
} }
...@@ -1289,7 +1269,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1289,7 +1269,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
infoVo.getEmpName() + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard() infoVo.getEmpName() + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard()
+ "公积金缴费数据,禁止覆盖!")); + "公积金缴费数据,禁止覆盖!"));
continue; continue;
} }
TProvidentFund tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda() TProvidentFund tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda()
...@@ -1345,24 +1324,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1345,24 +1324,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum()); paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum());
paymentInfo.setProvidentSum(null == infoVo.getProvidentSum() ? BigDecimal.ZERO : infoVo.getProvidentSum()); paymentInfo.setProvidentSum(null == infoVo.getProvidentSum() ? BigDecimal.ZERO : infoVo.getProvidentSum());
paymentInfo.setSumAll(paymentInfo.getProvidentSum()); paymentInfo.setSumAll(paymentInfo.getProvidentSum());
if (Common.isEmpty(paymentInfo.getFundId())) {
paymentInfo.setFundId(UUID.randomUUID().toString()); paymentInfo.setFundId(UUID.randomUUID().toString());
}
if (Common.isNotNull(paymentInfo.getId())) {
res = baseMapper.updateById(paymentInfo);
if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() +
infoVo.getEmpName() + "_缴费库覆盖更新失败!"));
continue;
}
} else {
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName()
+ "_缴费库保存失败!")); + "_缴费库保存失败!"));
continue; continue;
} }
}
if (Common.isNotNull(paymentInfo.getId()) && Common.isNotNull(paymentInfo.getFundId())) { if (Common.isNotNull(paymentInfo.getId()) && Common.isNotNull(paymentInfo.getFundId())) {
paymentInfoMap.put(paymentInfo.getProvidentPayAddr() paymentInfoMap.put(paymentInfo.getProvidentPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
...@@ -1580,7 +1548,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1580,7 +1548,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = lastIdx + 1; i < list.size(); i++) { for (int i = lastIdx + 1; i < list.size(); i++) {
tempList.add(list.get(i)); tempList.add(list.get(i));
} }
lastIdx += 1;
} }
List<TPaymentHeFeiVo> finalTempList = tempList; List<TPaymentHeFeiVo> finalTempList = tempList;
...@@ -1621,8 +1588,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1621,8 +1588,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
String type,List<ErrorMessage> errorMessageList) { String type,List<ErrorMessage> errorMessageList) {
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
TPaymentInfo payExists = null; TPaymentInfo payExists;
TSocialFundInfo socialInfo = null; TSocialFundInfo socialInfo = null;
TSocialInfo tSocialInfo;
String temp; String temp;
int res = -1; int res = -1;
...@@ -1632,12 +1600,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1632,12 +1600,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//已存在的社保数据 //已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>(); HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
if (Common.isNotNull(socialInfoList)) { if (Common.isNotNull(socialInfoList)) {
for (TSocialFundInfo tSocialInfo : socialInfoList) { for (TSocialFundInfo tSocialInfo1 : socialInfoList) {
socialMap.put(tSocialInfo.getEmpIdcard() socialMap.put(tSocialInfo1.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING + tSocialInfo.getSocialProvince() + CommonConstants.DOWN_LINE_STRING + tSocialInfo1.getSocialProvince()
+ CommonConstants.DOWN_LINE_STRING + tSocialInfo.getSocialCity() + CommonConstants.DOWN_LINE_STRING + tSocialInfo1.getSocialCity()
+ CommonConstants.DOWN_LINE_STRING + (null == tSocialInfo.getSocialTown() + CommonConstants.DOWN_LINE_STRING + (null == tSocialInfo1.getSocialTown()
? "null" : tSocialInfo.getSocialTown()), tSocialInfo); ? "null" : tSocialInfo1.getSocialTown()), tSocialInfo1);
} }
} }
...@@ -1704,8 +1672,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1704,8 +1672,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} else {
payExists = null;
} }
} }
...@@ -1729,8 +1695,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1729,8 +1695,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} else {
payExists = null;
} }
} }
...@@ -1755,8 +1719,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1755,8 +1719,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} else {
payExists = null;
} }
} }
...@@ -1780,8 +1742,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1780,8 +1742,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} else {
payExists = null;
} }
} }
...@@ -1806,15 +1766,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1806,15 +1766,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} else {
payExists = null;
} }
} }
TSocialInfo tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (null == payExists) {
payExists = new TPaymentInfo(); payExists = new TPaymentInfo();
payExists.setLockStatus(CommonConstants.ZERO_STRING); payExists.setLockStatus(CommonConstants.ZERO_STRING);
payExists.setEmpId(socialInfo.getEmpId()); payExists.setEmpId(socialInfo.getEmpId());
...@@ -1829,7 +1787,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1829,7 +1787,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setInauguralTeam(tSocialInfo.getInauguralTeam()); payExists.setInauguralTeam(tSocialInfo.getInauguralTeam());
payExists.setEmpNo(tSocialInfo.getEmpNo()); payExists.setEmpNo(tSocialInfo.getEmpNo());
} }
}
payExists.setSocialProvince(socialInfo.getSocialProvince()); payExists.setSocialProvince(socialInfo.getSocialProvince());
payExists.setSocialCity(socialInfo.getSocialCity()); payExists.setSocialCity(socialInfo.getSocialCity());
payExists.setSocialTown(socialInfo.getSocialTown()); payExists.setSocialTown(socialInfo.getSocialTown());
...@@ -1900,22 +1858,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1900,22 +1858,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setSumAll(payExists.getSocialSum()); payExists.setSumAll(payExists.getSocialSum());
payExists.setCreateBy(user.getId()); payExists.setCreateBy(user.getId());
payExists.setCreateName(user.getNickname()); payExists.setCreateName(user.getNickname());
if (Common.isEmpty(payExists.getSocialId())) {
payExists.setSocialId(UUID.randomUUID().toString()); payExists.setSocialId(UUID.randomUUID().toString());
}
if (Common.isNotNull(payExists.getId())) {
res = baseMapper.updateById(payExists);
if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库更新失败!"));
}
} else {
res = insertAndSTimestamp(payExists); res = insertAndSTimestamp(payExists);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库保存失败!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库保存失败!"));
} }
} }
} }
}
return errorMessageList; return errorMessageList;
} }
......
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