查询缺陷项 不分页

This commit is contained in:
qianhao.xu
2024-12-27 13:08:25 +08:00
parent 80c122558f
commit 3e3497bed3
4 changed files with 30 additions and 1 deletions

View File

@@ -11,6 +11,9 @@ namespace DOAN.Service.MES.quality.FQC.IService
{
PagedInfo<QcDefectConfigDto> GetList(QcDefectConfigQueryDto parm);
List<QcDefectConfigDto> GetListNoPage(QcDefectConfigQueryDto parm);
QcDefectConfig GetInfo(int Id);
QcDefectConfig AddQcDefectConfig(QcDefectConfig parm);

View File

@@ -4,6 +4,7 @@ using DOAN.Model.MES.quality.IQC.Dto;
using DOAN.Repository;
using DOAN.Service.MES.quality.FQC.IService;
using Infrastructure.Attribute;
using Mapster;
namespace DOAN.Service.MES.quality.FQC
{
@@ -35,7 +36,22 @@ namespace DOAN.Service.MES.quality.FQC
return response;
}
public List<QcDefectConfigDto> GetListNoPage(QcDefectConfigQueryDto parm)
{
var predicate = Expressionable.Create<QcDefectConfig>()
.AndIF(!string.IsNullOrEmpty(parm.Name), it => it.Name.Contains(parm.Name))
.AndIF(!string.IsNullOrEmpty(parm.Code), it => it.Code.Contains(parm.Code))
.AndIF(!string.IsNullOrEmpty(parm.Group), it => it.Group.Contains(parm.Group))
.AndIF(!string.IsNullOrEmpty(parm.QcType), it => it.QcType.Contains(parm.QcType))
.AndIF(!string.IsNullOrEmpty(parm.Status), it => it.Status == parm.Status);
var response = Queryable()
.Where(predicate.ToExpression()).ToList().Adapt<List<QcDefectConfig>, List<QcDefectConfigDto>>();
return response;
}
/// <summary>
/// 获取详情
/// </summary>