From 247c1f46f620902f513f4f5d078b507972b35520 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 13 Jul 2023 14:53:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interface/IServiceWorkFlowBaseService.cs | 8 +++++ .../TrackingSystem/ServiceProjectService.cs | 2 +- .../ServiceWorkFlowBaseService.cs | 32 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/TrackingSystem/Interface/IServiceWorkFlowBaseService.cs b/Myshipping.Application/Service/TrackingSystem/Interface/IServiceWorkFlowBaseService.cs index a37b1558..7b2c0626 100644 --- a/Myshipping.Application/Service/TrackingSystem/Interface/IServiceWorkFlowBaseService.cs +++ b/Myshipping.Application/Service/TrackingSystem/Interface/IServiceWorkFlowBaseService.cs @@ -105,5 +105,13 @@ namespace Myshipping.Application /// 服务活动主键数组 /// 返回回执 Task GetServiceWorkFlowListByActivities(string[] activitiesArgs); + + /// + /// 检索服务流程活动列表 + /// + /// 检索值 + /// 最大返回行数(默认15) + /// 返回回执 + Task QueryActivitiesList(string queryItem, int topNum = 15); } } diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceProjectService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceProjectService.cs index 62ba8ed2..9c14cf4f 100644 --- a/Myshipping.Application/Service/TrackingSystem/ServiceProjectService.cs +++ b/Myshipping.Application/Service/TrackingSystem/ServiceProjectService.cs @@ -545,7 +545,7 @@ namespace Myshipping.Application try { var list = await _serviceProjectBaseInfoRepository.AsQueryable().Where(a => - a.IS_ENABLE == 1 && !a.IsDeleted && (a.SERVICE_PROJECT_CODE.Contains(queryItem) || a.SERVICE_PROJECT_NAME.Contains(queryItem))) + a.IS_ENABLE == 1 && !a.IsDeleted && (string.IsNullOrWhiteSpace(queryItem) || a.SERVICE_PROJECT_CODE.Contains(queryItem) || a.SERVICE_PROJECT_NAME.Contains(queryItem))) .Take(topNum).ToListAsync(); result.succ = true; diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs index c68f4372..4c7bb8c0 100644 --- a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs +++ b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowBaseService.cs @@ -1483,5 +1483,37 @@ namespace Myshipping.Application return result; } #endregion + + #region 检索服务流程活动列表 + /// + /// 检索服务流程活动列表 + /// + /// 检索值 + /// 最大返回行数(默认15) + /// 返回回执 + [HttpGet("/ServiceWorkFlowBase/QueryActivitiesList")] + public async Task QueryActivitiesList([FromQuery]string queryItem, [FromQuery] int topNum = 15) + { + TaskManageOrderResultDto result = new TaskManageOrderResultDto(); + + try + { + var list = await _serviceWorkFlowActivitiesInfoRepository.AsQueryable() + .Where(a => !a.IsDeleted && (string.IsNullOrWhiteSpace(queryItem) || a.SHOW_NAME.Contains(queryItem))) + .Take(topNum).ToListAsync(); + + result.succ = true; + result.ext = list.Adapt>(); + + } + catch (Exception ex) + { + result.succ = false; + result.msg = $"检索服务流程活动列表异常,原因:{ex.Message}"; + } + + return result; + } + #endregion } }