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, IQcinspectionItemService { public List GetinspectionItemList() { return Queryable().ToList(); } public List GetinspectionItemList(string inspectionModule, string inspectionType) { var predicate = Expressionable.Create() .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(); } } }