From 6653b0e8b34d8da82908e6d9d790d2058b589aac Mon Sep 17 00:00:00 2001 From: judy <278197488@qq.com> Date: Sat, 22 Mar 2025 21:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=A1=AE=E8=AE=A4=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=8A=8APLC=E6=8A=A5=E8=AD=A6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkj/wcs/third/stacker/StkCallUtil.java | 2 +- .../impl/BusinOutInPlanServiceImpl.java | 71 ++++++++++--------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/shkj-wms/src/main/java/com/shkj/wcs/third/stacker/StkCallUtil.java b/shkj-wms/src/main/java/com/shkj/wcs/third/stacker/StkCallUtil.java index a2bd9e1..83ce6c4 100644 --- a/shkj-wms/src/main/java/com/shkj/wcs/third/stacker/StkCallUtil.java +++ b/shkj-wms/src/main/java/com/shkj/wcs/third/stacker/StkCallUtil.java @@ -76,7 +76,7 @@ public class StkCallUtil { Object oneTaskOutId = redisTemplate.opsForValue().get(RedisConstant.redisTaskOutOne); if (oneTaskOutId !=null && layer==1){ - log.info("1F有出库任务在执行,无法下发出库任务:"+oneTaskOutId); + log.info(stkMoveBo.getTaskId()+"1F有出库任务在执行,无法下发出库任务:"+oneTaskOutId); return Result.err().msg("1F有出库任务在执行,无法下发出库任务"); } diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java index d7292c8..078196d 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java @@ -633,7 +633,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl allMap = new HashMap<>(1); - if (layer == 1) { - //出库拣货尚未拣货时写入异常给plc - Map oneWcsErrExitMap = new HashMap<>(1); - oneWcsErrExitMap.put(oneWcsErrExitVt, 0); - allMap.put(oneWcsErrExit, oneWcsErrExitMap); - - Map oneWcsExitOutExitMap = new HashMap<>(1); - oneWcsExitOutExitMap.put(oneWcsExitOutExitVt, 0); - allMap.put(oneWcsExitOutExit, oneWcsExitOutExitMap); - - Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); - if (errBoolean) { - log.info("1楼出库确认后消除报警信息,写入点位成功{}", allMap); - } else { - log.info("1楼出库确认后消除报警信息,写入点位失败{}", allMap); - } - } else if (layer == 2) { - //2楼出库尚未拣货时,写入异常给plc - Map twoWcsErrExitMap = new HashMap<>(1); - twoWcsErrExitMap.put(twoWcsErrExitVt, 0); - allMap.put(twoWcsErrExit, twoWcsErrExitMap); - - Map twoWcsErrExitOutMap = new HashMap<>(1); - twoWcsErrExitOutMap.put(twoWcsExitOutExitVt, 0); - allMap.put(twoWcsExitOutExit, twoWcsErrExitOutMap); - - Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); - if (errBoolean) { - log.info("2楼出库确认后消除报警信息,写入点位成功{}", allMap); - } else { - log.info("2楼出库确认后消除报警信息,写入点位失败{}", allMap); - } + } + + Map allMap = new HashMap<>(1); + if (layer == 1) { + //出库拣货尚未拣货时写入异常给plc + Map oneWcsErrExitMap = new HashMap<>(1); + oneWcsErrExitMap.put(oneWcsErrExitVt, 0); + allMap.put(oneWcsErrExit, oneWcsErrExitMap); + + Map oneWcsExitOutExitMap = new HashMap<>(1); + oneWcsExitOutExitMap.put(oneWcsExitOutExitVt, 0); + allMap.put(oneWcsExitOutExit, oneWcsExitOutExitMap); + + Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); + if (errBoolean) { + log.info(orderNo+"->1楼出库确认后消除报警信息,写入点位成功{}", allMap); + } else { + log.info(orderNo+"->1楼出库确认后消除报警信息,写入点位失败{}", allMap); + } + } else if (layer == 2) { + //2楼出库尚未拣货时,写入异常给plc + Map twoWcsErrExitMap = new HashMap<>(1); + twoWcsErrExitMap.put(twoWcsErrExitVt, 0); + allMap.put(twoWcsErrExit, twoWcsErrExitMap); + + Map twoWcsErrExitOutMap = new HashMap<>(1); + twoWcsErrExitOutMap.put(twoWcsExitOutExitVt, 0); + allMap.put(twoWcsExitOutExit, twoWcsErrExitOutMap); + + Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); + if (errBoolean) { + log.info(orderNo+"->2楼出库确认后消除报警信息,写入点位成功{}", allMap); + } else { + log.info(orderNo+"->2楼出库确认后消除报警信息,写入点位失败{}", allMap); } } }