From fe256a7afaa132910875d3dc73783d9ab2d7ace5 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期四, 12 三月 2026 18:57:44 +0800
Subject: [PATCH] 老厂排程单页面增加用纸顺序号和是否缺料

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 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 c5848e0..d076cc6 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"
@@ -367,7 +367,8 @@
                 BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧stockInfoOld.PalletCode}鐨勫簱瀛樹俊鎭�");
                 stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
                 decimal stockLength = bSTStockInfoDTO.StockMeter;
-                if (weight != bSTStockInfoDTO.Qty && weight < stockInfoOld.InitialWeight)
+                decimal errWeight = Math.Abs(weight - bSTStockInfoDTO.Qty);
+                if (weight != bSTStockInfoDTO.Qty && weight < stockInfoOld.InitialWeight && errWeight <= AppSettings.Get("ErrWeight").ObjToInt())
                 {
                     Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == stockInfoOld.MaterielId);
                     int gramWeight = (int)(materielInfo.MaterielWeight * 1000);
@@ -376,7 +377,7 @@
                         Paper_code = stockInfoOld.PalletCode,
                         Estimate_weight = bSTStockInfoDTO.Qty,
                         Actual_weight = weight,
-                        Error_weight = Math.Abs(weight - bSTStockInfoDTO.Qty),
+                        Error_weight = errWeight,
                         Weigh_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                         Operator = "LiKu",
                         Width = bSTStockInfoDTO.W,
@@ -397,6 +398,11 @@
                 stockInfoOld.StockLength = stockLength;
                 stockInfoOld.StockOutLength = 0;
                 stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
+                List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x=>x.PalletCode==stockInfoOld.PalletCode);
+                if (outLineViewsDel.Count>0)
+                {
+                    _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel);
+                }
                 content.OK("鎴愬姛",data:stockInfoOld);
             }
             catch (Exception ex)

--
Gitblit v1.9.3