领料接口优化
This commit is contained in:
parent
68f4d0073f
commit
ca1eda6280
|
|
@ -12,8 +12,8 @@ public enum LeaseTaskStatusEnum {
|
|||
|
||||
LEASE_TASK_TO_PUBLISHED(1, "待发布"),
|
||||
LEASE_TASK_TO_AUDIT(2, "待审核"),
|
||||
LEASE_TASK_IN_STOCK_OUT(3, "出库进行中"),
|
||||
LEASE_TASK_END_STOCK_OUT(4, "出库已完成");
|
||||
LEASE_TASK_IN_PROGRESS(3, "出库进行中"),
|
||||
LEASE_TASK_FINISHED(4, "出库已完成");
|
||||
|
||||
private final Integer status;
|
||||
private final String statusName;
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
//@RequiresPermissions("lease:info:add")
|
||||
@SysLog(title = "领料任务", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增领料任务")
|
||||
@PostMapping
|
||||
public AjaxResult add(@NotNull(message = "领料任务不能为空") @RequestBody LeaseApplyRequestVo tmTaskRequestVo) {
|
||||
public AjaxResult add(@NotNull(message = "领料任务不能为空") @RequestBody LeaseApplyRequestVo leaseApplyRequestVo) {
|
||||
try {
|
||||
return leaseApplyInfoService.insertLeaseApplyInfo(tmTaskRequestVo);
|
||||
return leaseApplyInfoService.insertLeaseApplyInfo(leaseApplyRequestVo);
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,11 +157,11 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
try {
|
||||
int result = leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
||||
if (result > 0) {
|
||||
// 同步修改tm_task任务状态, 如果不需要审核,改成 LEASE_TASK_IN_STOCK_OUT, 如果需要审核,改成 LEASE_TASK_TO_AUDIT
|
||||
// 同步修改tm_task任务状态, 如果不需要审核,改成 LEASE_TASK_IN_PROGRESS, 如果需要审核,改成 LEASE_TASK_TO_AUDIT
|
||||
TmTask tmTask = new TmTask();
|
||||
tmTask.setTaskType(TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId());
|
||||
tmTask.setTaskId(leaseApplyInfo.getTaskId());
|
||||
tmTask.setTaskStatus(LeaseTaskStatusEnum.LEASE_TASK_IN_STOCK_OUT.getStatus());
|
||||
tmTask.setTaskStatus(LeaseTaskStatusEnum.LEASE_TASK_IN_PROGRESS.getStatus());
|
||||
tmTaskMapper.updateTmTask(tmTask);
|
||||
return AjaxResult.success("发布成功");
|
||||
}
|
||||
|
|
@ -180,7 +180,6 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
details.setParentId(taskId); // 设置领料taskId
|
||||
details.setCreateTime(DateUtils.getNowDate());
|
||||
details.setCreateBy(SecurityUtils.getUsername());
|
||||
//details.setStatus(PurchaseTaskStatusEnum.TO_NOTICE.getStatus());
|
||||
}
|
||||
// 批量插入详情数据
|
||||
int count = leaseApplyDetailsMapper.insertLeaseApplyDetailsList(leaseApplyDetailsList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue