Commit bb8c82fb authored by fangxinjiang's avatar fangxinjiang

自动化派单-fxj

parent e888a128
...@@ -970,7 +970,7 @@ ...@@ -970,7 +970,7 @@
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID, b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID,
c.UNIT_NAME, c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS,c.EMP_NATRUE,c.TRY_PERIOD c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS,c.EMP_NATRUE,ifnull(c.TRY_PERIOD,b.TRY_PERIOD) TRY_PERIOD,
,a.SCHOOL ,a.SCHOOL
from ( from (
select e.ID,e.EMP_CODE,e.EMP_NAME,e.EMP_IDCARD,e.EMP_NATIONAL,e.EMP_PHONE,e.ID_PROVINCE,e.ID_CITY, select e.ID,e.EMP_CODE,e.EMP_NAME,e.EMP_IDCARD,e.EMP_NATIONAL,e.EMP_PHONE,e.ID_PROVINCE,e.ID_CITY,
...@@ -1012,7 +1012,7 @@ ...@@ -1012,7 +1012,7 @@
x.CONTRACT_TERM, x.CONTRACT_TERM,
x.CONTRACT_SUB_NAME, x.CONTRACT_SUB_NAME,
x.ID as "CONTRACT_ID", x.ID as "CONTRACT_ID",
x.EMP_IDCARD x.EMP_IDCARD,x.TRY_PERIOD
FROM FROM
t_employee_contract_info x t_employee_contract_info x
WHERE WHERE
......
...@@ -69,7 +69,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -69,7 +69,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
@ShardingTransactionType(TransactionType.BASE) @ShardingTransactionType(TransactionType.BASE)
void importTDispatchInfo(List<TDispatchImportVo> excelVOList, void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList, List<ErrorMessage> errorMessageList,
YifuUser user, String orderId, Map<String, String> idCardMap); YifuUser user, String orderId, Map<String, String> idCardMap,String autoFlag);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId,String flag); R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId,String flag);
......
...@@ -507,7 +507,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -507,7 +507,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (Common.isNotNull(disList)) { if (Common.isNotNull(disList)) {
//调用批量派单接口100条处理一次,同原合同派单保持一致 //调用批量派单接口100条处理一次,同原合同派单保持一致
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorMessage> errorMessageList = new ArrayList<>();
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>()); dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>(),CommonConstants.ZERO_STRING);
if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) { if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) {
List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList()); List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList());
errorMessageListAll.addAll(relErrorMessageList); errorMessageListAll.addAll(relErrorMessageList);
...@@ -812,7 +812,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -812,7 +812,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (Common.isNotNull(disList)) { if (Common.isNotNull(disList)) {
//调用批量派单接口100条处理一次,同原合同派单保持一致 //调用批量派单接口100条处理一次,同原合同派单保持一致
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorMessage> errorMessageList = new ArrayList<>();
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>()); dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>(),null);
if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) { if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) {
List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList()); List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList());
errorMessageListAll.addAll(relErrorMessageList); errorMessageListAll.addAll(relErrorMessageList);
......
...@@ -458,7 +458,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -458,7 +458,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTDispatchInfo(cachedDataList, errorMessageList, user, orderId, idCardMap); importTDispatchInfo(cachedDataList, errorMessageList, user, orderId, idCardMap,null);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -475,7 +475,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -475,7 +475,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public void importTDispatchInfo(List<TDispatchImportVo> excelVOList, public void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList, List<ErrorMessage> errorMessageList,
YifuUser user, String orderId, YifuUser user, String orderId,
Map<String, String> idCardMap) { Map<String, String> idCardMap,String autoFlag) {
if (!Common.isNotNull(excelVOList)) { if (!Common.isNotNull(excelVOList)) {
return; return;
} }
...@@ -624,7 +624,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -624,7 +624,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue; continue;
} }
// 数据合法情况 // 数据合法情况
if (validImport(errorMessageList, excel, setInfoVo, socialFund, empVo, socialSet, fundSet)) { if (validImport(errorMessageList, excel, setInfoVo, socialFund, empVo, socialSet, fundSet,autoFlag)) {
excelVOTemp.put(excel.getRowIndex().toString(), excel.getEmpIdcard()); excelVOTemp.put(excel.getRowIndex().toString(), excel.getEmpIdcard());
continue; continue;
} }
...@@ -2394,7 +2394,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2394,7 +2394,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchImportVo excel, TDispatchImportVo excel,
ProjectSetInfoVo setInfoVo, ProjectSetInfoVo setInfoVo,
TSocialFundInfo socialFund, TSocialFundInfo socialFund,
DispatchEmpVo empVo, SysBaseSetInfo socialSet, SysBaseSetInfo fundSet) { DispatchEmpVo empVo, SysBaseSetInfo socialSet, SysBaseSetInfo fundSet,String autoFlag) {
if (Common.isNotNull(excel.getSocialHousehold()) && Common.isEmpty(excel.getPaymentType())) { if (Common.isNotNull(excel.getSocialHousehold()) && Common.isEmpty(excel.getPaymentType())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_NOT_EMPTY))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_NOT_EMPTY)));
return true; return true;
...@@ -2515,7 +2515,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2515,7 +2515,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true; return true;
} }
//档案试用期必填 20241128 fxj 1.7.2 //档案试用期必填 20241128 fxj 1.7.2
if (Common.isEmpty(empVo.getTryPeriod()) && Common.isEmpty(excel.getTryPeriod())) { if (Common.isEmpty(empVo.getTryPeriod())
&& Common.isEmpty(excel.getTryPeriod())
&& CommonConstants.ZERO_STRING.equals(empVo.getTryPeriod())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY)));
return true; return true;
} }
...@@ -6824,7 +6826,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6824,7 +6826,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
initAreaMap(areaMap, areaIdMap, areaListR); initAreaMap(areaMap, areaIdMap, areaListR);
} }
// 档案地市没问题 开始派单处理 // 档案地市没问题 开始派单处理
this.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>()); this.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>(),null);
if (errorMessageList.isEmpty() || CommonConstants.GREEN.equals(errorMessageList.get(0).getColor())) { if (errorMessageList.isEmpty() || CommonConstants.GREEN.equals(errorMessageList.get(0).getColor())) {
return R.ok(); return R.ok();
} else { } else {
......
...@@ -382,7 +382,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -382,7 +382,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
// 档案地市没问题 开始派单处理 // 档案地市没问题 开始派单处理
if (errorMessageList.size() == CommonConstants.ZERO_INT) { if (errorMessageList.size() == CommonConstants.ZERO_INT) {
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>()); dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>(),null);
} }
// 处理派增结果 // 处理派增结果
errorMessage = handleDispatchAddRes(preInfo, errorMessageList); errorMessage = handleDispatchAddRes(preInfo, errorMessageList);
...@@ -2535,7 +2535,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2535,7 +2535,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
// 档案地市没问题 开始派单处理 // 档案地市没问题 开始派单处理
if (!Common.isNotNull(errorMessageList)){ if (!Common.isNotNull(errorMessageList)){
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>()); dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>(),null);
} }
// 处理派增结果 // 处理派增结果
handleDispatchAddRes(pre, errorMessageList); handleDispatchAddRes(pre, errorMessageList);
......
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