From 2275d041a815d5f4120aaf6defd8f64217a9b6e1 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 7 Jul 2023 09:52:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrackingSystem/Dtos/TrackingSystemMapper.cs | 5 +++++ .../TrackingSystem/ServiceWorkFlowBaseService.cs | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Myshipping.Application/Service/TrackingSystem/Dtos/TrackingSystemMapper.cs b/Myshipping.Application/Service/TrackingSystem/Dtos/TrackingSystemMapper.cs index a88fb452..b66cb837 100644 --- a/Myshipping.Application/Service/TrackingSystem/Dtos/TrackingSystemMapper.cs +++ b/Myshipping.Application/Service/TrackingSystem/Dtos/TrackingSystemMapper.cs @@ -127,6 +127,11 @@ namespace Myshipping.Application .Map(dest => dest.StatusSKUId, src => src.STATUS_SKU_ID) .Map(dest => dest.ShowName, src => src.SHOW_NAME); + config.ForType() + .Map(dest => dest.PKId, src => src.PK_ID) + .Map(dest => dest.StatusSKUId, src => src.STATUS_SKU_ID) + .Map(dest => dest.ShowName, src => src.SHOW_NAME); + config.ForType() .Map(dest => dest.PKId, src => src.PK_ID) .Map(dest => dest.StatusSKUId, src => src.STATUS_SKU_ID) diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs index d726a151..f1e45bd0 100644 --- a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs +++ b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs @@ -238,15 +238,15 @@ namespace Myshipping.Application //批量删除服务流程与服务项目关系(物理删除) _serviceWorkFlowProjectRelationRepository.EntityContext.Deleteable() - .Where(a => a.SERVICE_WORKFLOW_ID == entity.PK_ID); + .EnableQueryFilter().Where(a => a.SERVICE_WORKFLOW_ID == entity.PK_ID).ExecuteCommand(); //批量删除服务流程与服务活动关系(物理删除) - _serviceWorkFlowActivitiesRelationRepository.EntityContext.Deleteable() - .Where(a => a.SERVICE_WORKFLOW_ID == entity.PK_ID); + _serviceWorkFlowActivitiesRelationRepository.EntityContext.Deleteable() + .EnableQueryFilter().Where(a => a.SERVICE_WORKFLOW_ID == entity.PK_ID).ExecuteCommand(); //批量删除服务流程活动与子活动的关系(物理删除) _serviceWorkFlowActivitiesSubRelationRepository.EntityContext.Deleteable() - .Where(a => a.SERVICE_WORKFLOW_ID == entity.PK_ID); + .EnableQueryFilter().Where(a => a.SERVICE_WORKFLOW_ID == entity.PK_ID).ExecuteCommand(); } //服务流程与服务项目关系 @@ -271,6 +271,7 @@ namespace Myshipping.Application PK_ID = IDGen.NextID().ToString(), SERVICE_WORKFLOW_ID = entity.PK_ID, SERVICE_ACTIVITIES_ID = sku.PKId, + SORT_NO = sku.SortNo, IS_CONTAINS_SUB = sku.IsContainsSub, VAL_TYPE = !string.IsNullOrWhiteSpace(sku.ValType)? sku.ValType: StatusSKUValTypeEnum.DATETIME.ToString() }; @@ -286,7 +287,8 @@ namespace Myshipping.Application PK_ID = IDGen.NextID().ToString(), SERVICE_WORKFLOW_ID = entity.PK_ID, SERVICE_ACTIVITIES_ID = sku.PKId, - SUB_SERVICE_ACTIVITIES_ID = sub.PKId + SUB_SERVICE_ACTIVITIES_ID = sub.PKId, + SORT_NO = sub.SortNo }; await _serviceWorkFlowActivitiesSubRelationRepository.InsertAsync(wfRelationActivitiesSub); @@ -413,6 +415,7 @@ namespace Myshipping.Application return new { Key = a.Key, SubList = currArg.OrderBy(b=>b.SortNo) .Select(b => { + var actModel = b.Act.Adapt(); actModel.SortNo = b.SortNo;