From e62c1e7ff1fa9623ac3f8e6aa35ad44b725a21ed Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期三, 10 七月 2024 17:52:40 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java | 55 ++++++++++++++++++++++++------------------------------- 1 files changed, 24 insertions(+), 31 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java index f3d9b42..46b9d35 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java @@ -117,13 +117,6 @@ return motionList; } - //妫�娴嬫彁鍗囨満鏄惁鏈変换鍔$粦瀹� - boolean liftResult = Utils.checkLiftHasBinding(Integer.parseInt(transferLiftDevice.getDeviceNo())); - if (liftResult) { - //瀛樺湪浠诲姟锛岀姝㈣В鏋� - return motionList; - } - //鑾峰彇灏忚溅寰呮満搴撲綅 ==> 杩涙彁鍗囨満 ShuttleStandby shuttleStandbyTo = shuttleStandbyService.getOne(new LambdaQueryWrapper<ShuttleStandby>() .eq(ShuttleStandby::getDeviceId, transferLiftDevice.getId()) @@ -165,6 +158,7 @@ dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLev(Utils.getLev(task.getDestLoc())); dto.setStaNo(0);//鎻愬崌鏈哄唴渚� + dto.setSync(0);//寮傛鎵ц })) )); @@ -176,7 +170,6 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); - dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(standbyLocNoTo); })), MotionCtgType.SHUTTLE_MOVE @@ -232,6 +225,7 @@ null , MotionDto.build((dto -> { dto.setLiftNo(transferLiftDevice.getId().intValue()); + dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満 })) )); @@ -381,6 +375,7 @@ null , MotionDto.build((dto -> { dto.setLiftNo(transferLiftDevice.getId().intValue()); + dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満 })) )); @@ -453,13 +448,6 @@ //妫�娴嬬┛姊溅鏄惁鏈変换鍔$粦瀹� boolean shuttleResult = Utils.checkShuttleHasBinding(shuttleDevice, task.getTaskNo()); if (shuttleResult) { - //瀛樺湪浠诲姟锛岀姝㈣В鏋� - return motionList; - } - - //妫�娴嬫彁鍗囨満鏄惁鏈変换鍔$粦瀹� - boolean liftResult = Utils.checkLiftHasBinding(Integer.parseInt(transferLiftDevice.getDeviceNo())); - if (liftResult) { //瀛樺湪浠诲姟锛岀姝㈣В鏋� return motionList; } @@ -634,6 +622,8 @@ dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLev(5);//绱㈢墝椤圭洰5灞傛槸杈撻�佺嚎灞� dto.setStaNo(1);//鎻愬崌鏈哄乏渚� + dto.setSync(0);//寮傛鎵ц + dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満 })) )); @@ -779,6 +769,7 @@ null , MotionDto.build((dto -> { dto.setLiftNo(transferLiftDevice.getId().intValue()); + dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満 })) )); @@ -814,17 +805,17 @@ MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); dto.setLiftNo(transferLiftDevice.getId().intValue()); - dto.setLocNo(standbyLocNoTo); + dto.setLocNo(standbyLocNoFrom); })), MotionCtgType.SHUTTLE_MOVE )); - // 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰 + // 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌鐩爣灞� motionList.addAll(kernelService.liftMove( null , MotionDto.build((dto -> { dto.setLiftNo(transferLiftDevice.getId().intValue()); - dto.setLev(Utils.getLev(shuttleLocNo)); + dto.setLev(Utils.getLev(originLoc)); })) )); @@ -840,12 +831,12 @@ motionList.addAll(kernelService.shuttleMove( MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); - dto.setLocNo(standbyLocNoTo); + dto.setLocNo(standbyLocNoFrom); })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); dto.setLiftNo(transferLiftDevice.getId().intValue()); - dto.setLocNo(liftLocNoTo); + dto.setLocNo(liftLocNoFrom); })), MotionCtgType.SHUTTLE_MOVE_TO_LIFT )); @@ -892,6 +883,7 @@ dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLev(5);//绱㈢墝椤圭洰5灞傛槸杈撻�佺嚎灞� dto.setStaNo(1);//鎻愬崌鏈哄乏渚� + dto.setSync(0);//寮傛鎵ц })) )); @@ -976,13 +968,6 @@ //妫�娴嬬┛姊溅鏄惁鏈変换鍔$粦瀹� boolean shuttleResult = Utils.checkShuttleHasBinding(shuttleDevice, task.getTaskNo()); if (shuttleResult) { - //瀛樺湪浠诲姟锛岀姝㈣В鏋� - return motionList; - } - - //妫�娴嬫彁鍗囨満鏄惁鏈変换鍔$粦瀹� - boolean liftResult = Utils.checkLiftHasBinding(Integer.parseInt(transferLiftDevice.getDeviceNo())); - if (liftResult) { //瀛樺湪浠诲姟锛岀姝㈣В鏋� return motionList; } @@ -1148,16 +1133,15 @@ MotionCtgType.SHUTTLE_MOVE )); - task.setLiftNo(Integer.parseInt(transferLiftDevice.getDeviceNo())); - taskService.updateById(task); } // 绌挎杞﹀紑濮嬪厖鐢� - motionList.addAll(kernelService.shuttleCharge( + motionList.addAll(kernelService.shuttleAction( null, MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); - })) + })), + MotionCtgType.SHUTTLE_CHARGE_ON )); return motionList; @@ -1195,6 +1179,15 @@ // 鍒ゆ柇绌挎杞︽槸鍚﹀湪鐩爣灞� if (Utils.getLev(shuttleLocNo) == Utils.getLev(locNo)) { + // 绌挎杞﹀叧闂厖鐢� + motionList.addAll(kernelService.shuttleAction( + null, + MotionDto.build((dto -> { + dto.setShuttleNo(shuttleDevice.getId().intValue()); + })), + MotionCtgType.SHUTTLE_CHARGE_OFF + )); + // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅 motionList.addAll(kernelService.shuttleMove( MotionDto.build((dto -> { -- Gitblit v1.9.1