From d6102be36d78de4591d5803e19c121683aef2297 Mon Sep 17 00:00:00 2001 From: judy <278197488@qq.com> Date: Tue, 16 Jul 2024 11:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/BusinBillOutController.java | 27 ++++---- .../business/BusinDataTaskController.java | 34 +++++++++++ .../wms/service/IBusinDataTaskService.java | 10 +++ .../impl/BusinDataTaskServiceImpl.java | 61 ++++++++++++++++++- 4 files changed, 116 insertions(+), 16 deletions(-) diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillOutController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillOutController.java index 392b673..73237f8 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillOutController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillOutController.java @@ -55,21 +55,6 @@ public class BusinBillOutController extends BaseController { } - /** - * 指定货位出库 - * @param locationCode - * @return - */ - @Log(title = "指定货位出库",businessType = BusinessType.UPDATE) - @PostMapping("/namedLoctionOutput") - @RepeatSubmit - public Result namedLoctionOutput(@Valid @RequestParam String locationCode){ - return businDataTaskService.insertBusinTask(locationCode); - } - - - - @Log(title = "紧急出库确认出库-方式2",businessType = BusinessType.UPDATE) @PostMapping("/saveBillHeadBodyOutByDervie") @RepeatSubmit @@ -97,4 +82,16 @@ public class BusinBillOutController extends BaseController { } + /** + * 指定货位出库 + * @param locationCode + * @return + */ + @Log(title = "指定货位出库",businessType = BusinessType.UPDATE) + @PostMapping("/namedLoctionOutput") + @RepeatSubmit + public Result namedLoctionOutput(@Valid @RequestParam String locationCode){ + return businDataTaskService.insertBusinTask(locationCode); + } + } diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinDataTaskController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinDataTaskController.java index 730cadd..a7c2ee3 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinDataTaskController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinDataTaskController.java @@ -69,6 +69,40 @@ public class BusinDataTaskController extends BaseController { return businDataTaskService.instantlyTask(bo); } + /** + * 任务管理--优先 + * @param bo + * @return + */ + @PostMapping("/elevatePriorityTask") + @RepeatSubmit + public Result elevatePriorityTask(BusinTaskManageDistributeBo bo){ + return businDataTaskService.elevatePriorityTask(bo); + } + + /** + * 任务管理--暂停 + * @param bo + * @return + */ + @PostMapping("/pauseTask") + @RepeatSubmit + public Result pauseTask(BusinTaskManageDistributeBo bo){ + return businDataTaskService.pauseTask(bo); + } + + /** + * 任务管理--启用 + * @param bo + * @return + */ + @PostMapping("/activeTask") + @RepeatSubmit + public Result activeTask(BusinTaskManageDistributeBo bo){ + return businDataTaskService.pauseTask(bo); + } + + /** * 紧急出库到达接驳点时,物料明细 diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java b/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java index e2d9bb0..eea8fed 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java @@ -111,6 +111,16 @@ public interface IBusinDataTaskService extends IService { */ Result instantlyTask(BusinTaskManageDistributeBo bo); + /** + * 提升优先级 + * @param bo + * @return + */ + Result elevatePriorityTask(BusinTaskManageDistributeBo bo); + Result pauseTask(BusinTaskManageDistributeBo bo); + + Result activeTask(BusinTaskManageDistributeBo bo); + List queryinTask(); /** diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java index ac6c7c4..c9491d4 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java @@ -560,7 +560,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper() .eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); BusinDataTask businDataTask = getOne(wrapper); + if(!businDataTask.getTaskStatus().equals("0")){ + return Result.err().msg("此任务不可取消"); + } + businDataTask.setTaskStatus("3"); return this.updateById(businDataTask)?Result.ok():Result.err(); @@ -1334,6 +1338,61 @@ public class BusinDataTaskServiceImpl extends ServiceImpl elevatePriorityTask(BusinTaskManageDistributeBo bo){ + LambdaQueryWrapper wrapper = new LambdaQueryWrapper() + .eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); + BusinDataTask businDataTask = getOne(wrapper); + if(!businDataTask.getTaskStatus().equals("0")){ + return Result.err().msg("此任务不可提升优先级"); + } + //提升优先级 + businDataTask.setPriority("1"); + return this.updateById(businDataTask)?Result.ok():Result.err(); + } + + /** + * 暂停任务 + * @param bo + * @return + */ + @Override + public Result pauseTask(BusinTaskManageDistributeBo bo){ + LambdaQueryWrapper wrapper = new LambdaQueryWrapper() + .eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); + BusinDataTask businDataTask = getOne(wrapper); + if(!businDataTask.getTaskStatus().equals("0")){ + return Result.err().msg("此任务不可暂停"); + } + //任务暂停 + businDataTask.setTaskStatus("4"); + return this.updateById(businDataTask)?Result.ok():Result.err(); + } + + /** + * 任务启用 + * @param bo + * @return + */ + @Override + public Result activeTask(BusinTaskManageDistributeBo bo){ + LambdaQueryWrapper wrapper = new LambdaQueryWrapper() + .eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); + BusinDataTask businDataTask = getOne(wrapper); + if(!businDataTask.getTaskStatus().equals("4")){ + return Result.err().msg("此任务不可启用"); + } + //任务暂停 + businDataTask.setTaskStatus("0"); + return this.updateById(businDataTask)?Result.ok():Result.err(); + } + + @Override public List queryinTask() { return this.baseMapper.queryinTask();