using Infrastructure.Attribute; using Infrastructure.Extensions; using DOAN.Model.BZFM.Dto; using DOAN.Model.BZFM; using DOAN.Repository; using DOAN.Service.BZFM.IBZFMService; namespace DOAN.Service.BZFM { /// /// 库存表Service业务层处理 /// [AppService(ServiceType = typeof(IMmInventoryService), ServiceLifetime = LifeTime.Transient)] public class MmInventoryService : BaseService, IMmInventoryService { /// /// 查询库存表列表 /// /// /// public PagedInfo GetList(MmInventoryQueryDto parm) { var predicate = QueryExp(parm); var response = Queryable() .Where(predicate.ToExpression()) .ToPage(parm); return response; } /// /// 获取详情 /// /// /// public MmInventory GetInfo(int Id) { var response = Queryable() .Where(x => x.Id == Id) .First(); return response; } /// /// 添加库存表 /// /// /// public MmInventory AddMmInventory(MmInventory model) { return Insertable(model).ExecuteReturnEntity(); } /// /// 修改库存表 /// /// /// public int UpdateMmInventory(MmInventory model) { return Update(model, true); } /// /// 查询导出表达式 /// /// /// private static Expressionable QueryExp(MmInventoryQueryDto parm) { var predicate = Expressionable.Create(); return predicate; } } }