Commit b69ceeab authored by huyuchen's avatar huyuchen

优化修改

parent b6e7c910
...@@ -991,9 +991,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -991,9 +991,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (TSocialInfo socialInfo1:socialist) { for (TSocialInfo socialInfo1:socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().equals(socialInfo1.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()) && (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; isTrueAdder = true;
break; break;
} }
...@@ -1509,12 +1509,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1509,12 +1509,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorDetailVO> errorMessageList) { private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorDetailVO> errorMessageList) {
HashMap<String, String> areaMap = new HashMap<>(); HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR(); R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
if (Common.isNotNull(areaListR)) { if (Common.isNotNull(areaListR)) {
AreaVo areaList = areaListR.getData(); AreaVo areaList = areaListR.getData();
if (null != areaList && !areaList.getSysAreaList().isEmpty()) { if (null != areaList && !areaList.getSysAreaList().isEmpty()) {
for (SysArea area : areaList.getSysAreaList()) { for (SysArea area : areaList.getSysAreaList()) {
areaMap.put(Integer.toString(area.getId()), area.getAreaName()); 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 ...@@ -1595,7 +1599,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue; continue;
} }
areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING); areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING);
fund = checkAddress(areaArray, areaMap, fund); fund = checkAddress(areaArray, areaMap, fund, areaMap2,infoVo);
//无对应员工公积金数据 //无对应员工公积金数据
if (null == fund) { if (null == fund) {
boolean isTrueAdder = false; boolean isTrueAdder = false;
...@@ -1607,9 +1611,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1607,9 +1611,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (TProvidentFund providentFund:fundlist) { for (TProvidentFund providentFund:fundlist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getFundTown().equals(providentFund.getFundTown()))) && 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()) && (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; isTrueAdder = true;
break; break;
} }
...@@ -2097,9 +2101,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2097,9 +2101,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (TSocialInfo socialInfo1:socialist) { for (TSocialInfo socialInfo1:socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().toString().equals(socialInfo1.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()) && (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; isTrueAdder = true;
break; break;
} }
...@@ -2463,11 +2467,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -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) { if (null == areaArray || null == areaMap || null == s) {
return null; return null;
} }
String temp;
if (areaArray.length >= CommonConstants.TWO_INT) { 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 (null != s.getFundProvince()) {
if (areaArray[0].equals(areaMap.get(s.getFundProvince()))) { if (areaArray[0].equals(areaMap.get(s.getFundProvince()))) {
if (null != s.getFundCity()) { 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