仓库模块_当前货物表:init
This commit is contained in:
25
ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
Normal file
25
ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
|
||||
namespace ZR.Service.Business.IBusinessService
|
||||
{
|
||||
/// <summary>
|
||||
/// 成品库当前货物表service接口
|
||||
/// </summary>
|
||||
public interface IWmGoodsNowProductionService : IBaseService<WmGoodsNowProduction>
|
||||
{
|
||||
PagedInfo<WmGoodsNowProductionDto> GetList(WmGoodsNowProductionQueryDto parm);
|
||||
|
||||
WmGoodsNowProduction GetInfo(string Id);
|
||||
|
||||
WmGoodsNowProduction AddWmGoodsNowProduction(WmGoodsNowProduction parm);
|
||||
|
||||
int UpdateWmGoodsNowProduction(WmGoodsNowProduction parm);
|
||||
|
||||
}
|
||||
}
|
||||
89
ZR.Service/mes/wms/WmGoodsNowProductionService.cs
Normal file
89
ZR.Service/mes/wms/WmGoodsNowProductionService.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using ZR.Model;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.Business.IBusinessService;
|
||||
using System.Linq;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
|
||||
namespace ZR.Service.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// 成品库当前货物表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IWmGoodsNowProductionService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class WmGoodsNowProductionService : BaseService<WmGoodsNowProduction>, IWmGoodsNowProductionService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询成品库当前货物表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<WmGoodsNowProductionDto> GetList(WmGoodsNowProductionQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmGoodsNowProduction>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<WmGoodsNowProduction, WmGoodsNowProductionDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public WmGoodsNowProduction GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加成品库当前货物表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public WmGoodsNowProduction AddWmGoodsNowProduction(WmGoodsNowProduction model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改成品库当前货物表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateWmGoodsNowProduction(WmGoodsNowProduction model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new WmGoodsNowProduction()
|
||||
//{
|
||||
// PackageCode = model.PackageCode,
|
||||
// PackageCodeClient = model.PackageCodeClient,
|
||||
// PackageCodeOriginal = model.PackageCodeOriginal,
|
||||
// LocationCode = model.LocationCode,
|
||||
// Partnumber = model.Partnumber,
|
||||
// GoodsNumLogic = model.GoodsNumLogic,
|
||||
// GoodsNumAction = model.GoodsNumAction,
|
||||
// EntryWarehouseTime = model.EntryWarehouseTime,
|
||||
// Remark = model.Remark,
|
||||
// UpdatedBy = model.UpdatedBy,
|
||||
// UpdatedTime = model.UpdatedTime,
|
||||
// CreatedBy = model.CreatedBy,
|
||||
// CreatedTime = model.CreatedTime,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user