From 531c6e89dc07bb6997e6249a6cd9f53a9bd474a5 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 23 三月 2026 10:31:54 +0800
Subject: [PATCH] 出库逻辑变更
---
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 18 ++++++++++++++++--
1 files changed, 16 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..8a4bc01 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,9 +365,14 @@
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;
- 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 +381,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 +402,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)
@@ -965,6 +975,10 @@
{
item.Count -= count.Count;
}
+ if (item.Count >= 50 && count?.Count<=2)
+ {
+ return item.RoadwayNo;
+ }
}
return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
}
--
Gitblit v1.9.3