From a0c470b9326202b5bc0bcc2727c3f34fe59b5e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 28 Aug 2024 15:29:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs | 2 +- .../DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs | 5 +++-- .../Controllers/ClientFlowInstanceController.cs | 2 +- ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs index 85a8c88e..cadb68ed 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Interface/TaskInteraction/ITaskService.cs @@ -17,7 +17,7 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction /// 业务类型 /// 任务类型 /// - Task>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types); + Task>> GetTasks(long id, BusinessType? businessType, params TaskBaseTypeEnum[] types); /// /// 返回指定类型的任务是否已存在 diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index 0f6b8121..159da086 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -442,9 +442,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction /// 业务类型 /// 任务类型 /// - public async Task>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types) + public async Task>> GetTasks(long id, BusinessType? businessType, params TaskBaseTypeEnum[] types) { - var list = await TenantDb.Queryable().Where(x => x.BusinessId == id && x.BusinessType == businessType) + var list = await TenantDb.Queryable().Where(x => x.BusinessId == id) + .WhereIF(businessType.HasValue, x => x.BusinessType == businessType) .WhereIF(types != null && types.Length > 0, x => types.Contains(x.TaskType)) .Select().ToListAsync(); diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientFlowInstanceController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientFlowInstanceController.cs index 4e74fd81..32ea399d 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientFlowInstanceController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientFlowInstanceController.cs @@ -124,7 +124,7 @@ public class ClientFlowInstanceController : ApiController public DataResult> GetFlowContent( [FromQuery] long businessId, [FromQuery] BusinessType? businessType, - [FromQuery] params AuditType?[] types) + [FromQuery] params TaskBaseTypeEnum[]? types) { var result = _invokeService.GetFlowInstances(businessId, businessType, types); return result; diff --git a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user index f2a959bf..73975b0c 100644 --- a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user +++ b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user @@ -1,6 +1,6 @@  - D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml + D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml \ No newline at end of file