From 86d66bb8ee2dc8ef8d020ac906d14347eb7f24df Mon Sep 17 00:00:00 2001
From: TanYibin <5491541@qq.com>
Date: Tue, 30 May 2023 17:45:14 +0800
Subject: [PATCH] 修复双升位移库任务BUG

---
 huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
index 7530938..a95b252 100644
--- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
+++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
@@ -327,9 +327,9 @@ public class WcsServiceImpl implements WcsService {
                 // 如果对应内侧库位有托盘
                 if (StringUtils.isNotEmpty(insideLocation.getContainerCode())) {
                     // 如果对应内侧库位有托盘数据,那么不可能会有入库类型的任务,因为正在执行的入库类型的任务 库位是不会有托盘数据的。
-                    TaskHeader taskHeader1 = taskHeaderService.getUnCompleteTaskByFromLocationCode(insideLocationCode, warehouseCode);
-                    if (taskHeader1 != null) {
-                        preTaskNo = taskHeader1.getId();
+                    TaskHeader unCompleteTaskHeader = taskHeaderService.getUnCompleteTaskByFromLocationCode(insideLocationCode, warehouseCode);
+                    if (unCompleteTaskHeader != null) {
+                        preTaskNo = unCompleteTaskHeader.getId();
                     } else {
                         // 找空闲库位,优先找外侧空闲库位,作为移库目的地
                         Location destinationLocation = locationService.getEmptyLocation(insideLocation);
@@ -351,14 +351,14 @@ public class WcsServiceImpl implements WcsService {
                     }
                 } else {
                     // 如果是有任务,从这个库位入托盘,那么不能生成新的出库任务。必须等这个任务完成以后,重新生成新的移库后,这个任务才能执行。
-                    TaskHeader taskHeader1 = taskHeaderService.getUnCompleteTaskByToLocationCode(insideLocationCode, warehouseCode);
-                    if (taskHeader1 != null) {
+                    TaskHeader unCompleteTaskHeader = taskHeaderService.getUnCompleteTaskByToLocationCode(insideLocationCode, warehouseCode);
+                    if (unCompleteTaskHeader != null) {
                         return Result.error("执行外侧库位出库时,相应的内侧库位有入库类型任务,请先执行完内侧库位任务");
                     }
                     // 如果是有任务,从这个库位出托盘,那么等这个任务作为前置任务。
-                    taskHeader1 = taskHeaderService.getUnCompleteTaskByFromLocationCode(insideLocationCode, warehouseCode);
-                    if (taskHeader1 != null) {
-                        preTaskNo = taskHeader1.getId();
+                    unCompleteTaskHeader = taskHeaderService.getUnCompleteTaskByFromLocationCode(insideLocationCode, warehouseCode);
+                    if (unCompleteTaskHeader != null) {
+                        preTaskNo = unCompleteTaskHeader.getId();
                     }
                 }
                 taskHeader.setPreTaskNo(preTaskNo);
--
libgit2 0.22.2