|
|
@ -6,12 +6,14 @@ using System.Linq.Expressions; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using DocumentFormat.OpenXml.Office.CustomUI; |
|
|
|
using FluentValidation; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Application.Dtos; |
|
|
|
using Volo.Abp.Domain.Entities; |
|
|
|
using Volo.Abp.Validation; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Shared.Application.Contracts; |
|
|
|
using Win_in.Sfs.Shared.Domain; |
|
|
@ -176,7 +178,12 @@ public class ProductReceiptRequestAppService : |
|
|
|
bool includeDetails = false, |
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Expression<Func<ProductReceiptRequest, bool>> expression = p => p.Type.ToString() == type; |
|
|
|
if (!EnumProductReceiptType.TryParse(type, true, out EnumProductReceiptType enumType)) |
|
|
|
{ |
|
|
|
throw new AbpValidationException($"type {type} is not valid"); |
|
|
|
} |
|
|
|
|
|
|
|
Expression<Func<ProductReceiptRequest, bool>> expression = p => p.Type == enumType; |
|
|
|
if (requestInput.Condition.Filters?.Count > 0) |
|
|
|
{ |
|
|
|
expression = expression.And(requestInput.Condition.Filters.ToLambda<ProductReceiptRequest>()); |
|
|
|