From 09fde94b4790b90dccf35a24f6d3d1d2171b59dd Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 13 六月 2024 10:26:40 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java | 381 ++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 309 insertions(+), 72 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 9ca36f9..1be358f 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
@@ -1,8 +1,10 @@
package com.zy.asrs.wcs.core.action;
import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.zy.asrs.wcs.common.ExecuteSupport;
import com.zy.asrs.wcs.core.entity.Loc;
@@ -11,15 +13,13 @@
import com.zy.asrs.wcs.core.model.command.ShuttleAssignCommand;
import com.zy.asrs.wcs.core.model.command.ShuttleCommand;
import com.zy.asrs.wcs.core.model.command.ShuttleRedisCommand;
+import com.zy.asrs.wcs.core.model.enums.LocStsType;
import com.zy.asrs.wcs.core.model.enums.MotionCtgType;
import com.zy.asrs.wcs.core.model.enums.ShuttleCommandModeType;
import com.zy.asrs.wcs.core.model.enums.ShuttleTaskModeType;
import com.zy.asrs.wcs.core.service.BasShuttleService;
import com.zy.asrs.wcs.core.service.LocService;
-import com.zy.asrs.wcs.core.utils.NavigateMapUtils;
-import com.zy.asrs.wcs.core.utils.RedisUtil;
-import com.zy.asrs.wcs.core.utils.ShuttleDispatcher;
-import com.zy.asrs.wcs.core.utils.Utils;
+import com.zy.asrs.wcs.core.utils.*;
import com.zy.asrs.wcs.rcs.News;
import com.zy.asrs.wcs.rcs.cache.SlaveConnection;
import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant;
@@ -28,6 +28,8 @@
import com.zy.asrs.wcs.rcs.model.enums.SlaveType;
import com.zy.asrs.wcs.rcs.model.protocol.ShuttleProtocol;
import com.zy.asrs.wcs.rcs.thread.ShuttleThread;
+import com.zy.asrs.wcs.system.entity.Dict;
+import com.zy.asrs.wcs.system.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -50,6 +52,10 @@
private ShuttleDispatcher shuttleDispatcher;
@Autowired
private ObjectMapper objectMapper;
+ @Autowired
+ private DictService dictService;
+ @Autowired
+ private ConveyorDispatcher conveyorDispatcher;
public synchronized boolean assignWork(Device device, ShuttleAssignCommand assignCommand) {
ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, device.getId().intValue());
@@ -69,7 +75,7 @@
redisCommand.setCommandStep(0);//鍛戒护鎵ц姝ュ簭
redisCommand.setAssignCommand(assignCommand);//鍛戒护
//浠诲姟鏁版嵁淇濆瓨鍒皉edis
- if (redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + assignCommand.getTaskNo(), JSON.toJSONString(redisCommand))) {
+ if (redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + assignCommand.getTaskNo(), JSON.toJSONString(redisCommand, SerializerFeature.DisableCircularReferenceDetect))) {
if (assignCommand.getTaskMode() == ShuttleTaskModeType.PAK_IN.id
|| assignCommand.getTaskMode() == ShuttleTaskModeType.PAK_OUT.id
|| assignCommand.getTaskMode() == ShuttleTaskModeType.MOVE_LOC_NO.id
@@ -134,7 +140,15 @@
if (command.getTargetLocNo().equals(shuttleProtocol.getCurrentLocNo())) {
command.setComplete(true);
//瑙i攣閿佸畾璺緞锛屼笂涓�鏉¤矾寰�
- List<NavigateNode> nodes = JSON.parseArray(JSON.toJSONString(command.getNodes()), NavigateNode.class);//杩涜娣卞害copy
+ List<NavigateNode> nodes = null;
+ try {
+ String nodesStr = objectMapper.writeValueAsString(command.getNodes());
+ nodes = objectMapper.readValue(nodesStr, new TypeReference<List<NavigateNode>>() {
+ });
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException(e);
+ }
+
if (nodes != null) {
NavigateNode targetNode = assignCommand.getNodes().get(assignCommand.getNodes().size() - 1);//鏈�缁堣妭鐐�
NavigateNode node = nodes.get(nodes.size() - 1);
@@ -174,7 +188,7 @@
}
// 鏇存柊redis鏁版嵁
- redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + redisCommand.getTaskNo(), JSON.toJSONString(redisCommand));
+ redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + redisCommand.getTaskNo(), JSON.toJSONString(redisCommand, SerializerFeature.DisableCircularReferenceDetect));
if (!command.getComplete()) {
return false;
@@ -266,77 +280,240 @@
}
int lev = Utils.getLev(shuttleProtocol.getCurrentLocNo());//灏忚溅褰撳墠妤煎眰
- if (shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) {
- //璺戝簱缁撴潫
- shuttleProtocol.setMoveLoc(false);
- shuttleProtocol.setMoveType(0);
- shuttleProtocol.setXStart(0);
- shuttleProtocol.setXTarget(0);
- shuttleProtocol.setXCurrent(0);
- shuttleProtocol.setYStart(0);
- shuttleProtocol.setYTarget(0);
- shuttleProtocol.setYCurrent(0);
- return;
- }
if (shuttleProtocol.getMoveType() == 0) {//璺戣建閬�
- Integer xCurrent = shuttleProtocol.getXCurrent();
- if (xCurrent > shuttleProtocol.getXTarget()) {//褰揦鍊煎ぇ浜嶺鐩爣鍊硷紝杩涜褰掗浂涓擸鏂瑰悜+1
- shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());
- shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);
+ //鏍规嵁鍦板浘鏂瑰悜鍐冲畾璺憍鎴杫
+ Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>()
+ .eq(Dict::getFlag, "direction_map")
+ .eq(Dict::getStatus, 1));
+ if (dict == null) {
+ //璺戝簱缁撴潫
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
return;
}
+ String direction = dict.getValue();
- Integer yCurrent = shuttleProtocol.getYCurrent();
- String locNo = Utils.getLocNo(xCurrent, yCurrent, lev);
- Loc target = locService.getOne(new LambdaQueryWrapper<Loc>()
- .eq(Loc::getLocNo, locNo)
- .eq(Loc::getHostId, device.getHostId()));
- if (target == null) {
- shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
- return;
- }
-
-// if (!target.getLocSts().equals("O")) {
-// shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
-// return;
-// }
-
- //璋冨害鍘荤洰鏍囦綅缃�
- if (shuttleProtocol.getCurrentLocNo().equals(target.getLocNo())) {
- shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);//灏忚溅鍜岀洰鏍囦綅缃竴鑷达紝璺宠繃
- } else {
- shuttleDispatcher.generateMoveTask(device, target.getLocNo());
- shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
- }
- } else if (shuttleProtocol.getMoveType() == 1) {//璺戝簱浣�
- ArrayList<String> locs = new ArrayList<>();
- for (int i = shuttleProtocol.getXCurrent(); i <= shuttleProtocol.getXTarget(); i++) {
- String locNo = Utils.getLocNo(i, shuttleProtocol.getYCurrent(), lev);
- locs.add(locNo);
- }
-
- List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>()
- .in(Loc::getLocNo, locs));
- if (locList.isEmpty()) {
- //绌哄簱浣�
- shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);
- return;
- }
-
- Loc start = locList.get(0);
- Loc target = locList.get(locList.size() - 1);
- //鍒ゆ柇灏忚溅鏄惁鍦ㄨ捣鐐逛綅缃�
- if (!shuttleProtocol.getCurrentLocNo().equals(start.getLocNo())) {//涓嶅湪璧风偣浣嶇疆锛岃皟搴﹀幓璧风偣浣嶇疆
- shuttleDispatcher.generateMoveTask(device, start.getLocNo());
- }else {
- //鍦ㄨ捣鐐逛綅缃紝璋冨害鍘荤洰鏍囦綅缃�
- if (shuttleProtocol.getCurrentLocNo().equals(target.getLocNo())) {
- shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);//灏忚溅鍜岀洰鏍囦綅缃竴鑷达紝璺宠繃
- }else {
- shuttleDispatcher.generateMoveTask(device, start.getLocNo());
- shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);
+ if (direction.equals("y")) {//璺憍杞存柟鍚戯紝璺戝畬x杞村啀鍒囨崲y杞�
+ ArrayList<String> locs = new ArrayList<>();
+ for (int i = shuttleProtocol.getXCurrent(); i <= shuttleProtocol.getXTarget(); i++) {
+ String locNo = Utils.getLocNo(i, shuttleProtocol.getYCurrent(), lev);
+ locs.add(locNo);
}
+
+ List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getLocSts, LocStsType.O.val())
+ .in(Loc::getLocNo, locs));
+ if (locList.isEmpty()) {
+ //绌哄簱浣�
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);
+ return;
+ }
+
+ Loc start = locList.get(0);
+ Loc target = locList.get(locList.size() - 1);
+ //鍒ゆ柇灏忚溅鏄惁鍦ㄨ捣鐐逛綅缃�
+ if (!shuttleProtocol.getCurrentLocNo().equals(start.getLocNo())) {//涓嶅湪璧风偣浣嶇疆锛岃皟搴﹀幓璧风偣浣嶇疆
+ shuttleDispatcher.generateMoveTask(device, start.getLocNo());
+ }else {
+ //鍦ㄨ捣鐐逛綅缃紝璋冨害鍘荤洰鏍囦綅缃�
+ shuttleDispatcher.generateMoveTask(device, target.getLocNo());
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);//鍒囨崲y杞�
+
+ if(shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) {
+ //y杞翠篃璺戝畬浜嗭紝缁撴潫璺戝簱
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ }
+ }else {//璺憏杞存柟鍚戯紝璺戝畬y杞村啀鍒囨崲x杞�
+ ArrayList<String> locs = new ArrayList<>();
+ for (int i = shuttleProtocol.getYCurrent(); i <= shuttleProtocol.getYTarget(); i++) {
+ String locNo = Utils.getLocNo(shuttleProtocol.getXCurrent(), i, lev);
+ locs.add(locNo);
+ }
+
+ List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getLocSts, LocStsType.O.val())
+ .in(Loc::getLocNo, locs));
+ if (locList.isEmpty()) {
+ //绌哄簱浣�
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
+ return;
+ }
+
+ Loc start = locList.get(0);
+ Loc target = locList.get(locList.size() - 1);
+ //鍒ゆ柇灏忚溅鏄惁鍦ㄨ捣鐐逛綅缃�
+ if (!shuttleProtocol.getCurrentLocNo().equals(start.getLocNo())) {//涓嶅湪璧风偣浣嶇疆锛岃皟搴﹀幓璧风偣浣嶇疆
+ shuttleDispatcher.generateMoveTask(device, start.getLocNo());
+ }else {
+ //鍦ㄨ捣鐐逛綅缃紝璋冨害鍘荤洰鏍囦綅缃�
+ shuttleDispatcher.generateMoveTask(device, target.getLocNo());
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);//鍒囨崲x杞�
+
+ if(shuttleProtocol.getXCurrent() > shuttleProtocol.getXTarget()) {
+ //y杞翠篃璺戝畬浜嗭紝缁撴潫璺戝簱
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ }
+ }
+
+ } else if (shuttleProtocol.getMoveType() == 1) {//璺戝簱浣�
+ //鏍规嵁鍦板浘鏂瑰悜鍐冲畾璺憍鎴杫
+ Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>()
+ .eq(Dict::getFlag, "direction_map")
+ .eq(Dict::getStatus, 1));
+ if (dict == null) {
+ //璺戝簱缁撴潫
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ String direction = dict.getValue();
+
+ if (direction.equals("y")) {//璺憍杞存柟鍚戯紝璺戝畬x杞村啀鍒囨崲y杞�
+ Integer xCurrent = shuttleProtocol.getXCurrent();
+
+ //鑾峰彇寰呰窇搴撲綅鍙�
+ String locNo = Utils.getLocNo(xCurrent, shuttleProtocol.getYCurrent(), lev);
+ Loc target = locService.getOne(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getLocNo, locNo)
+ .eq(Loc::getLocSts, LocStsType.O.val())
+ .eq(Loc::getHostId, device.getHostId()));
+ if (target == null || shuttleProtocol.getCurrentLocNo().equals(locNo)) {//搴撲綅涓嶅瓨鍦ㄦ垨灏忚溅宸插湪褰撳墠浣嶇疆
+ shuttleProtocol.setXCurrent(xCurrent + 1);
+ if (shuttleProtocol.getXCurrent() > shuttleProtocol.getXTarget()) {
+ //x杞磋窇瀹岋紝鍒囨崲y杞�
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);
+
+ if(shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) {
+ //y杞翠篃璺戝畬浜嗭紝缁撴潫璺戝簱
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ }
+ return;
+ }
+
+ //璋冨害鍘诲簱浣�
+ Task task = shuttleDispatcher.generateMoveTask(device, locNo);
+ if (task == null) {
+ return;//璋冨害澶辫触
+ }
+
+ shuttleProtocol.setXCurrent(xCurrent + 1);
+ if (shuttleProtocol.getXCurrent() > shuttleProtocol.getXTarget()) {
+ //x杞磋窇瀹岋紝鍒囨崲y杞�
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYCurrent() + 1);
+
+ if(shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) {
+ //y杞翠篃璺戝畬浜嗭紝缁撴潫璺戝簱
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ }
+
+ }else {//璺憏杞存柟鍚戯紝璺戝畬y杞村啀鍒囨崲x杞�
+ Integer yCurrent = shuttleProtocol.getYCurrent();
+
+ //鑾峰彇寰呰窇搴撲綅鍙�
+ String locNo = Utils.getLocNo(shuttleProtocol.getXCurrent(), yCurrent, lev);
+ Loc target = locService.getOne(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getLocNo, locNo)
+ .eq(Loc::getLocSts, LocStsType.O.val())
+ .eq(Loc::getHostId, device.getHostId()));
+ if (target == null || shuttleProtocol.getCurrentLocNo().equals(locNo)) {//搴撲綅涓嶅瓨鍦ㄦ垨灏忚溅宸插湪褰撳墠浣嶇疆
+ shuttleProtocol.setYCurrent(yCurrent + 1);
+ if (shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) {
+ //y杞磋窇瀹岋紝鍒囨崲x杞�
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYStart());
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
+
+ if(shuttleProtocol.getXCurrent() > shuttleProtocol.getXTarget()) {
+ //x杞翠篃璺戝畬浜嗭紝缁撴潫璺戝簱
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ }
+ }
+
+ //璋冨害鍘诲簱浣�
+ Task task = shuttleDispatcher.generateMoveTask(device, locNo);
+ if (task == null) {
+ return;//璋冨害澶辫触
+ }
+
+ shuttleProtocol.setYCurrent(yCurrent + 1);
+ if (shuttleProtocol.getYCurrent() > shuttleProtocol.getYTarget()) {
+ //y杞磋窇瀹岋紝鍒囨崲x杞�
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYStart());
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
+
+ if(shuttleProtocol.getXCurrent() > shuttleProtocol.getXTarget()) {
+ //x杞翠篃璺戝畬浜嗭紝缁撴潫璺戝簱
+ shuttleProtocol.setMoveLoc(false);
+ shuttleProtocol.setMoveType(0);
+ shuttleProtocol.setXStart(0);
+ shuttleProtocol.setXTarget(0);
+ shuttleProtocol.setXCurrent(0);
+ shuttleProtocol.setYStart(0);
+ shuttleProtocol.setYTarget(0);
+ shuttleProtocol.setYCurrent(0);
+ return;
+ }
+ }
+
}
} else if (shuttleProtocol.getMoveType() == 2) {//姣嶈建閬撳惊鐜窇
Integer xCurrent = shuttleProtocol.getXCurrent();
@@ -382,6 +559,66 @@
}
}
}
+ } else if (shuttleProtocol.getMoveType() == 4) {//鍙栨斁璐�
+ Integer xCurrent = shuttleProtocol.getXCurrent();
+ if (xCurrent > shuttleProtocol.getXTarget()) {//褰揦鍊煎ぇ浜嶺鐩爣鍊�
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());
+ shuttleProtocol.setYCurrent(shuttleProtocol.getYStart());
+ return;
+ }
+
+ //鍒ゆ柇x杞磋揣浣嶆槸鍚︽斁婊�
+ boolean flag = true;
+ for (Loc loc : locService.list(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getHostId, device.getHostId())
+ .eq(Loc::getRow, xCurrent)
+ .ge(Loc::getBay, shuttleProtocol.getYStart())
+ .le(Loc::getBay, shuttleProtocol.getYTarget()))) {
+ if (loc.getLocSts() != LocStsType.F.val()) {
+ flag = false;//鏈弧
+ break;
+ }
+ }
+ if (flag) {
+ shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
+ return;
+ }
+
+ //鎼滅储鏈夎揣搴撲綅
+ List<Loc> list = locService.list(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getLocSts, LocStsType.F.val())
+ .eq(Loc::getHostId, device.getHostId())
+ .notIn(Loc::getRow, xCurrent)
+ .eq(Loc::getStatus, 1));
+ if (list.isEmpty()) {
+ return;
+ }
+
+ Loc start = list.get(0);
+
+ List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getHostId, device.getHostId())
+ .eq(Loc::getStatus, 1)
+ .eq(Loc::getLocSts, LocStsType.O.val())
+ .eq(Loc::getRow, xCurrent)
+ .orderByDesc(Loc::getBay)
+ .orderByAsc(Loc::getRow));
+ if (locList.isEmpty()) {
+ return;
+ }
+
+ Loc target = locList.get(0);
+ if (target == null) {
+ return;
+ }
+
+ //璋冨害鍘荤洰鏍囦綅缃�
+ if (!shuttleProtocol.getCurrentLocNo().equals(target.getLocNo())) {
+ Task task = shuttleDispatcher.generateManuaTakeMoveTask(device, start.getLocNo(), target.getLocNo());
+// if(task != null) {//璋冨害鎴愬姛
+// shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
+// }
+ }
}
}
--
Gitblit v1.9.1