91 lines
3.1 KiB
C#
91 lines
3.1 KiB
C#
using Infrastructure.Attribute;
|
|
using SqlSugar;
|
|
using ZR.Model;
|
|
using ZR.Model.MES.wms;
|
|
using ZR.Model.MES.wms.Dto;
|
|
using ZR.Repository;
|
|
using ZR.Service.mes.wms.IService;
|
|
|
|
namespace ZR.Service.mes.wms
|
|
{
|
|
/// <summary>
|
|
/// 后道检验工单表Service业务层处理
|
|
/// </summary>
|
|
[AppService(ServiceType = typeof(IWmPolishInspectionWorkorderService), ServiceLifetime = LifeTime.Transient)]
|
|
public class WmPolishInspectionWorkorderService : BaseService<WmPolishInspectionWorkorder>, IWmPolishInspectionWorkorderService
|
|
{
|
|
/// <summary>
|
|
/// 查询后道检验工单表列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<WmPolishInspectionWorkorderDto> GetList(WmPolishInspectionWorkorderQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<WmPolishInspectionWorkorder>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<WmPolishInspectionWorkorder, WmPolishInspectionWorkorderDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public WmPolishInspectionWorkorder GetInfo(string Id)
|
|
{
|
|
var response = Queryable()
|
|
.Where(x => x.Id == Id)
|
|
.First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加后道检验工单表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public WmPolishInspectionWorkorder AddWmPolishInspectionWorkorder(WmPolishInspectionWorkorder model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改后道检验工单表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateWmPolishInspectionWorkorder(WmPolishInspectionWorkorder model)
|
|
{
|
|
//var response = Update(w => w.Id == model.Id, it => new WmPolishInspectionWorkorder()
|
|
//{
|
|
// WorkorderNo = model.WorkorderNo,
|
|
// Partnumber = model.Partnumber,
|
|
// BlankNum = model.BlankNum,
|
|
// Quantity = model.Quantity,
|
|
// PassNum = model.PassNum,
|
|
// PolishNum = model.PolishNum,
|
|
// SandingNum = model.SandingNum,
|
|
// DiscardNum = model.DiscardNum,
|
|
// StartTime = model.StartTime,
|
|
// EndTime = model.EndTime,
|
|
// Type = model.Type,
|
|
// Remark = model.Remark,
|
|
// IsSend = model.IsSend,
|
|
// Status = model.Status,
|
|
// UpdatedBy = model.UpdatedBy,
|
|
// UpdatedTime = model.UpdatedTime,
|
|
// CreatedBy = model.CreatedBy,
|
|
// CreatedTime = model.CreatedTime,
|
|
//});
|
|
//return response;
|
|
return Update(model, true);
|
|
}
|
|
|
|
}
|
|
} |