From be438dd071400936c44a1425ec8d886f63c83329 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期五, 11 七月 2025 14:33:08 +0800 Subject: [PATCH] 1 --- WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/LocationStatusChangeRecordSetvice.cs | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/LocationStatusChangeRecordSetvice.cs b/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/LocationStatusChangeRecordSetvice.cs index 590f1b2..6c0b159 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/LocationStatusChangeRecordSetvice.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/LocationStatusChangeRecordSetvice.cs @@ -7,6 +7,7 @@ using WIDESEA_Core; using WIDESEA_Core.BaseServices; using WIDESEA_Core.DB; +using WIDESEA_Core.Enums; using WIDESEA_Core.Seed; using WIDESEA_IRecordRepository; using WIDESEA_IRecordService; @@ -33,6 +34,31 @@ BaseDal.AddData(locationStatusChangeRecord); } + public void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int newStatus, int changeType, string? orderNo = null, int? taskNum = null) + { + try + { + Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord() + { + AfterStatus = newStatus, + BeforeStatus = lastStatus, + ChangeType = changeType, + LocationCode = locationInfo.LocationCode, + LocationId = locationInfo.Id, + TaskNum = taskNum, + OrderNo = orderNo ?? "", + Creater = App.User.UserId == 0 ? "" : "WCS", + CreateDate = App.User.UserId == 0 ? DateTime.Now : DateTime.Now, + }; + + BaseDal.AddData(locationStatusChangeRecord); + } + 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