From 0a9ca0a0c1dc8a364fe1ce71af37f880a0365b36 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 08 六月 2024 12:32:32 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java | 58 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 29 insertions(+), 29 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 e3ef211..1bcdc9e 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
@@ -2,14 +2,12 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.framework.common.Cools;
-import com.zy.asrs.framework.common.R;
import com.zy.asrs.wcs.core.domain.dto.MotionDto;
import com.zy.asrs.wcs.core.entity.ShuttleStandby;
import com.zy.asrs.wcs.core.entity.Task;
import com.zy.asrs.wcs.core.model.enums.DeviceCtgType;
import com.zy.asrs.wcs.core.model.enums.MotionCtgType;
import com.zy.asrs.wcs.core.model.enums.TaskStsType;
-import com.zy.asrs.wcs.core.model.enums.WorkZoneType;
import com.zy.asrs.wcs.core.service.ShuttleStandbyService;
import com.zy.asrs.wcs.core.service.TaskService;
import com.zy.asrs.wcs.core.utils.ConveyorDispatcher;
@@ -19,7 +17,6 @@
import com.zy.asrs.wcs.rcs.cache.SlaveConnection;
import com.zy.asrs.wcs.core.entity.Motion;
import com.zy.asrs.wcs.rcs.entity.Device;
-import com.zy.asrs.wcs.rcs.model.enums.LiftProtocolStatusType;
import com.zy.asrs.wcs.rcs.model.enums.SlaveType;
import com.zy.asrs.wcs.rcs.model.protocol.LiftProtocol;
import com.zy.asrs.wcs.rcs.model.protocol.ShuttleProtocol;
@@ -32,10 +29,9 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Objects;
/**
- * todo:luxiaotao 1.鍏呯數浠诲姟锛�2.搴撲綅绉昏浆锛�3.灏忚溅杩佺Щ
+ * 1.鍏呯數浠诲姟锛�2.搴撲綅绉昏浆锛�3.灏忚溅杩佺Щ锛�4.鎵嬪姩浠诲姟
* Created by vincent on 2023/10/11
*/
@Service
@@ -996,18 +992,20 @@
// 鍒ゆ柇绌挎杞︽槸鍚﹀湪鐩爣灞�
if (Utils.getLev(shuttleLocNo) == Utils.getLev(locNo)) {
- // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
- motionList.addAll(kernelService.shuttleMove(
- MotionDto.build((dto -> {
- dto.setShuttleNo(shuttleDevice.getId().intValue());
- dto.setLocNo(shuttleLocNo);
- })),
- MotionDto.build((dto -> {
- dto.setShuttleNo(shuttleDevice.getId().intValue());
- dto.setLocNo(locNo);
- })),
- MotionCtgType.SHUTTLE_MOVE
- ));
+ if (!shuttleLocNo.equals(locNo)) {//灏忚溅涓嶅湪鐩爣搴撲綅
+ // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
+ motionList.addAll(kernelService.shuttleMove(
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(shuttleLocNo);
+ })),
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(locNo);
+ })),
+ MotionCtgType.SHUTTLE_MOVE
+ ));
+ }
} else {
//灏忚溅璺ㄥ眰
@@ -1202,18 +1200,20 @@
// 鍒ゆ柇绌挎杞︽槸鍚﹀湪鐩爣灞�
if (Utils.getLev(shuttleLocNo) == Utils.getLev(targetLoc)) {
- // 绌挎杞﹁蛋琛岃嚦婧愬簱浣�
- motionList.addAll(kernelService.shuttleMove(
- MotionDto.build((dto -> {
- dto.setShuttleNo(device.getId().intValue());
- dto.setLocNo(shuttleLocNo);
- })),
- MotionDto.build((dto -> {
- dto.setShuttleNo(device.getId().intValue());
- dto.setLocNo(sourceLoc);
- })),
- MotionCtgType.SHUTTLE_MOVE
- ));
+ if (!shuttleLocNo.equals(sourceLoc)) {//灏忚溅涓嶅湪鐩爣搴撲綅
+ // 绌挎杞﹁蛋琛岃嚦婧愬簱浣�
+ motionList.addAll(kernelService.shuttleMove(
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(device.getId().intValue());
+ dto.setLocNo(shuttleLocNo);
+ })),
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(device.getId().intValue());
+ dto.setLocNo(sourceLoc);
+ })),
+ MotionCtgType.SHUTTLE_MOVE
+ ));
+ }
//鎵樼洏椤跺崌
motionList.add(Motion.build(motion -> {
--
Gitblit v1.9.1