diff --git a/Myshipping.Application/Entity/TrackingSystem/ServiceWorkFlowRunActivitiesInfo.cs b/Myshipping.Application/Entity/TrackingSystem/ServiceWorkFlowRunActivitiesInfo.cs index fe8e0ddd..e4c3093d 100644 --- a/Myshipping.Application/Entity/TrackingSystem/ServiceWorkFlowRunActivitiesInfo.cs +++ b/Myshipping.Application/Entity/TrackingSystem/ServiceWorkFlowRunActivitiesInfo.cs @@ -17,12 +17,6 @@ namespace Myshipping.Application.Entity [Description("服务流程运行活动表")] public class ServiceWorkFlowRunActivitiesInfo : TrackingSystemDbEntity { - public ServiceWorkFlowRunActivitiesInfo() - { - PK_ID = IDGen.NextID().ToString(); - - CreatedTime = DateTime.Now; - } /// /// 运行主键 diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs index 16c28bf6..a80f0a6c 100644 --- a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs +++ b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs @@ -639,12 +639,13 @@ namespace Myshipping.Application .LeftJoin((m, s) => m.PK_ID == s.RUN_ID) .LeftJoin((m, s, rela) => m.SERVICE_WF_ID == rela.SERVICE_WORKFLOW_ID && m.RELEASE_VERSION == rela.WF_VERSION) - .LeftJoin((m, s, rela, p) => + .InnerJoin((m, s, rela, p) => rela.SERVICE_PROJECT_ID == p.PK_ID) .Where((m, s, rela, p) => m.BUSI_SYSTEM_CODE == info.Main.BusiSystemCode && m.BUSI_ID == info.Main.BusiId && (info.Main.ServiceProjectCodeList == null || info.Main.ServiceProjectCodeList.Contains(p.SERVICE_PROJECT_CODE))) - .Select((m, s) => new { Run = m, Sub = s }).ToList(); + .Select((m, s,rela,p) => + new { Run = m, Sub = s }).ToList(); var resultList = runList.GroupBy(a => a.Run.PK_ID) .Select(a => { @@ -662,7 +663,8 @@ namespace Myshipping.Application showModel.ActDate = runInfo.ACT_DATE; showModel.WFPKId = runInfo.SERVICE_WF_ID; - showModel.ActivitiesList = currList.Where(t => t.Sub.IS_SUB == 0) + showModel.ActivitiesList = currList.Where(t => + !string.IsNullOrWhiteSpace(t.Sub.PK_ID) && t.Sub.IS_SUB == 0) .Select(t => { var runModel = new ServiceWorkFlowActivitiesRunDto @@ -686,7 +688,8 @@ namespace Myshipping.Application }).ToList(); var subList = - currList.Where(t => t.Sub.IS_SUB == 1) + currList.Where(t => + !string.IsNullOrWhiteSpace(t.Sub.PK_ID) && t.Sub.IS_SUB == 1) .Select(t => t.Sub).ToList(); showModel.ActivitiesList = showModel.ActivitiesList.GroupJoin(subList,