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