From 3972e8c404643dbdf6cd88f177349d4505411983 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@gmail.com>
Date: 星期四, 17 四月 2025 10:33:08 +0800
Subject: [PATCH] #
---
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java
index b9bd4c9..7100cb6 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java
@@ -226,13 +226,13 @@
oriLoc.setLocSts(complete?LocStsType.IDLE.val():LocStsType.STOCK.val());
oriLoc.setUpdateTime(now);
if (!locService.updateById(oriLoc)) {
- throw new BusinessException("Loc [" + task.getOriLoc$() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ throw new BusinessException("Loc [" + oriLoc.getLocNo() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
}
destLoc.setLocSts(complete?LocStsType.STOCK.val():LocStsType.IDLE.val());
destLoc.setUpdateTime(now);
if (!locService.updateById(destLoc)) {
- throw new BusinessException("Loc [" + task.getDestLoc$() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ throw new BusinessException("Loc [" + destLoc.getLocNo() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
}
break;
case LOC_TO_STA:
@@ -240,18 +240,45 @@
oriLoc.setLocSts(complete?LocStsType.IDLE.val():LocStsType.STOCK.val());
oriLoc.setUpdateTime(now);
if (!locService.updateById(oriLoc)) {
- throw new BusinessException("Loc [" + task.getOriLoc$() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ throw new BusinessException("Loc [" + oriLoc.getLocNo() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ }
+
+ destSta = staService.getById(task.getDestSta());
+ destSta.setStaSts(complete?StaStsType.STOCK.val():StaStsType.IDLE.val());
+ destSta.setUpdateTime(now);
+ if (!staService.updateById(destSta)) {
+ throw new BusinessException("Sta [" + destSta.getStaNo() + "] 绔欑偣淇敼鐘舵�佸け璐� 锛侊紒锛�");
}
break;
case STA_TO_LOC:
+ oriSta = staService.getById(task.getOriSta());
+ oriSta.setStaSts(complete?StaStsType.IDLE.val():StaStsType.STOCK.val());
+ oriSta.setUpdateTime(now);
+ if (!staService.updateById(oriSta)) {
+ throw new BusinessException("Sta [" + oriSta.getStaNo() + "] 绔欑偣淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ }
+
destLoc = locService.getById(task.getDestLoc());
destLoc.setLocSts(complete?LocStsType.STOCK.val():LocStsType.IDLE.val());
destLoc.setUpdateTime(now);
if (!locService.updateById(destLoc)) {
- throw new BusinessException("Loc [" + task.getDestLoc$() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ throw new BusinessException("Loc [" + destLoc.getLocNo() + "] 搴撲綅淇敼鐘舵�佸け璐� 锛侊紒锛�");
}
break;
case STA_TO_STA:
+ oriSta = staService.getById(task.getOriSta());
+ oriSta.setStaSts(complete?StaStsType.IDLE.val():StaStsType.STOCK.val());
+ oriSta.setUpdateTime(now);
+ if (!staService.updateById(oriSta)) {
+ throw new BusinessException("Sta [" + oriSta.getStaNo() + "] 绔欑偣淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ }
+
+ destSta = staService.getById(task.getDestSta());
+ destSta.setStaSts(complete?StaStsType.STOCK.val():StaStsType.IDLE.val());
+ destSta.setUpdateTime(now);
+ if (!staService.updateById(destSta)) {
+ throw new BusinessException("Sta [" + destSta.getStaNo() + "] 绔欑偣淇敼鐘舵�佸け璐� 锛侊紒锛�");
+ }
break;
case TO_CHARGE:
case TO_STANDBY:
--
Gitblit v1.9.1