using Infrastructure.Attribute; using Infrastructure.Extensions; using RIZO.Admin.WebApi.PLC.Model; using RIZO.Admin.WebApi.PLC.Model.Dto; using RIZO.Admin.WebApi.PLC.Service.IService; using RIZO.Model; using RIZO.Repository; using RIZO.ServiceCore; using SqlSugar; namespace RIZO.Admin.WebApi.PLC.Service { /// /// PLC返回的工位工序结果Service业务层处理 /// [AppService(ServiceType = typeof(IPlcOperationResultService), ServiceLifetime = LifeTime.Transient)] public class PlcOperationResultService : BaseService, IPlcOperationResultService { /// /// 查询PLC返回的工位工序结果列表 /// /// /// public PagedInfo GetList(PlcOperationResultQueryDto parm) { var predicate = QueryExp(parm); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(parm); return response; } /// /// 获取详情 /// /// /// public PlcOperationResult GetInfo(int Id) { var response = Queryable() .Where(x => x.Id == Id) .First(); return response; } /// /// 添加PLC返回的工位工序结果 /// /// /// public PlcOperationResult AddPlcOperationResult(PlcOperationResult model) { return Insertable(model).ExecuteReturnEntity(); } /// /// 修改PLC返回的工位工序结果 /// /// /// public int UpdatePlcOperationResult(PlcOperationResult model) { return Update(model, true); } /// /// 查询导出表达式 /// /// /// private static Expressionable QueryExp(PlcOperationResultQueryDto parm) { var predicate = Expressionable.Create(); return predicate; } } }