Uat_Study
parent
3affa7d89e
commit
d1dba6b379
|
@ -8,7 +8,7 @@ using IRaCIS.Core.Domain.Models;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
using Castle.Core.Internal;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -27,11 +27,18 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery queryFrontAuditConfig)
|
||||
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery iq)
|
||||
{
|
||||
var query = _repository.GetQueryable<FrontAuditConfig>()
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Value == iq.Value)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ValueCN == iq.ValueCN)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Description == iq.Description)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.OptTypeId == iq.OptTypeId)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Code == iq.Code)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ChildrenTypeId == iq.ChildrenTypeId);
|
||||
|
||||
|
||||
var frontAuditConfigQueryable = _repository.GetQueryable<FrontAuditConfig>()
|
||||
var frontAuditConfigQueryable = query
|
||||
.ProjectTo<FrontAuditConfigView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await frontAuditConfigQueryable.ToListAsync();
|
||||
|
|
Loading…
Reference in New Issue