From 011ca316e6ec2ed93e31c45a9ebd9d3c66664871 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 17 四月 2026 11:47:03 +0800
Subject: [PATCH] 代码更新

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index d076cc6..1913125 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -365,6 +365,10 @@
                     throw new Exception($"鏈壘鍒版潯鐮亄stockInfoOld.PalletCode}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�");
                 }
                 BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧stockInfoOld.PalletCode}鐨勫簱瀛樹俊鎭�");
+                if (stockInfoOld.StockLength <= 0 || bSTStockInfoDTO.StockMeter<=0)
+                {
+                    throw new Exception($"{stockInfoOld.RfidCode}缁戝畾鏉$爜{stockInfoOld.PalletCode}搴撳瓨涓�0");
+                }
                 stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
                 decimal stockLength = bSTStockInfoDTO.StockMeter;
                 decimal errWeight = Math.Abs(weight - bSTStockInfoDTO.Qty);
@@ -971,6 +975,10 @@
                 {
                     item.Count -= count.Count;
                 }
+                if (item.Count >= 50 && count?.Count<=1)
+                {
+                    return item.RoadwayNo;
+                }
             }
             return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
         }
@@ -1065,7 +1073,7 @@
                             }
                             proInUpModel.PB_INV_PRODUCT_IN= pRODUCT_INItems;
                             string request = _invokeERPService.ERPProInUp(proInUpModel) ?? throw new Exception("鎴愬搧鍏ュ簱鎺ュ彛璇锋眰澶辫触");
-                            if (!request.Contains("Success"))
+                            if (!request.Contains("success"))
                             {
                                 throw new Exception($"鎴愬搧鍏ュ簱澶辫触");
                             }
@@ -1952,7 +1960,7 @@
                     string request = _invokeERPService.ERPSemiProInUp(
                             new ERPProInUpModel()
                             {
-                                PB_INV_PRODUCT_IN= pRODUCT_INItems
+                                PB_INV_PRODUCT_IN = pRODUCT_INItems
                             }) ?? throw new Exception("鍗婃垚鍝佸叆搴撴帴鍙h姹傚け璐�");
                     //鐢熸垚鍗婃垚鍝佸叆搴�
                     List<Dt_MESProInOrderInfo> semiProInOrderInfos = mESProInOrderInfos.Where(x => x.MESProInStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt() && x.WarehouseId==WarehouseEnum.LLDYL.ObjToInt()).ToList();
@@ -2004,7 +2012,6 @@
                 {
                     return content.Error("浼犲叆淇℃伅涓虹┖");
                 }
-                
                 List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData();
                 List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
                 List<Dt_Task> tasks = new List<Dt_Task>();
@@ -2065,7 +2072,7 @@
                         NextAddress = "",
                         PalletCode = item.BarCode,
                         Roadway = "",
-                        SourceAddress = CheckPointCode.AGVStationCode,
+                        SourceAddress = item.PointCode.StartsWith("YS") ? CheckPointCode.AGVStationCode : CheckPointCode.MESPointCode,
                         TargetAddress = "",
                         TaskType = 0,
                         TaskStatus = TaskStatusEnum.New.ObjToInt(),
@@ -2081,10 +2088,11 @@
                         nameof(StationAreaEnum.涓�妤煎嵃鍒�) => TaskTypeEnum.PrintYLInbound,
                         nameof(StationAreaEnum.涓�妤煎垎鍒�) => TaskTypeEnum.PartOffInbound,
                         nameof(StationAreaEnum.涓�妤肩焊寮犳穻鑶�) => TaskTypeEnum.PaperFilmInbound,
-                        nameof(StationAreaEnum.涓�妤兼棤绾烘穻鑶�) => TaskTypeEnum.WFBYLInbound,
+                        nameof(StationAreaEnum.涓�妤兼棤绾虹粐甯�) => TaskTypeEnum.WFBYLInbound,
+                        nameof(StationAreaEnum.涓�妤兼棤绾烘穻鑶�) => TaskTypeEnum.WFBLMYLInbound,
                         _ => throw new Exception("鏈壘鍒板搴斾换鍔�")
                     };
-                    if (taskTypeEnum == TaskTypeEnum.WFBYLInbound)
+                    if (taskTypeEnum == TaskTypeEnum.WFBYLInbound || taskTypeEnum == TaskTypeEnum.WFBLMYLInbound)
                     {
                         Dt_AGVStationInfo? stationInfo = AssignWFBStation(_AGVStationInfos?.Select(x => x.AGVStationCode).ToList()) ?? throw new Exception("鏈壘鍒板彲鐢ㄦ棤绾哄竷鏆傚瓨鏋�");
                         newTask.NextAddress = stationInfo.AGVStationCode;
@@ -2150,6 +2158,10 @@
                 throw new Exception(ex.Message);
             }
         }
+        /// <summary>
+        /// 鎴愬搧缁勭洏
+        /// </summary>
+        /// <returns></returns>
         public WebResponseContent BoxingInBound(string stationCode,List<string> barCodes)
         {
             WebResponseContent content = new WebResponseContent();

--
Gitblit v1.9.3