83 lines
2.8 KiB
C#
83 lines
2.8 KiB
C#
using System;
|
|
using SqlSugar;
|
|
using Infrastructure.Attribute;
|
|
using Infrastructure.Extensions;
|
|
using ZR.Model;
|
|
using ZR.Model.Dto;
|
|
using ZR.Model.Business;
|
|
using ZR.Repository;
|
|
using ZR.Service.Business.IBusinessService;
|
|
using System.Linq;
|
|
|
|
namespace ZR.Service.Business
|
|
{
|
|
/// <summary>
|
|
/// MES成品入库单操作日志表Service业务层处理
|
|
/// </summary>
|
|
[AppService(ServiceType = typeof(IProFinishedProductReceiptLogService), ServiceLifetime = LifeTime.Transient)]
|
|
public class ProFinishedProductReceiptLogService : BaseService<ProFinishedProductReceiptLog>, IProFinishedProductReceiptLogService
|
|
{
|
|
/// <summary>
|
|
/// 查询MES成品入库单操作日志表列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<ProFinishedProductReceiptLogDto> GetList(ProFinishedProductReceiptLogQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<ProFinishedProductReceiptLog>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<ProFinishedProductReceiptLog, ProFinishedProductReceiptLogDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public ProFinishedProductReceiptLog GetInfo(long Id)
|
|
{
|
|
var response = Queryable()
|
|
.Where(x => x.Id == Id)
|
|
.First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加MES成品入库单操作日志表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public ProFinishedProductReceiptLog AddProFinishedProductReceiptLog(ProFinishedProductReceiptLog model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改MES成品入库单操作日志表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateProFinishedProductReceiptLog(ProFinishedProductReceiptLog model)
|
|
{
|
|
//var response = Update(w => w.Id == model.Id, it => new ProFinishedProductReceiptLog()
|
|
//{
|
|
// ReceiptNo = model.ReceiptNo,
|
|
// OperatedBy = model.OperatedBy,
|
|
// OperatedTime = model.OperatedTime,
|
|
// OperationType = model.OperationType,
|
|
// OperationContent = model.OperationContent,
|
|
// OperationResult = model.OperationResult,
|
|
// Remark = model.Remark,
|
|
//});
|
|
//return response;
|
|
return Update(model, true);
|
|
}
|
|
|
|
}
|
|
} |