Commit 8a692712 authored by huyuchen's avatar huyuchen

预派单 参数校验修改

parent 283420fd
...@@ -369,7 +369,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -369,7 +369,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
errorMessageList = handleFileAddress(1, preInfo, areaMap, areaIdMap, importVo, errorMessageList); errorMessageList = handleFileAddress(1, preInfo, areaMap, areaIdMap, importVo, errorMessageList);
} }
// 档案地市没问题 开始派单处理 // 档案地市没问题 开始派单处理
if (Common.isEmpty(errorMessageList)) { if (errorMessageList.size() == CommonConstants.ZERO_INT) {
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user); dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user);
} }
// 处理派增结果 // 处理派增结果
...@@ -456,8 +456,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -456,8 +456,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
.eq(TPreDispatchInfo::getDispatchFlag, CommonConstants.ZERO_STRING) .eq(TPreDispatchInfo::getDispatchFlag, CommonConstants.ZERO_STRING)
.eq(TPreDispatchInfo::getPreStatus, CommonConstants.ZERO_STRING)); .eq(TPreDispatchInfo::getPreStatus, CommonConstants.ZERO_STRING));
} }
if (Common.isEmpty(preList)) { if (!Common.isNotNull(preList)) {
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY); return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
} }
// 找出所有需要派减的社保或公积金数据 主要用于派减是获取项目相关数据 // 找出所有需要派减的社保或公积金数据 主要用于派减是获取项目相关数据
HashMap<String, TSocialInfo> socialMap = new HashMap<>(); HashMap<String, TSocialInfo> socialMap = new HashMap<>();
...@@ -501,7 +501,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -501,7 +501,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
resetMessageList(pre, errorMessageList, errorMsgList, i + 1); resetMessageList(pre, errorMessageList, errorMsgList, i + 1);
} }
} }
return R.ok(errorMsgList); if (Common.isNotNull(errorMsgList)) {
return R.failed(errorMsgList);
}
return R.ok();
} }
@Override @Override
...@@ -2094,11 +2097,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2094,11 +2097,7 @@ 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 (Common.isEmpty(errorMessageList)) { if (errorMessageList.size() > CommonConstants.ZERO_INT) {
return R.failed(preInfo.getEmpIdcard() +
CommonConstants.COLON_STRING +
PreDispatchConstants.PREDISPATCH_EXCEPTION);
}
ErrorMessage errorMessage = errorMessageList.get(CommonConstants.ZERO_INT); ErrorMessage errorMessage = errorMessageList.get(CommonConstants.ZERO_INT);
if (null != errorMessage) { if (null != errorMessage) {
if (errorMessage.getMessage().indexOf(PreDispatchConstants.DISPATCH_ADD_SUCCESS) >= CommonConstants.ZERO_INT) { if (errorMessage.getMessage().indexOf(PreDispatchConstants.DISPATCH_ADD_SUCCESS) >= CommonConstants.ZERO_INT) {
...@@ -2117,6 +2116,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2117,6 +2116,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
errorMessage.getMessage()); errorMessage.getMessage());
} }
} }
}
return null; return null;
} }
...@@ -2371,7 +2371,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2371,7 +2371,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
errorMessageList = handleFileAddress(i, pre, areaMap, areaIdMap, importVo, errorMessageList); errorMessageList = handleFileAddress(i, pre, areaMap, areaIdMap, importVo, errorMessageList);
} }
// 档案地市没问题 开始派单处理 // 档案地市没问题 开始派单处理
if (Common.isEmpty(errorMessageList)){ if (!Common.isNotNull(errorMessageList)){
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user); dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user);
} }
// 处理派增结果 // 处理派增结果
......
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