查询缺陷项 不分页
This commit is contained in:
parent
80c122558f
commit
3e3497bed3
@ -37,6 +37,16 @@ namespace DOAN.WebApi.Controllers.MES.quality.FQC
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
//TODO 查询缺陷项 不分页
|
||||
[HttpGet("list_no_page")]
|
||||
[AllowAnonymous]
|
||||
public IActionResult QueryQcDefectConfigNoPage([FromQuery] QcDefectConfigQueryDto parm)
|
||||
{
|
||||
var response = _QcDefectConfigService.GetListNoPage(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询缺陷类别详情
|
||||
|
||||
@ -5,7 +5,7 @@ namespace DOAN.Model.MES.quality.IQC.Dto
|
||||
/// <summary>
|
||||
/// 缺陷类别查询对象
|
||||
/// </summary>
|
||||
public class QcDefectConfigQueryDto : PagerInfo
|
||||
public class QcDefectConfigQueryDto :PagerInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Code { get; set; }
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user