From d02de7e7f2dce33b1198408b15d29584bceffbb5 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 7 Aug 2023 11:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=8A=B6=E6=80=81=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ServiceWorkFlowRunActivitiesInfo.cs | 6 ------ .../TrackingSystem/ServiceWorkFlowManageService.cs | 11 +++++++---- 2 files changed, 7 insertions(+), 10 deletions(-) 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,