From 514076cd4779972d3532fbc9fd0989c2a5d30816 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期四, 05 九月 2024 16:49:37 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
index 863f920..a60709d 100644
--- a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
+++ b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -1,6 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Data;
+using System.Linq;
 using System.Text;
 using Model.ModelDto.BllQualityDto;
 using Model.ModelVm;
@@ -105,7 +106,7 @@
             {
                 throw new Exception("鎵规鍙蜂笉鍙负绌猴紝璇锋牳鏌ワ紒");
             }
-            //int isTui = 0;
+            int isTui = 0;
             //楠岃瘉鍏ュ簱鍗曞彿鏄惁涓虹┖
             if (!string.IsNullOrEmpty(model.ASNNo))
             {
@@ -122,7 +123,7 @@
                 {
                     throw new Exception("杈撳叆鐨勬壒娆℃垨鐗╂枡淇℃伅涓庡叆搴撳崟鎹笉绗︼紝璇锋牳鏌ワ紒");
                 }
-                //isTui = 1;
+                isTui = 1;
             }
 
             //鏌ユ壘璐ㄦ淇℃伅涓槸鍚﹀瓨鍦ㄥ悓鎵规璐ㄦ褰曞叆璁板綍
@@ -155,9 +156,13 @@
 
             //鏌ユ壘搴撳瓨鏄庣粏淇℃伅
             List<DataStockDetail> detail = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo).ToList();
+            if (isTui == 1)
+            {
+                detail = detail.Where(m=> m.ASNNo == model.ASNNo).ToList();
+            }
             foreach (var item in detail)
             {
-                List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
+                List<DataBoxInfo> box = Db.Queryable<DataBoxInfo>().Where(a => a.IsDel == "0" && a.StockDetailId == item.Id && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
                 //鍒ゆ柇鍚堟牸鐘舵�佹槸鍚﹀悎鏍�
                 if (model.IsQualified == "1")
                 {
@@ -167,7 +172,7 @@
                     item.InspectStatus = "1"; //1鍚堟牸
                     foreach (var b1 in box)
                     {
-                        b1.InspectMark = "1"; //1鍚堟牸
+                        b1.InspectStatus = "1"; //1鍚堟牸
                     }
                 }
                 else //涓嶅悎鏍�
@@ -177,7 +182,7 @@
                     item.InspectStatus = "2"; //2涓嶅悎鏍�
                     foreach (var b1 in box)
                     {
-                        b1.InspectMark = "2"; //2涓嶅悎鏍�
+                        b1.InspectStatus = "2"; //2涓嶅悎鏍�
                     }
                 }
                 Db.Updateable(box).ExecuteCommand();

--
Gitblit v1.8.0