From b0841c2cb2098e12de9c461e8ab0af257ae74ae4 Mon Sep 17 00:00:00 2001 From: Comair <1464848666@qq.com> Date: Thu, 8 Aug 2024 10:05:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E6=8E=A7=E5=88=B6=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9A=82=E5=81=9C=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/BaseBarcodesController.java | 50 +++++++++++++++ .../wms/service/IBaseBarcodesOutService.java | 10 +++ .../impl/BaseBarcodesOutServiceImpl.java | 63 +++++++++++++++++++ 3 files changed, 123 insertions(+) diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java index 2e90000..6a91663 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java @@ -242,5 +242,55 @@ public class BaseBarcodesController extends BaseController { } + /** + * 手动控制是否暂停出库 + * stop 停止出库 + * start 启动出库 + * @param status + * @return + */ + @PostMapping("/handStartStopOutboundStatus") + @RepeatSubmit + public Result handStartStopOutboundStatus(@RequestParam("status") String status){ + return iBaseBarcodesOutService.handStartStopOutboundStatus(status); + } + + /** + * 获取是否停止出库 + * start 启动出库 + * stop 停止出库 + * @return + */ + @GetMapping("/getStartStopOutboundStatus") + @RepeatSubmit + public Result getStartStopOutboundStatus(){ + return iBaseBarcodesOutService.getStartStopOutboundStatus(); + } + + /** + * 手动控制是否越库 + * start 启动越库 + * stop 停止越库 + * @param status + * @return + */ + @PostMapping("/handOskipOverWareStatus") + @RepeatSubmit + public Result handOskipOverWareStatus(@RequestParam("status") String status){ + return iBaseBarcodesOutService.handOskipOverWareStatus(status); + } + + /** + * 获取是否是否越库的状态 + * start 启动越库 + * stop 停止越库 + * @return + */ + @GetMapping("/getOskipOverWareStatus") + @RepeatSubmit + public Result getOskipOverWareStatus(){ + return iBaseBarcodesOutService.getOskipOverWareStatus(); + } + } diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/IBaseBarcodesOutService.java b/shkj-wms/src/main/java/com/shkj/wms/service/IBaseBarcodesOutService.java index 6511ce5..2eb1342 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/IBaseBarcodesOutService.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/IBaseBarcodesOutService.java @@ -119,4 +119,14 @@ public interface IBaseBarcodesOutService extends IService { * @return java.util.List> */ List> getOutEmptyInfo(); + + + + Result handOskipOverWareStatus(String status); + + Result getStartStopOutboundStatus(); + + Result getOskipOverWareStatus(); + + Result handStartStopOutboundStatus(String status); } diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesOutServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesOutServiceImpl.java index 2798c14..672ed55 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesOutServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesOutServiceImpl.java @@ -381,6 +381,69 @@ public class BaseBarcodesOutServiceImpl extends ServiceImpl handOskipOverWareStatus(String status) { + try { + redisTemplate.opsForValue().set(RedisConstant.redisSkipOverWare,status); + return Result.ok().msg("设置越库成功"); + }catch (Exception e){ + return Result.err().msg("设置越库成功"); + } + } + + /** + * 获取是否越库 start 启动越库 stop 不启动越库 + * @return + */ + @Override + public Result getOskipOverWareStatus() { + Object o = redisTemplate.opsForValue().get(RedisConstant.redisSkipOverWare); + if(o== null){ + return Result.ok().data("stop"); + } + return Result.ok().data(o.toString()); + } + + + + + /** + * 是否启动/或暂停出库 + * stop 停止出库 + * start 启动出库 + * @param status + * @return + */ + @Override + public Result handStartStopOutboundStatus(String status) { + try { + redisTemplate.opsForValue().set(RedisConstant.redisStartStopOutbound,status); + return Result.ok().msg("设置启动/停止出库成功"); + }catch (Exception e){ + return Result.err().msg("设置启动/停止出库成功"); + } + } + + /** + * 获取是否启动或暂停出库状态 + * @return + */ + @Override + public Result getStartStopOutboundStatus() { + Object o = redisTemplate.opsForValue().get(RedisConstant.redisStartStopOutbound); + if(o== null){ + return Result.ok().data("start"); + } + return Result.ok().data(o.toString()); + } + /** * 手动下发出库任务-恢复 :暂停 ,已取消是否是作废,不可恢复 ; 2出库中 给堆垛机下发命令成功,更改状态 * @param bo