Commit 05170560 authored by fangxinjiang's avatar fangxinjiang

工资兼容订单接口

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