From f54b7815d8451f362554e3d2d09b4991ce13d4ff Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 12 十一月 2025 09:01:16 +0800
Subject: [PATCH] 前端优化,PDA更新,分配库存优化
---
项目代码/WMS/WMSServices/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 56 insertions(+), 4 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs"
index 990eee1..b3888a8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs"
@@ -16,22 +16,74 @@
{
public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService
{
- public void AddStockChangeRecord(Dt_StockInfo stockInfo, float beforeQuantity, float totalQuantity, StockChangeTypeEnum changeType, int? taskNum = null)
+ /// <summary>
+ /// 鍗锋枡鍙樺姩搴撳瓨璁板綍
+ /// </summary>
+ /// <param name="stockInfo">搴撳瓨</param>
+ /// <param name="beforeQuantity">鍙樺姩鍓嶅簱瀛�</param>
+ /// <param name="changeQuantity">鍙樺姩搴撳瓨</param>
+ /// <param name="changeType">鍙樺姩绫诲瀷</param>
+ /// <param name="taskNum">浠诲姟鍙�</param>
+ /// <param name="orderNo">鍗曟嵁缂栧彿</param>
+ /// <exception cref="Exception"></exception>
+ public void AddStockChangeRecord(Dt_StockInfo stockInfo, decimal beforeQuantity, decimal changeQuantity, StockChangeTypeEnum changeType, int? taskNum = 0,string orderNo="")
{
try
{
+ Dt_StockQuantityChangeRecord stockQuantityChangeRecord = new Dt_StockQuantityChangeRecord()
+ {
+ StockId = stockInfo.Id,
+ PalleCode = stockInfo.PalletCode,
+ MaterielCode=stockInfo.MaterielCode,
+ MaterielName=stockInfo.MaterielName,
+ BatchNo = "",
+ SerilNumber=$"{stockInfo.Id}",
+ OrderNo = orderNo,
+ TaskNum= taskNum,
+ ChangeType=changeType.ObjToInt(),
+ ChangeQuantity=changeQuantity,
+ BeforeQuantity=beforeQuantity,
+ AfterQuantity=beforeQuantity+changeQuantity,
+ Creater="System"
+ };
+ BaseDal.AddData(stockQuantityChangeRecord);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
-
- public void AddStockChangeRecord(Dt_StockInfo stockInfo, StockChangeTypeEnum changeType, int? taskNum = null)
+ /// <summary>
+ /// 鎴愬搧杈呮枡搴撳瓨璁板綍
+ /// </summary>
+ /// <param name="proStockInfo">搴撳瓨</param>
+ /// <param name="beforeQuantity">鍙樺姩鍓嶅簱瀛�</param>
+ /// <param name="changeQuantity">鍙樺姩搴撳瓨</param>
+ /// <param name="changeType">鍙樺姩绫诲瀷</param>
+ /// <param name="taskNum">浠诲姟鍙�</param>
+ /// <param name="orderNo"></param>
+ /// <exception cref="Exception"></exception>
+ public void AddStockChangeRecord(Dt_ProStockInfo proStockInfo, decimal beforeQuantity, decimal changeQuantity, StockChangeTypeEnum changeType, int? taskNum = null, string orderNo = "")
{
try
{
-
+ Dt_StockQuantityChangeRecord stockQuantityChangeRecord = new Dt_StockQuantityChangeRecord()
+ {
+ StockId = proStockInfo.Id,
+ PalleCode = proStockInfo.PalletCode,
+ MaterielCode = proStockInfo.proStockInfoDetails?.FirstOrDefault()?.ProductCode ?? "",
+ MaterielName = proStockInfo.proStockInfoDetails?.FirstOrDefault()?.ProductName ?? "",
+ BatchNo = "",
+ SerilNumber = $"{proStockInfo.Id}",
+ OrderNo = orderNo,
+ TaskNum = taskNum,
+ ChangeType = changeType.ObjToInt(),
+ ChangeQuantity = changeQuantity,
+ BeforeQuantity = beforeQuantity,
+ AfterQuantity = beforeQuantity + changeQuantity,
+ Creater = "System"
+ };
+ BaseDal.AddData(stockQuantityChangeRecord);
}
catch (Exception ex)
{
--
Gitblit v1.9.3