From b5904672914f1088841208b4084fc7619576fa2e Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 20 5月 2025 11:50:32 +0800
Subject: [PATCH] 优化
---
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
index ce8adc5..01ffc44 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
@@ -12,6 +12,7 @@
using Volo.Abp.ObjectMapping;
using Volo.Abp.Users;
using CmsQueryExtensions.Entitys;
+using System.Collections.Generic;
namespace CMS.Plugin.PipeLineLems.Application.Implements;
@@ -543,4 +544,56 @@
{
return await _workPlanRepository.GetSingleByFilterAsync(whereConditions, is鈥婱ultipleThrowException);
}
+
+
+ /// <summary>
+ /// 鏍规嵁鏉′欢鑾峰彇浣滀笟璁″垝琛ㄥ垪琛�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ public virtual async Task<List<WorkPlanDto>> FindListByFilterAsync(GetWorkPlanInput input, CancellationToken cancellationToken = default)
+ {
+ Check.NotNull(input, nameof(input));
+
+ if (input.Sorting.IsNullOrWhiteSpace())
+ {
+ input.Sorting = nameof(WorkPlan.Sort);
+ }
+
+ #region 鍔ㄦ�佹瀯閫犳煡璇㈡潯浠�
+
+ //鍔ㄦ�佹瀯閫犳煡璇㈡潯浠�
+ var whereConditions = DynamicGetQueryParams(input);
+
+ #endregion
+
+ var list = await _workPlanRepository.GetListByFilterAsync(whereConditions?.data);
+
+ return new List<WorkPlanDto>(ObjectMapper.Map<List<WorkPlan>, List<WorkPlanDto>>(list));
+ }
+ /// <summary>
+ /// 鏍规嵁鏉′欢鑾峰彇鍗曚釜浣滀笟璁″垝琛�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ public virtual async Task<WorkPlanDto> FindSingleByFilterAsync(GetWorkPlanInput input, CancellationToken cancellationToken = default)
+ {
+ Check.NotNull(input, nameof(input));
+
+ if (input.Sorting.IsNullOrWhiteSpace())
+ {
+ input.Sorting = nameof(WorkPlan.Sort);
+ }
+
+ #region 鍔ㄦ�佹瀯閫犳煡璇㈡潯浠�
+
+ //鍔ㄦ�佹瀯閫犳煡璇㈡潯浠�
+ var whereConditions = DynamicGetQueryParams(input);
+
+ #endregion
+
+ var dataObj = await _workPlanRepository.GetSingleByFilterAsync(whereConditions?.data);
+
+ return (ObjectMapper.Map<WorkPlan, WorkPlanDto>(dataObj));
+ }
}
--
Gitblit v1.9.3