From a1f7a7a68d23f7b9de7c4237bf167fa4808fb20d Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期日, 09 十一月 2025 13:36:39 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs"
index 6bf4fec..3346e80 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs"
@@ -60,6 +60,7 @@
private readonly ISys_ConfigService _configService;
private readonly IDt_OrderOutDetailsRepository _orderOutDetailsRepository;
private readonly IDt_WareAreaInfoRepository _wareAreaInfoRepository;
+ private readonly IDt_InventoryRecordRepository _inventoryRecordRepository;
public Dt_TaskService(IDt_TaskRepository BaseDal,
IUnitOfWorkManage unitOfWorkManage,
@@ -75,7 +76,8 @@
IDt_StationManagerRepository stationManagerRepository,
ISys_ConfigService configService,
IDt_OrderOutDetailsRepository orderOutDetailsRepository,
- IDt_WareAreaInfoRepository wareAreaInfoRepository) : base(BaseDal)
+ IDt_WareAreaInfoRepository wareAreaInfoRepository,
+ IDt_InventoryRecordRepository inventoryRecordRepository) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
_stockInfoRepository = stockInfoRepository;
@@ -91,6 +93,7 @@
_configService = configService;
_orderOutDetailsRepository = orderOutDetailsRepository;
_wareAreaInfoRepository = wareAreaInfoRepository;
+ _inventoryRecordRepository = inventoryRecordRepository;
}
#region 澶栭儴鎺ュ彛鏂规硶
@@ -744,14 +747,28 @@
return content.Error("璇ユ墭鐩樺簱瀛樺凡鍦ㄥ嚭搴撶紦瀛樺尯");
}
- Dt_Task taskNew = await RequestOutboundTaskAsync(new RequestTaskDto { PalletCode = palletCode, AreaId = 2, Position = stcok.LocationCode, TaskType = (int)TaskOutboundTypeEnum.Outbound });
+ Dt_Task taskNew = await RequestOutboundTaskAsync(new RequestTaskDto { PalletCode = palletCode, AreaId = 2, Position = stcok.LocationCode, TaskType = (int)TaskOutboundTypeEnum.Outbound });
+ List<Dt_InventoryRecord> records = new List<Dt_InventoryRecord>();
+ stcok.StockInfoDetails.ForEach(x =>
+ {
+ records.Add(new Dt_InventoryRecord()
+ {
+ PalletCode = stcok.PalletCode,
+ MaterielCode = x.MaterielCode,
+ MaterielName = x.MaterielName,
+ Quantity = x.Quantity,
+ Status = (int)InventoryStatus.Normal,
+ Remark = remark,
+ });
+ });
var taskDto = CreateListTaskDTO(taskNew);
var result = GetlcoationState(taskNew, (int)StatusChangeTypeEnum.AutomaticOutbound);
await _unitOfWorkManage.UseTranAsync(async () =>
{
- BaseDal.AddData(taskNew);
- _stockInfoRepository.UpdateData(stcok);
+ await BaseDal.AddDataAsync(taskNew);
+ await _inventoryRecordRepository.AddDataAsync(records);
+ await _stockInfoRepository.UpdateDataAsync(stcok);
await _locationStatusChangeRecordRepository.AddDataAsync(result.Item1);
await _locationRepository.UpdateDataAsync(result.Item2);
});
--
Gitblit v1.9.3