Commit 21cfda1e authored by huyuchen's avatar huyuchen

优化修改

parent 9ee6a40c
......@@ -926,6 +926,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSocialInfo tSocialInfo;
String temp;
int res;
List<TSocialInfo> socialist;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
......@@ -981,9 +982,28 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
if (null == socialInfo) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "无对应员工" +
infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)"));
continue;
boolean isTrueAdder = false;
socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity()));
if (!socialist.isEmpty()) {
for (TSocialInfo socialInfo1:socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().equals(socialInfo1.getSocialTown()))) &&
DateUtil.dateToString(socialInfo1.getSocialStartDate()).compareTo(infoVo.getSocialPayMonth()) <=0 &&
(Common.isEmpty(socialInfo1.getReduceHandleTime()) || (Common.isNotNull(socialInfo1.getReduceHandleTime()) &&
DateUtil.dateToString(socialInfo1.getReduceHandleTime()).compareTo(infoVo.getSocialPayMonth()) >=0))) {
isTrueAdder = true;
break;
}
}
}
if (!isTrueAdder) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "无对应员工" +
infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)"));
continue;
}
}
//导入模板判重 养老
......@@ -1504,6 +1524,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSocialFundInfo fund;
String temp;
int res = -1;
List<TProvidentFund> fundlist;
//获取身份证列表
List<String> idcards = list.stream().map(TPaymentInfoVo::getEmpIdcard).collect(Collectors.toList());
......@@ -1577,10 +1598,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
fund = checkAddress(areaArray, areaMap, fund);
//无对应员工公积金数据
if (null == fund) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "无对应员工" + infoVo.getEmpName() +
CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard()
+ "的公积金数据(请查验公积金缴纳地)!"));
continue;
boolean isTrueAdder = false;
fundlist = providentFundMapper.selectList(Wrappers.<TProvidentFund>query().lambda()
.eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TProvidentFund::getFundProvince, infoVo.getSocialProvince())
.eq(TProvidentFund::getFundCity, infoVo.getSocialCity()));
if (!fundlist.isEmpty()) {
for (TProvidentFund providentFund:fundlist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getFundTown().equals(providentFund.getFundTown()))) &&
DateUtil.dateToString(providentFund.getProvidentStart()).compareTo(infoVo.getProvidentPayMonth()) <=0 &&
(Common.isEmpty(providentFund.getReduceHandleTime()) || (Common.isNotNull(providentFund.getReduceHandleTime()) &&
DateUtil.dateToString(providentFund.getReduceHandleTime()).compareTo(infoVo.getProvidentPayMonth()) >=0))) {
isTrueAdder = true;
break;
}
}
}
if (!isTrueAdder) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "无对应员工" + infoVo.getEmpName() +
CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard()
+ "的公积金数据(请查验公积金缴纳地)!"));
continue;
}
}
//计算公积金合计,个人金额和单位金额一致
infoVo.setProvidentSum(BigDecimalUtils.safeAdd(infoVo.getUnitProvidentSum(), infoVo.getUnitProvidentSum()));
......@@ -1998,7 +2038,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSocialFundInfo socialInfo = null;
TSocialInfo tSocialInfo;
String temp;
int res = -1;
List<TSocialInfo> socialist;
int res;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
......@@ -2047,9 +2088,28 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if (null == socialInfo) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "无对应员工" + infoVo.getEmpIdcard() +
"的社保数据(请查验社保缴纳地)"));
continue;
boolean isTrueAdder = false;
socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString()));
if (!socialist.isEmpty()) {
for (TSocialInfo socialInfo1:socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().toString().equals(socialInfo1.getSocialTown()))) &&
DateUtil.dateToString(socialInfo1.getSocialStartDate()).compareTo(infoVo.getSocialPayMonth()) <=0 &&
(Common.isEmpty(socialInfo1.getReduceHandleTime()) || (Common.isNotNull(socialInfo1.getReduceHandleTime()) &&
DateUtil.dateToString(socialInfo1.getReduceHandleTime()).compareTo(infoVo.getSocialPayMonth()) >=0))) {
isTrueAdder = true;
break;
}
}
}
if (!isTrueAdder) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "无对应员工" + infoVo.getEmpIdcard() +
"的社保数据(请查验社保缴纳地)"));
continue;
}
}
//判断是否存在养老缴费数据
......
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