修改服务项目状态加载

optimize
jianghaiqing 1 year ago
parent 611f131e58
commit d02de7e7f2

@ -17,12 +17,6 @@ namespace Myshipping.Application.Entity
[Description("服务流程运行活动表")]
public class ServiceWorkFlowRunActivitiesInfo : TrackingSystemDbEntity
{
public ServiceWorkFlowRunActivitiesInfo()
{
PK_ID = IDGen.NextID().ToString();
CreatedTime = DateTime.Now;
}
/// <summary>
/// 运行主键

@ -639,12 +639,13 @@ namespace Myshipping.Application
.LeftJoin<ServiceWorkFlowRunActivitiesInfo>((m, s) => m.PK_ID == s.RUN_ID)
.LeftJoin<ServiceWorkFlowProjectRelation>((m, s, rela) =>
m.SERVICE_WF_ID == rela.SERVICE_WORKFLOW_ID && m.RELEASE_VERSION == rela.WF_VERSION)
.LeftJoin<ServiceProjectBaseInfo>((m, s, rela, p) =>
.InnerJoin<ServiceProjectBaseInfo>((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,

Loading…
Cancel
Save