From 5ff701e6cbc25ba4071dbcb390b8fd214a87aee8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 12 十一月 2024 17:03:09 +0800
Subject: [PATCH] #
---
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java | 3 +++
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Task.java | 4 ++++
zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java | 2 +-
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
index e4f93bf..9544127 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -544,6 +544,9 @@
if (!agvService.judgeEnable(agv.getId())) {
return false;
}
+ if (!Cools.isEmpty(taskService.selectInSts(agv.getId(), TaskStsType.ASSIGN, TaskStsType.PROGRESS))) {
+ throw new CoolException("AGV[" + agv.getUuid() + "] failed to assign锛宐ecause already has the task in running...");
+ }
Date now = new Date();
Code endCode = null;
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java
index 9da761a..976a281 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java
@@ -70,7 +70,7 @@
List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>().eq(Agv::getStatus, StatusType.ENABLE.val));
// init executorService
if (null == this.executorService) {
- int count = agvList.size() > 30 ? agvList.size() : 20;
+ int count = agvList.size() > 30 ? 20 : agvList.size();
this.executorService = Executors.newFixedThreadPool(count);
}
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Task.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Task.java
index 40807f5..e585a05 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Task.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Task.java
@@ -402,6 +402,8 @@
}
if (!Cools.isEmpty(oriDesc) && null != this.oriCode) {
oriDesc = oriDesc + " (" + this.getOriCode$() + ")";
+ } else {
+ oriDesc = "CODE" + " - " + this.getOriCode$();
}
return oriDesc;
}
@@ -416,6 +418,8 @@
}
if (!Cools.isEmpty(destDesc) && null != this.destCode) {
destDesc = destDesc + " (" + this.getDestCode$() + ")";
+ } else {
+ destDesc = "CODE" + " - " + this.getDestCode$();
}
return destDesc;
}
--
Gitblit v1.9.1