Commit b69ceeab authored by huyuchen's avatar huyuchen

优化修改

parent b6e7c910
......@@ -991,9 +991,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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 &&
DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 &&
(Common.isEmpty(socialInfo1.getReduceHandleTime()) || (Common.isNotNull(socialInfo1.getReduceHandleTime()) &&
DateUtil.dateToString(socialInfo1.getReduceHandleTime()).compareTo(infoVo.getSocialPayMonth()) >=0))) {
DateUtil.dateToString(socialInfo1.getReduceHandleTime(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) {
isTrueAdder = true;
break;
}
......@@ -1509,12 +1509,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorDetailVO> errorMessageList) {
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
if (Common.isNotNull(areaListR)) {
AreaVo areaList = areaListR.getData();
if (null != areaList && !areaList.getSysAreaList().isEmpty()) {
for (SysArea area : areaList.getSysAreaList()) {
areaMap.put(Integer.toString(area.getId()), area.getAreaName());
areaMap2.put(area.getAreaName() + CommonConstants.DOWN_LINE_STRING + (
null == area.getParentId() ? "null" : (0 == area.getParentId() ? "null" : Integer.toString(
area.getParentId()))), Integer.toString(area.getId()));
}
}
}
......@@ -1595,7 +1599,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING);
fund = checkAddress(areaArray, areaMap, fund);
fund = checkAddress(areaArray, areaMap, fund, areaMap2,infoVo);
//无对应员工公积金数据
if (null == fund) {
boolean isTrueAdder = false;
......@@ -1607,9 +1611,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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 &&
DateUtil.dateToString(providentFund.getProvidentStart(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) <=0 &&
(Common.isEmpty(providentFund.getReduceHandleTime()) || (Common.isNotNull(providentFund.getReduceHandleTime()) &&
DateUtil.dateToString(providentFund.getReduceHandleTime()).compareTo(infoVo.getProvidentPayMonth()) >=0))) {
DateUtil.dateToString(providentFund.getReduceHandleTime(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) >=0))) {
isTrueAdder = true;
break;
}
......@@ -2097,9 +2101,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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 &&
DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 &&
(Common.isEmpty(socialInfo1.getReduceHandleTime()) || (Common.isNotNull(socialInfo1.getReduceHandleTime()) &&
DateUtil.dateToString(socialInfo1.getReduceHandleTime()).compareTo(infoVo.getSocialPayMonth()) >=0))) {
DateUtil.dateToString(socialInfo1.getReduceHandleTime(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) {
isTrueAdder = true;
break;
}
......@@ -2463,11 +2467,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
//比对缴纳地是否一致
private TSocialFundInfo checkAddress(String[] areaArray, HashMap<String, String> areaMap, TSocialFundInfo s) {
private TSocialFundInfo checkAddress(String[] areaArray, HashMap<String, String> areaMap, TSocialFundInfo s,
HashMap<String, String> areaMap2, TPaymentInfoVo infoVo) {
if (null == areaArray || null == areaMap || null == s) {
return null;
}
String temp;
if (areaArray.length >= CommonConstants.TWO_INT) {
temp = areaMap2.get(areaArray[0] + CommonConstants.DOWN_LINE_STRING + "null");
if (Common.isNotNull(temp)) {
infoVo.setSocialProvince(temp);
}
temp = areaMap2.get(areaArray[1] + CommonConstants.DOWN_LINE_STRING + (null == infoVo.getSocialProvince()
? "null" : infoVo.getSocialProvince()));
if (Common.isNotNull(temp)) {
infoVo.setSocialCity(temp);
}
if (areaArray.length >= CommonConstants.THREE_INT) {
temp = areaMap2.get(areaArray[2] + CommonConstants.DOWN_LINE_STRING + (null == infoVo.getSocialCity()
? "null" : infoVo.getSocialCity()));
if (Common.isNotNull(temp)) {
infoVo.setSocialTown(temp);
}
}
if (null != s.getFundProvince()) {
if (areaArray[0].equals(areaMap.get(s.getFundProvince()))) {
if (null != s.getFundCity()) {
......
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