From 3d14b1056267a25dc8aa0ee72f117daa84045f5c Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 12 六月 2025 15:59:06 +0800
Subject: [PATCH] 添加 FireCommand 属性以处理火警任务类型

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
index 67f5f29..2e8dd63 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -3,6 +3,8 @@
 using WIDESEA_Core.Const;
 using WIDESEA_DTO.MOM;
 using WIDESEA_DTO.WMS;
+using WIDESEA_StorageTaskRepository;
+
 //using WIDESEAWCS_Model.Models;
 
 namespace WIDESEA_StorageTaskServices;
@@ -42,7 +44,6 @@
         WebResponseContent content = new WebResponseContent();
         try
         {
-
             // 鍒ゆ柇闇�涓嶉渶瑕佸幓鍖呰锛屼笉闇�瑕佸氨鍘诲父娓╀笁
             var stationManagers = _stationManagerRepository.QueryData(x => x.stationPLC == "1018" && x.stationArea == "Cache" && x.productLine == input.ProductionLine);
 
@@ -78,10 +79,10 @@
 
             // TODO 鍒ゆ柇鍦ㄩ�旀暟閲�
 
-            var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine);
-            var needCount = needBarcode.inLineNum;
+            var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine && x.fromArea == "CW");
+            var needCount =  BaseDal.QueryData(x => x.TargetAddress == needBarcode.toArea).Count();
             //var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
-            if (needCount < 2)
+            if (needCount < needBarcode.cacheNum)
             {
                 // 閫佽嚦鍖呰
                 List<string> strings = stationManagers.Where(x => x.stationType == 0 && x.productLine == input.ProductionLine).Select(x => x.Roadway).ToList();

--
Gitblit v1.9.3