From c67c39f00fde325f3ff3f407c6b8b7416d5152c1 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 29 一月 2026 14:41:13 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
index a71f332..2befd70 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
@@ -195,7 +195,7 @@
//float stockMaxQty = stockInfo.Details.Max(x => x.StockQuantity);
//float stockMinQty = stockInfo.Details.Min(x => x.StockQuantity);
Dt_StockInfoDetail addstockInfoDetail = stockInfo.Details.OrderByDescending(x=>x.Id).FirstOrDefault();
- addstockInfoDetail.StockQuantity = takeStockOrderDetail.Qty;
+ addstockInfoDetail.StockQuantity = takeStockOrderDetail.Qty - takeStockOrderDetail.SysQty;
updateStockDetails.Add(addstockInfoDetail);
}
else if (takeStockOrderDetail.Qty==0) //鐩樹簭
@@ -302,11 +302,14 @@
};
eRPTakeStock.Details.Add(takeDetailsItem);
}
- string response = _invokeERPService.InvokeTakeStockApi(eRPTakeStock);
- ErpRequestContent erpRequestContent = response.DeserializeObject<ErpRequestContent>();
- if (erpRequestContent.res != 1)
+ if (eRPTakeStock.Details.Count>0)
{
- throw new Exception("鍚屾ERP澶辫触,閿欒淇℃伅:" + erpRequestContent.Data);
+ string response = _invokeERPService.InvokeTakeStockApi(eRPTakeStock);
+ ErpRequestContent erpRequestContent = response.DeserializeObject<ErpRequestContent>();
+ if (erpRequestContent.res != 1)
+ {
+ throw new Exception("鍚屾ERP澶辫触,閿欒淇℃伅:" + erpRequestContent.Data);
+ }
}
}
_unitOfWorkManage.CommitTran();
--
Gitblit v1.9.3