任务类型替换

usertest
嵇文龙 3 months ago
parent e8d5aa7af4
commit a0c470b932

@ -17,7 +17,7 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction
/// <param name="businessType">业务类型</param> /// <param name="businessType">业务类型</param>
/// <param name="types">任务类型</param> /// <param name="types">任务类型</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types); Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType? businessType, params TaskBaseTypeEnum[] types);
/// <summary> /// <summary>
/// 返回指定类型的任务是否已存在 /// 返回指定类型的任务是否已存在

@ -442,9 +442,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <param name="businessType">业务类型</param> /// <param name="businessType">业务类型</param>
/// <param name="types">任务类型</param> /// <param name="types">任务类型</param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types) public async Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType? businessType, params TaskBaseTypeEnum[] types)
{ {
var list = await TenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == id && x.BusinessType == businessType) var list = await TenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == id)
.WhereIF(businessType.HasValue, x => x.BusinessType == businessType)
.WhereIF(types != null && types.Length > 0, x => types.Contains(x.TaskType)) .WhereIF(types != null && types.Length > 0, x => types.Contains(x.TaskType))
.Select<BusinessTaskDto>().ToListAsync(); .Select<BusinessTaskDto>().ToListAsync();

@ -124,7 +124,7 @@ public class ClientFlowInstanceController : ApiController
public DataResult<List<FlowInstanceRes>> GetFlowContent( public DataResult<List<FlowInstanceRes>> GetFlowContent(
[FromQuery] long businessId, [FromQuery] long businessId,
[FromQuery] BusinessType? businessType, [FromQuery] BusinessType? businessType,
[FromQuery] params AuditType?[] types) [FromQuery] params TaskBaseTypeEnum[]? types)
{ {
var result = _invokeService.GetFlowInstances(businessId, businessType, types); var result = _invokeService.GetFlowInstances(businessId, businessType, types);
return result; return result;

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
Loading…
Cancel
Save