Commit d07f7ae7 authored by huyuchen's avatar huyuchen

预派单优化修改

parent 0a8a8893
...@@ -701,7 +701,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -701,7 +701,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
info.setPreStatus(CommonConstants.ONE_STRING); info.setPreStatus(CommonConstants.ONE_STRING);
} }
int finalI = i; int finalI = i;
if (!errList.stream().anyMatch(e-> hasError(e, finalI))) { if (errList.stream().noneMatch(e-> hasError(e, finalI))) {
baseMapper.insert(info); baseMapper.insert(info);
} }
} }
...@@ -2266,7 +2266,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2266,7 +2266,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Date 2022-07-18 * @Date 2022-07-18
**/ **/
private R<Boolean> handleDispatchAddRes(TPreDispatchInfo preInfo, List<ErrorMessage> errorMessageList) { private R<Boolean> handleDispatchAddRes(TPreDispatchInfo preInfo, List<ErrorMessage> errorMessageList) {
if (errorMessageList.size() == CommonConstants.ZERO_INT) { if (errorMessageList.size() == CommonConstants.ZERO_INT ||
errorMessageList.stream().allMatch(e-> CommonConstants.SAVE_SUCCESS.equals(e.getMessage()))) {
preInfo.setPreStatus(CommonConstants.TWO_STRING); preInfo.setPreStatus(CommonConstants.TWO_STRING);
preInfo.setExceptionContent(CommonConstants.EMPTY_STRING); preInfo.setExceptionContent(CommonConstants.EMPTY_STRING);
baseMapper.updatePreStatusById(preInfo); baseMapper.updatePreStatusById(preInfo);
...@@ -2282,36 +2283,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2282,36 +2283,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
} }
private R<Boolean> handleBatchSocialFundReduce(TPreDispatchInfo preInfo,
TDispatchInfo dispatchInfo, TSocialInfo social, TProvidentFund fund) {
if (Common.isEmpty(preInfo.getSocialProvince()) && Common.isEmpty(preInfo.getFundProvince())) {
return R.failed("请检查派减缴纳地是否准确!");
}
if (Common.isNotNull(preInfo.getSocialProvince())) {
if (null != social) {
dispatchInfo.setSettleDomain(social.getSettleDomain());
dispatchInfo.setBelongUnit(social.getBelongUnit());
} else {
preInfo.setPreStatus(CommonConstants.ONE_STRING);
preInfo.setExceptionContent(PreDispatchConstants.NO_SOCIAL_CAN_REDUCE);
baseMapper.updatePreStatusById(preInfo);
return R.failed(PreDispatchConstants.NO_SOCIAL_CAN_REDUCE);
}
}
if (Common.isNotNull(preInfo.getFundProvince())) {
if (null != fund) {
dispatchInfo.setSettleDomain(fund.getSettleDomain());
dispatchInfo.setBelongUnit(fund.getBelongUnit());
} else {
preInfo.setPreStatus(CommonConstants.ONE_STRING);
preInfo.setExceptionContent(PreDispatchConstants.NO_FUND_CAN_REDUCE);
baseMapper.updatePreStatusById(preInfo);
return R.failed(PreDispatchConstants.NO_FUND_CAN_REDUCE);
}
}
return null;
}
/** /**
* 派减派单时间处理 * 派减派单时间处理
* @param dispatchInfo * @param dispatchInfo
......
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