88 lines
2.6 KiB
C#
88 lines
2.6 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(IWmFgentryInspectService), ServiceLifetime = LifeTime.Transient)]
|
|
public class WmFgentryInspectService : BaseService<WmFgentryInspect>, IWmFgentryInspectService
|
|
{
|
|
/// <summary>
|
|
/// 查询成品入库检验列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<WmFgentryInspectDto> GetList(WmFgentryInspectQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<WmFgentryInspect>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<WmFgentryInspect, WmFgentryInspectDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public WmFgentryInspect GetInfo(int Id)
|
|
{
|
|
var response = Queryable()
|
|
.Where(x => x.Id == Id)
|
|
.First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加成品入库检验
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public WmFgentryInspect AddWmFgentryInspect(WmFgentryInspect model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改成品入库检验
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateWmFgentryInspect(WmFgentryInspect model)
|
|
{
|
|
//var response = Update(w => w.Id == model.Id, it => new WmFgentryInspect()
|
|
//{
|
|
// Workorder = model.Workorder,
|
|
// Machine = model.Machine,
|
|
// ProductionNum = model.ProductionNum,
|
|
// Partnumber = model.Partnumber,
|
|
// Bfilled = model.Bfilled,
|
|
// Result = model.Result,
|
|
// CreatedBy = model.CreatedBy,
|
|
// CreatedTime = model.CreatedTime,
|
|
// UpdatedBy = model.UpdatedBy,
|
|
// UpdatedTime = model.UpdatedTime,
|
|
//});
|
|
//return response;
|
|
return Update(model, true);
|
|
}
|
|
|
|
}
|
|
} |