Commit 9991dbb0 authored by huyuchen's avatar huyuchen

订单接收修改;派单反馈全量修改

parent e68fedf1
......@@ -404,7 +404,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(one).isPresent()){
return R.failed(OrderConstants.ORDER_NO_IS_EXIST);
//1.5.2-hyc 订单编号重复的删除状态更新为已删除
one.setDeleteFlag(CommonConstants.ONE_INT);
baseMapper.updateById(one);
}
if (Common.isEmpty(vo.getCreateName())){
return R.failed(OrderConstants.ORDER_NAME_IS_EMPTY);
......
......@@ -393,7 +393,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
return this.judgeAllMessage(errorMessageList);
}
@Override
public void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
......@@ -702,6 +702,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 同步更新人员档案和项目档案的社保公积金状态
updateDocSocialFund(social, fund, socialFund,excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
}catch (Exception e){
log.error("派单新增异常:", e);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "派单新增异常:"+e.getMessage()));
......@@ -2646,7 +2647,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
return this.judgeAllMessage(errorMessageList);
}
@Override
......@@ -2704,6 +2705,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setStatus(CommonConstants.ONE_STRING);
baseMapper.insert(dispatch);
socialFundMapper.updateById(socialFund);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
}catch (Exception e){
log.error("批量派减异常:",e);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_FAILED));
......@@ -4782,4 +4784,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
return vo;
}
/**
* @param errorMessageList
* @Description: 判断所有返回数据,是否全部为正确的
* @Author: hyc
* @Date: 2023/03/02 11:03
* @return: R<List<ErrorMessage>>
**/
private R<List<ErrorMessage>> judgeAllMessage(List<ErrorMessage> errorMessageList) {
if (!errorMessageList.isEmpty() && errorMessageList.stream().noneMatch(e-> e.getColor().equals(CommonConstants.RED))) {
return R.ok();
}
return R.ok(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