From 4108af346376cce285499336917fd01b2435de06 Mon Sep 17 00:00:00 2001
From: bklLiudl <673013083@qq.com>
Date: 星期六, 21 六月 2025 11:03:55 +0800
Subject: [PATCH] 修改质检请验业务流程。

---
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 3b6b5d6..81a389c 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -531,7 +531,7 @@
                     #endregion
 
                     #region 璐ㄦ璇烽獙
-                    if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1")
+                    if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1")
                     {
                         var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot);
                         if (qualityRequest == null)
@@ -1047,7 +1047,7 @@
                         #endregion
 
                         #region 璐ㄦ璇烽獙
-                        if ((arrNotice.Type == "1" || arrNotice.Type == "4" || arrNotice.Type == "5") && sku.IsInspect != "1")
+                        if ((arrNotice.Type == "1" || arrNotice.Type == "4" || arrNotice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1")
                         {
                             var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot);
                             if (qualityRequest == null)
@@ -1497,7 +1497,7 @@
                 #endregion
 
                 #region 璐ㄦ璇烽獙
-                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1")
+                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1")
                 {
                     var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot);
                     if (qualityRequest == null)
@@ -2231,12 +2231,12 @@
                     .Select(m=>new { m.ProductionTime ,m.ExpirationTime}).OrderBy(m=>m.ProductionTime).ToList();//&& m.Status == "0"
                 foreach (var item in models)
                 {
-                    var boxNoList = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNNo == asnNo && m.ASNDetailNo == asnDetailId && m.ProductionTime == item.ProductionTime).Select(m => m.BoxNo).ToList();
+                    var boxNoList = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.Status == "0" && m.ASNNo == asnNo && m.ASNDetailNo == asnDetailId && m.ProductionTime == item.ProductionTime).Select(m => m.BoxNo).ToList();
                     if (boxNoList.Count > 0)
                     {
                         data.BoxNoList = boxNoList;
-                        data.Date1 = item.ProductionTime.ToString();
-                        data.Date2 = item.ExpirationTime.ToString();
+                        data.Date1 = item.ProductionTime == null ? "" : Convert.ToDateTime(item.ProductionTime).ToString("yyyy-MM-dd");
+                        data.Date2 = item.ExpirationTime == null ? "" : Convert.ToDateTime(item.ExpirationTime).ToString("yyyy-MM-dd");
 
                         break;
                     }
@@ -5964,7 +5964,7 @@
                 #endregion
 
                 #region 璐ㄦ璇烽獙
-                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1")
+                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1"  && sku.IsControlled != "1")
                 {
                     var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot);
                     if (qualityRequest == null)

--
Gitblit v1.8.0