diff --git a/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs b/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs index 63566699..9e6ca07d 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs @@ -2434,7 +2434,7 @@ namespace Myshipping.Application var bookingOrder = _bookingOrderRepository.AsQueryable().Filter(null, true) .First(a => a.Id == model.BookingId); - if (bookingOrder == null) + if (bookingOrder != null) throw Oops.Oh($"订舱信息获取失败,订舱信息不存在或已作废"); DateTime bDate = DateTime.Now; diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs index a02bdfc1..8d5cd091 100644 --- a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs +++ b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs @@ -2098,11 +2098,24 @@ namespace Myshipping.Application if (b.SubStatusList != null && b.SubStatusList.Count > 0) { b.SubStatusList.ForEach(sb => { - var eSubRunInfo = runInfo.ActivitiesList - .FirstOrDefault(p => p.ActId == sb.ActPKId); + ServiceWorkFlowActivitiesRunSubDto eSubRunInfo = null; + + if(eRunInfo != null && eRunInfo.SubList != null) + { + eSubRunInfo = eRunInfo.SubList + .FirstOrDefault(p => p.ActId == sb.ActPKId); + } + if(eSubRunInfo != null) { + decimal calcSort = (decimal)b.ActSortNo + (eSubRunInfo.ExecSortNo * 0.001m); + + if (eRunInfo != null) + { + calcSort = (decimal)eRunInfo.ExecSortNo + (eSubRunInfo.ExecSortNo * 0.001m); + } + rltList.Add(new ServiceProjectStatusDto { ActPKId = eSubRunInfo.ActId, @@ -2114,12 +2127,20 @@ namespace Myshipping.Application ActVal = eSubRunInfo.ActVal, ActRemark = eSubRunInfo.ActRemark, WFSortNo = l.SortNo, - CalcSortNo = (decimal)eSubRunInfo.ExecSortNo, + CalcSortNo = calcSort, + SortNo = sb.SortNo }); } else { + decimal calcSort = (decimal)b.ActSortNo + (sb.ActSortNo * 0.001m); + + if (eRunInfo != null) + { + calcSort = (decimal)eRunInfo.ExecSortNo + (sb.ActSortNo * 0.001m); + } + rltList.Add(new ServiceProjectStatusDto { ActPKId = sb.ActPKId, @@ -2129,7 +2150,7 @@ namespace Myshipping.Application StatusSKUCode = sb.StatusSKUCode, ActRemark = sb.ActRemark, WFSortNo = l.SortNo, - CalcSortNo = (decimal)b.ActSortNo + (sb.ActSortNo * 0.001m), + CalcSortNo = calcSort, SortNo = sb.SortNo }); }