From eaf097eeef67ebaaf46777269128e65f820e31fc Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期四, 22 一月 2026 15:42:46 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs | 48 ++++++++----------------------------------------
1 files changed, 8 insertions(+), 40 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
index 50a36ba..4612cc1 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
@@ -349,7 +349,7 @@
}
//鑽按锛屼綆娓╀粨缁勭洏
- public WebResponseContent NEWMaterielGroup(SaveModel saveModel)
+ public WebResponseContent NewMaterielGroup(SaveModel saveModel)
{
WebResponseContent content = new WebResponseContent();
try
@@ -461,43 +461,8 @@
}
else
{
- //if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
- //{
return WebResponseContent.Instance.Error($"鎵樼洏鍙烽噸澶�,璇ユ墭鐩樺凡缁勮繃鐗╂枡");
- //}
- //beforeQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
}
-
- if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ToString())
- {
- stockInfo.Remark = Initiallife.ToString();
- string batchNo = models.FirstOrDefault()?.LotNo ?? "";
- //Dt_StockInfoDetail existDetail = _stockRepository.StockInfoDetailRepository.QueryFirst(x => x.BatchNo == batchNo);
- //if (existDetail != null)
- //{
- // return WebResponseContent.Instance.Error($"{batchNo}娴嬭瘯鏋跺凡瀛樺湪");
- //}
- if (models.Count >= 2)
- {
- return WebResponseContent.Instance.Error($"缁勭洏鏄庣粏涓嶅敮涓�");
- }
- //if (palletCode.Substring(0, 1) == "6")
- //{
- // stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt();
- //}
- //else
- //{
- // stockInfo.PalletType = PalletTypeEnum.LargestPallet.ObjToInt();
- //}
- }
- else if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ToString())
- {
- if (models.Count >= 2)
- {
- return WebResponseContent.Instance.Error($"缁勭洏鏄庣粏涓嶅敮涓�");
- }
- }
-
List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
foreach (var model in models)
{
@@ -517,7 +482,7 @@
OrderNo = inboundOrder.OrderNo,
BatchNo = notGroupDetail.BatchNo,
LinId = notGroupDetail.LinId,
- StockQuantity = (quantitys.FirstOrDefault()),
+ StockQuantity = model.Quantity,
Status = (int)StockStatusEmun.缁勭洏鏆傚瓨,
Creater = "WMS",
CreateDate = DateTime.Now,
@@ -537,9 +502,9 @@
stockInfoDetails.Add(stockInfoDetail);
decimal decimalReceiptQuantity = Convert.ToDecimal(notGroupDetail.ReceiptQuantity);
- decimal decimalModelQuantity = Convert.ToDecimal((quantitys.FirstOrDefault()));
+ decimal decimalModelQuantity = Convert.ToDecimal(notGroupDetail.OrderQuantity);
decimal decimalOrderQuantity = Convert.ToDecimal(notGroupDetail.OrderQuantity);
- decimalReceiptQuantity += decimalModelQuantity;
+ decimalReceiptQuantity += model.Quantity;
// 妫�鏌ユ槸鍚﹁秴鍑鸿鍗曟暟閲�
if (decimalReceiptQuantity > decimalOrderQuantity)
{
@@ -1046,7 +1011,7 @@
public int GetPalletType(Dt_Warehouse warehouse, string palletCode)
{
- if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ObjToString())
+ if (warehouse.WarehouseCode == WarehouseEnum.SC01_DW.ObjToString())
{
Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3));
if (palletTypeInfo == null)
@@ -1055,6 +1020,8 @@
}
return palletTypeInfo.PalletType;
}
+
+
//else if (warehouse.WarehouseCode == WarehouseEnum.HA152.ObjToString())
//{
// Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
@@ -1311,6 +1278,7 @@
if (inboundOrderDetailOld != null)
{
inboundOrderDetailOld.OrderQuantity += item.OrderQuantity;
+ inboundOrderDetailOld.OrderDetailStatus = OrderDetailStatusEnum.Inbounding.ObjToInt();
_inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetailOld);
}
else
--
Gitblit v1.9.3