diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs index 48be3504..e0f55070 100644 --- a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs +++ b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs @@ -359,15 +359,26 @@ namespace Myshipping.Application if (st.StatusCode.Equals(sku.StatusSKUCode,StringComparison.OrdinalIgnoreCase)) { - activitiesRunInfo.IS_YIELD = 1; + bool currIsYield = true; - if(st.StatusDate.HasValue) + //完成时间为空,备注不为空只保存备注信息,不标记完成 + if(st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark)) { - activitiesRunInfo.ACT_DATE = st.StatusDate.Value; + currIsYield = false; } - else + + if (currIsYield) { - activitiesRunInfo.ACT_DATE = nowDate; + activitiesRunInfo.IS_YIELD = 1; + + if (st.StatusDate.HasValue) + { + activitiesRunInfo.ACT_DATE = st.StatusDate.Value; + } + else + { + activitiesRunInfo.ACT_DATE = nowDate; + } } activitiesRunInfo.ACT_VAL = st.StatusVal; @@ -410,17 +421,27 @@ namespace Myshipping.Application if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase)) { - activitiesSubRunInfo.IS_YIELD = 1; + bool currIsYield = true; - if (st.StatusDate.HasValue) + //完成时间为空,备注不为空只保存备注信息,不标记完成 + if (st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark)) { - activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value; + currIsYield = false; } - else + + if (currIsYield) { - activitiesSubRunInfo.ACT_DATE = nowDate; - } + activitiesSubRunInfo.IS_YIELD = 1; + if (st.StatusDate.HasValue) + { + activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value; + } + else + { + activitiesSubRunInfo.ACT_DATE = nowDate; + } + } activitiesSubRunInfo.ACT_VAL = st.StatusVal; activitiesSubRunInfo.ACT_REMARK = st.Remark; } @@ -500,15 +521,26 @@ namespace Myshipping.Application if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase)) { - activitiesRunInfo.IS_YIELD = 1; + bool currIsYield = true; - if (st.StatusDate.HasValue) + //完成时间为空,备注不为空只保存备注信息,不标记完成 + if (st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark)) { - activitiesRunInfo.ACT_DATE = st.StatusDate.Value; + currIsYield = false; } - else + + if (currIsYield) { - activitiesRunInfo.ACT_DATE = nowDate; + activitiesRunInfo.IS_YIELD = 1; + + if (st.StatusDate.HasValue) + { + activitiesRunInfo.ACT_DATE = st.StatusDate.Value; + } + else + { + activitiesRunInfo.ACT_DATE = nowDate; + } } activitiesRunInfo.ACT_VAL = st.StatusVal; @@ -551,15 +583,26 @@ namespace Myshipping.Application if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase)) { - activitiesSubRunInfo.IS_YIELD = 1; + bool currIsYield = true; - if (st.StatusDate.HasValue) + //完成时间为空,备注不为空只保存备注信息,不标记完成 + if (st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark)) { - activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value; + currIsYield = false; } - else + + if (currIsYield) { - activitiesSubRunInfo.ACT_DATE = nowDate; + activitiesSubRunInfo.IS_YIELD = 1; + + if (st.StatusDate.HasValue) + { + activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value; + } + else + { + activitiesSubRunInfo.ACT_DATE = nowDate; + } } activitiesSubRunInfo.ACT_VAL = st.StatusVal; @@ -613,17 +656,27 @@ namespace Myshipping.Application if (st.StatusCode.Equals(sku.StatusSKUCode, StringComparison.OrdinalIgnoreCase)) { - activitiesRunInfo.IS_YIELD = 1; + bool currIsYield = true; - if (st.StatusDate.HasValue) + //完成时间为空,备注不为空只保存备注信息,不标记完成 + if (st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark)) { - activitiesRunInfo.ACT_DATE = st.StatusDate.Value; + currIsYield = false; } - else + + if (currIsYield) { - activitiesRunInfo.ACT_DATE = nowDate; - } + activitiesRunInfo.IS_YIELD = 1; + if (st.StatusDate.HasValue) + { + activitiesRunInfo.ACT_DATE = st.StatusDate.Value; + } + else + { + activitiesRunInfo.ACT_DATE = nowDate; + } + } activitiesRunInfo.ACT_VAL = st.StatusVal; activitiesRunInfo.ACT_REMARK = st.Remark; @@ -655,15 +708,26 @@ namespace Myshipping.Application if (st.StatusCode.Equals(sub.StatusSKUCode, StringComparison.OrdinalIgnoreCase)) { - activitiesSubRunInfo.IS_YIELD = 1; + bool currIsYield = true; - if (st.StatusDate.HasValue) + //完成时间为空,备注不为空只保存备注信息,不标记完成 + if (st.StatusDate.HasValue && !string.IsNullOrWhiteSpace(st.Remark)) { - activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value; + currIsYield = false; } - else + + if (currIsYield) { - activitiesSubRunInfo.ACT_DATE = nowDate; + activitiesSubRunInfo.IS_YIELD = 1; + + if (st.StatusDate.HasValue) + { + activitiesSubRunInfo.ACT_DATE = st.StatusDate.Value; + } + else + { + activitiesSubRunInfo.ACT_DATE = nowDate; + } } activitiesSubRunInfo.ACT_VAL = st.StatusVal;