Commit 05170560 authored by fangxinjiang's avatar fangxinjiang

工资兼容订单接口

parent b36785da
...@@ -150,6 +150,7 @@ public class TSalaryStandardController { ...@@ -150,6 +150,7 @@ public class TSalaryStandardController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/auditPage") @GetMapping("/auditPage")
public R<IPage<TSalaryStandard>> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) { public R<IPage<TSalaryStandard>> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
tSalaryStandard.setStatus(CommonConstants.ONE_INT);
return new R<>(tSalaryStandardService.getTSalaryStandardAuditPage(page, tSalaryStandard)); return new R<>(tSalaryStandardService.getTSalaryStandardAuditPage(page, tSalaryStandard));
} }
......
...@@ -251,8 +251,8 @@ public class TDispatchInfoController { ...@@ -251,8 +251,8 @@ public class TDispatchInfoController {
@SysLog("派单信息记录表 批量导入-派减") @SysLog("派单信息记录表 批量导入-派减")
@PostMapping("/importListReduce") @PostMapping("/importListReduce")
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo-batch-reduce')") //@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo-batch-reduce')")
public R<List<ErrorMessage>> importListReduce(@RequestBody MultipartFile file){ public R<List<ErrorMessage>> importListReduce(@RequestBody MultipartFile file, @RequestParam(required = false)String orderId){
return tDispatchInfoService.importReduceDiy(file.getInputStream()); return tDispatchInfoService.importReduceDiy(file.getInputStream(),orderId);
} }
/** /**
......
...@@ -58,11 +58,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -58,11 +58,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List<ErrorMessage> errorMessageList, List<ErrorMessage> errorMessageList,
YifuUser user, String orderId); YifuUser user, String orderId);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream); R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId);
@Transactional @Transactional
@ShardingTransactionType(TransactionType.BASE) @ShardingTransactionType(TransactionType.BASE)
void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user); void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user, String orderId);
R<Boolean> removeByIdDiy(String id); R<Boolean> removeByIdDiy(String id);
......
...@@ -2312,7 +2312,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2312,7 +2312,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public R<List<ErrorMessage>> importReduceDiy(InputStream inputStream) { public R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){ if (Common.isEmpty(user)){
R.failed(CommonConstants.USER_FAIL); R.failed(CommonConstants.USER_FAIL);
...@@ -2361,7 +2361,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2361,7 +2361,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
batchReduceDispatch(cachedDataList, errorMessageList,user); batchReduceDispatch(cachedDataList, errorMessageList,user,orderId);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -2375,7 +2375,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2375,7 +2375,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE) @ShardingTransactionType(TransactionType.BASE)
public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user) { public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, YifuUser user, String orderId) {
if (!Common.isNotNull(excelVOList)){ if (!Common.isNotNull(excelVOList)){
return; return;
} }
...@@ -2424,6 +2424,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2424,6 +2424,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 初始化派单 和 社保公积金查询信息 // 初始化派单 和 社保公积金查询信息
dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user); dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user);
try { try {
dispatch.setOrderId(orderId);
dispatch.setApplyNo(getApplyCode()); dispatch.setApplyNo(getApplyCode());
dispatch.setStatus(CommonConstants.ONE_STRING); dispatch.setStatus(CommonConstants.ONE_STRING);
baseMapper.insert(dispatch); baseMapper.insert(dispatch);
......
...@@ -432,7 +432,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -432,7 +432,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo.setRowIndex(CommonConstants.ONE_INT); dispatchReduceVo.setRowIndex(CommonConstants.ONE_INT);
List<TDispatchReduceVo> dispatchImportList = new ArrayList<>(); List<TDispatchReduceVo> dispatchImportList = new ArrayList<>();
dispatchImportList.add(dispatchReduceVo); dispatchImportList.add(dispatchReduceVo);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user); dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user, orderId);
// 处理派减结果 // 处理派减结果
errorMessage = handleDispatchAddRes(preInfo,errorMessageList); errorMessage = handleDispatchAddRes(preInfo,errorMessageList);
if (null != errorMessage){ if (null != errorMessage){
...@@ -623,7 +623,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -623,7 +623,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduce(dispatchReduceVo, pre); dispatchReduce(dispatchReduceVo, pre);
List<TDispatchReduceVo> dispatchImportList = new ArrayList<>(); List<TDispatchReduceVo> dispatchImportList = new ArrayList<>();
dispatchImportList.add(dispatchReduceVo); dispatchImportList.add(dispatchReduceVo);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user); dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user, orderId);
//处理派减结果 //处理派减结果
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