using System; using SqlSugar; using Infrastructure.Attribute; using Infrastructure.Extensions; using ZR.Model; using ZR.Model.Dto; using ZR.Model.Business; using ZR.Repository; using ZR.Service.Business.IBusinessService; using System.Linq; namespace ZR.Service.Business { /// /// MES成品入库单操作日志表Service业务层处理 /// [AppService(ServiceType = typeof(IProFinishedProductReceiptLogService), ServiceLifetime = LifeTime.Transient)] public class ProFinishedProductReceiptLogService : BaseService, IProFinishedProductReceiptLogService { /// /// 查询MES成品入库单操作日志表列表 /// /// /// public PagedInfo GetList(ProFinishedProductReceiptLogQueryDto parm) { var predicate = Expressionable.Create(); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(parm); return response; } /// /// 获取详情 /// /// /// public ProFinishedProductReceiptLog GetInfo(long Id) { var response = Queryable() .Where(x => x.Id == Id) .First(); return response; } /// /// 添加MES成品入库单操作日志表 /// /// /// public ProFinishedProductReceiptLog AddProFinishedProductReceiptLog(ProFinishedProductReceiptLog model) { return Context.Insertable(model).ExecuteReturnEntity(); } /// /// 修改MES成品入库单操作日志表 /// /// /// public int UpdateProFinishedProductReceiptLog(ProFinishedProductReceiptLog model) { //var response = Update(w => w.Id == model.Id, it => new ProFinishedProductReceiptLog() //{ // ReceiptNo = model.ReceiptNo, // OperatedBy = model.OperatedBy, // OperatedTime = model.OperatedTime, // OperationType = model.OperationType, // OperationContent = model.OperationContent, // OperationResult = model.OperationResult, // Remark = model.Remark, //}); //return response; return Update(model, true); } } }