仓库管理:checklog
This commit is contained in:
89
ZR.Service/mes/wms/WmCheckLogService.cs
Normal file
89
ZR.Service/mes/wms/WmCheckLogService.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(IWmCheckLogService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class WmCheckLogService : BaseService<WmCheckLog>, IWmCheckLogService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询盘点记录列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<WmCheckLogDto> GetList(WmCheckLogQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmCheckLog>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<WmCheckLog, WmCheckLogDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public WmCheckLog GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加盘点记录
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public WmCheckLog AddWmCheckLog(WmCheckLog model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改盘点记录
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateWmCheckLog(WmCheckLog model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new WmCheckLog()
|
||||
//{
|
||||
// FkGoodsNowProduction = model.FkGoodsNowProduction,
|
||||
// Partnumber = model.Partnumber,
|
||||
// PackageCodeClient = model.PackageCodeClient,
|
||||
// OldValue = model.OldValue,
|
||||
// NewValue = model.NewValue,
|
||||
// Type = model.Type,
|
||||
// Value = model.Value,
|
||||
// Remark = model.Remark,
|
||||
// CreatedBy = model.CreatedBy,
|
||||
// CreatedTime = model.CreatedTime,
|
||||
// UpdatedBy = model.UpdatedBy,
|
||||
// UpdatedTime = model.UpdatedTime,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user