92 lines
2.9 KiB
C#
92 lines
2.9 KiB
C#
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.mes.wms
|
|
{
|
|
/// <summary>
|
|
/// 出库货物记录表Service业务层处理
|
|
/// </summary>
|
|
[AppService(ServiceType = typeof(IWmGoodsOutProductionService), ServiceLifetime = LifeTime.Transient)]
|
|
public class WmGoodsOutProductionService : BaseService<WmGoodsOutRecord>, IWmGoodsOutProductionService
|
|
{
|
|
/// <summary>
|
|
/// 查询出库货物记录表列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<WmGoodsOutProductionDto> GetList(WmGoodsOutProductionQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<WmGoodsOutRecord>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<WmGoodsOutRecord, WmGoodsOutProductionDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public WmGoodsOutRecord GetInfo(string Id)
|
|
{
|
|
var response = Queryable()
|
|
.Where(x => x.Id == Id)
|
|
.First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加出库货物记录表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public WmGoodsOutRecord AddWmGoodsOutProduction(WmGoodsOutRecord model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改出库货物记录表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateWmGoodsOutProduction(WmGoodsOutRecord 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);
|
|
}
|
|
|
|
}
|
|
} |