using Infrastructure.Attribute; using Microsoft.Extensions.DependencyInjection; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ZR.Model.mes.pro; using ZR.Model.MES.qu; using ZR.Service.mes.qc.IService; using ZR.Service.mes.qu.IService; using static System.Runtime.InteropServices.JavaScript.JSType; 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(); } } }