From 65a231315d1dcc35d2996106d36e9cca9aba6ce6 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 06 三月 2026 09:06:44 +0800
Subject: [PATCH] 更新码垛分配工位优化,老厂退库称重上报设定差异范围

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs |    5 +++--
 1 files changed, 3 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..2aa16e7 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,

--
Gitblit v1.9.3