using System; using SqlSugar; using Infrastructure.Attribute; using Infrastructure.Extensions; using ZR.Model; using ZR.Model.Dto; using ZR.Repository; using System.Linq; using ZR.Service.mes.wms.IService; using ZR.Model.MES.wms; using ZR.Model.MES.wms.Dto; namespace ZR.Service.Business { /// /// 出库货物记录表Service业务层处理 /// [AppService(ServiceType = typeof(IWmGoodsOutProductionService), ServiceLifetime = LifeTime.Transient)] public class WmGoodsOutProductionService : BaseService, IWmGoodsOutProductionService { /// /// 查询出库货物记录表列表 /// /// /// public PagedInfo GetList(WmGoodsOutProductionQueryDto parm) { var predicate = Expressionable.Create(); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(parm); return response; } /// /// 获取详情 /// /// /// public WmGoodsOutProduction GetInfo(string Id) { var response = Queryable() .Where(x => x.Id == Id) .First(); return response; } /// /// 添加出库货物记录表 /// /// /// public WmGoodsOutProduction AddWmGoodsOutProduction(WmGoodsOutProduction model) { return Context.Insertable(model).ExecuteReturnEntity(); } /// /// 修改出库货物记录表 /// /// /// public int UpdateWmGoodsOutProduction(WmGoodsOutProduction model) { //var response = Update(w => w.Id == model.Id, it => new WmGoodsOutProduction() //{ // PackageCode = model.PackageCode, // PackageCodeClient = model.PackageCodeClient, // PackageCodeOriginal = model.PackageCodeOriginal, // LocationCode = model.LocationCode, // Partnumber = model.Partnumber, // GoodsNumLogic = model.GoodsNumLogic, // GoodsNumAction = model.GoodsNumAction, // EntryWarehouseTime = model.EntryWarehouseTime, // OutTime = model.OutTime, // Remark = model.Remark, // UpdatedBy = model.UpdatedBy, // UpdatedTime = model.UpdatedTime, // CreatedBy = model.CreatedBy, // CreatedTime = model.CreatedTime, //}); //return response; return Update(model, true); } } }