From 092f6e9efb6e4c2bc401ec134391ab0a25773b47 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期五, 21 二月 2025 16:41:38 +0800
Subject: [PATCH] PP仓提升机侧输送线流程

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 27a206e..b42d17e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -333,7 +333,16 @@
         {
             try
             {
-                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA57.ToString());
+                string line = string.Empty;
+                if (!model.Line.Contains("SCUTL"))
+                {
+                    line = WarehouseEnum.HA58.ToString();
+                }
+                else
+                {
+                    line = WarehouseEnum.HA57.ToString();
+                }
+                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == line);
                 if (warehouse == null)
                 {
                     return MesResponseContent.Instance.Error($"浠撳簱鍩虹淇℃伅鏈厤缃�");
@@ -431,11 +440,11 @@
                     return MesResponseContent.Instance.Error($"鏈瘑鍒鎵樼洏绫诲瀷锛岃纭鎵樼洏鍙�");
                 }
 
-                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode == WarehouseEnum.HA57.ToString());
+                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == palletTypeInfo.WarehouseId);
 
-                
-                Dt_StockInfo_Hty stockInfo_Hty = _stockRepository.StockInfo_HtyRepository.QueryData(x=>x.PalletCode== model.CarrierCode).OrderByDescending(x=>x.SourceId).First();
-                Dt_StockInfoDetail_Hty stockInfoDetail_Hty = _stockRepository.StockInfoDetail_HtyRepository.QueryFirst(x => x.StockId==stockInfo_Hty.SourceId);
+
+                Dt_StockInfo_Hty stockInfo_Hty = _stockRepository.StockInfo_HtyRepository.QueryData(x => x.PalletCode == model.CarrierCode).OrderByDescending(x => x.SourceId).First();
+                Dt_StockInfoDetail_Hty stockInfoDetail_Hty = _stockRepository.StockInfoDetail_HtyRepository.QueryFirst(x => x.StockId == stockInfo_Hty.SourceId);
 
                 Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
                 {
@@ -458,7 +467,7 @@
                     PalletType = palletTypeInfo.PalletType,
                     WarehouseId = warehouse.WarehouseId,
                     StockStatus = StockStatusEmun.MES閫�搴�.ObjToInt(),
-                    Details=new List<Dt_StockInfoDetail> { stockInfoDetail }
+                    Details = new List<Dt_StockInfoDetail> { stockInfoDetail }
                 };
                 //Dt_Task task = new Dt_Task()
                 //{

--
Gitblit v1.9.3