From 96f8501cc973232b340e36a61992ec1ad47e4a31 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期六, 12 七月 2025 11:10:34 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/JiAnLiKu --- 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