| | |
| | | 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; |
| | |
| | | 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>(); |