From f43b508dda7334487a1640b0bbd908d7b3aa3cb6 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期二, 15 十月 2024 13:14:28 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java index 44bcacd..730dcd8 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java @@ -133,12 +133,14 @@ int commandStep = redisCommand.getCommandStep(); // 瀹岀粨涓婁竴鏉″懡浠� + boolean updateCommand = false; if (commandStep != 0) { ShuttleCommand command = commands.get(commandStep - 1); if (command.getMode() == ShuttleCommandModeType.MOVE.id) { // 姝e父绉诲姩 if (command.getTargetLocNo().equals(shuttleProtocol.getCurrentLocNo())) { command.setComplete(true); + updateCommand = true; //瑙i攣閿佸畾璺緞锛屼笂涓�鏉¤矾寰� List<NavigateNode> nodes = null; try { @@ -166,6 +168,7 @@ //鍒ゆ柇鏄惁椤跺崌鍒颁綅 if (shuttleProtocol.getHasLift()) { command.setComplete(true); + updateCommand = true; // //鍒ゆ柇鏄惁鏈夌墿 // if (shuttleProtocol.getHasPallet()) { // command.setComplete(true); @@ -176,19 +179,24 @@ // 鍒ゆ柇鏄惁涓嬮檷鍒颁綅 if (!shuttleProtocol.getHasLift()) { command.setComplete(true); + updateCommand = true; } } else if (command.getMode() == ShuttleCommandModeType.CHARGE_OPEN.id) { // 鍏呯數寮� //鍒ゆ柇灏忚溅鍏呯數鐘舵�� if (shuttleProtocol.getHasCharge()) { command.setComplete(true); + updateCommand = true; } }else { command.setComplete(true);//鍏朵粬鍛戒护榛樿璁や负瀹屾垚 + updateCommand = true; } - // 鏇存柊redis鏁版嵁 - redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + redisCommand.getTaskNo(), JSON.toJSONString(redisCommand, SerializerFeature.DisableCircularReferenceDetect)); + if(updateCommand) { + // 鏇存柊redis鏁版嵁 + redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + redisCommand.getTaskNo(), JSON.toJSONString(redisCommand, SerializerFeature.DisableCircularReferenceDetect)); + } if (!command.getComplete()) { return false; -- Gitblit v1.9.1