From 42429ae61571ff9563c9e987cd52be2132e77775 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期四, 06 十一月 2025 17:13:29 +0800
Subject: [PATCH] 提交出库
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordService.cs | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordService.cs"
index feeffc8..05147f4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordService.cs"
@@ -1,5 +1,7 @@
-锘縰sing WIDESEA_Core.BaseRepository;
+锘縰sing WIDESEA_Common.LocationEnum;
+using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Helper;
using WIDESEA_IRecordService;
using WIDESEA_Model.Models;
@@ -30,6 +32,36 @@
BaseDal.AddData(locationStatusChangeRecord);
}
+ public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum newStatus, LocationChangeType changeType, string? orderNo = null, List<int>? taskNums = null)
+ {
+ try
+ {
+ List<Dt_LocationStatusChangeRecord> records = new List<Dt_LocationStatusChangeRecord>();
+ for (int i = 0; i < locationInfos.Count; i++)
+ {
+ Dt_LocationInfo locationInfo = locationInfos[i];
+ int? taskNum = (taskNums != null && taskNums.Count > 0 && taskNums.Count == locationInfos.Count) ? taskNums[i] : null;
+ Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord()
+ {
+ AfterStatus = newStatus.ObjToInt(),
+ BeforeStatus = locationInfo.LocationStatus,
+ ChangeType = changeType.ObjToInt(),
+ LocationCode = locationInfo.LocationCode,
+ LocationId = locationInfo.Id,
+ TaskNum = taskNum,
+ OrderNo = orderNo ?? ""
+ };
+ records.Add(locationStatusChangeRecord);
+ }
+
+
+ BaseDal.AddData(records);
+ }
+ catch (Exception ex)
+ {
+ throw new Exception($"{ex.Message}");
+ }
+ }
public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, int newStatus, int changeType, string? orderNo, List<int>? taskNums)
{
List<Dt_LocationStatusChangeRecord> records = new List<Dt_LocationStatusChangeRecord>();
--
Gitblit v1.9.3