39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
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<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();
|
|
}
|
|
}
|
|
}
|