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(IPlcProductionDataService), ServiceLifetime = LifeTime.Transient)] public class PlcProductionDataService : BaseService, IPlcProductionDataService { /// /// 查询产线PLC生产参数数据表列表 /// /// /// public PagedInfo GetList(PlcProductionDataQueryDto parm) { var predicate = QueryExp(parm); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(parm); return response; } /// /// 获取详情 /// /// /// public PlcProductionData GetInfo(int Id) { var response = Queryable() .Where(x => x.Id == Id) .First(); return response; } /// /// 添加产线PLC生产参数数据表 /// /// /// public PlcProductionData AddPlcProductionData(PlcProductionData model) { return Insertable(model).ExecuteReturnEntity(); } /// /// 修改产线PLC生产参数数据表 /// /// /// public int UpdatePlcProductionData(PlcProductionData model) { return Update(model, true); } /// /// 查询导出表达式 /// /// /// private static Expressionable QueryExp(PlcProductionDataQueryDto parm) { var predicate = Expressionable.Create(); return predicate; } } }