30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
using Infrastructure.Attribute;
|
|
using SqlSugar;
|
|
using ZR.Model.MES.qu;
|
|
using ZR.Service.mes.qc.IService;
|
|
|
|
namespace ZR.Service.mes.qc
|
|
{
|
|
|
|
|
|
[AppService(ServiceType = typeof(IQcinspectionItemService), ServiceLifetime = LifeTime.Transient)]
|
|
public class QcinspectionItemService : BaseService<QcInspectionitem>, IQcinspectionItemService
|
|
{
|
|
public List<QcInspectionitem> GetinspectionItemList()
|
|
{
|
|
return Queryable().ToList();
|
|
}
|
|
|
|
public List<QcInspectionitem> GetinspectionItemList(string inspectionModule, string inspectionType)
|
|
{
|
|
|
|
var predicate = Expressionable.Create<QcInspectionitem>()
|
|
.AndIF(!string.IsNullOrEmpty(inspectionModule), it => it.InspectionModule == inspectionModule)
|
|
.AndIF(!string.IsNullOrEmpty(inspectionType), it => it.InspectionType == inspectionType)
|
|
.ToExpression();
|
|
|
|
return Queryable().Where(predicate).OrderBy(x => x.Order).ToList();
|
|
}
|
|
}
|
|
}
|