From cf008dbb6059fe42a384e8ab35e90c4d295b9dc7 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 18 5月 2025 10:16:29 +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