82 lines
2.6 KiB
C#
82 lines
2.6 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(IWmPolishRecordService), ServiceLifetime = LifeTime.Transient)]
|
|
public class WmPolishRecordService : BaseService<WmPolishRecord>, IWmPolishRecordService
|
|
{
|
|
/// <summary>
|
|
/// 查询工艺路线-抛光 库存变动表列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<WmPolishRecordDto> GetList(WmPolishRecordQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<WmPolishRecord>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<WmPolishRecord, WmPolishRecordDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public WmPolishRecord GetInfo(string Id)
|
|
{
|
|
var response = Queryable().Where(x => x.Id == Id).First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加工艺路线-抛光 库存变动表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public WmPolishRecord AddWmPolishRecord(WmPolishRecord model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改工艺路线-抛光 库存变动表
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateWmPolishRecord(WmPolishRecord model)
|
|
{
|
|
//var response = Update(w => w.Id == model.Id, it => new WmPolishRecord()
|
|
//{
|
|
// Code = model.Code,
|
|
// Partnumber = model.Partnumber,
|
|
// BlankNum = model.BlankNum,
|
|
// ChangeType = model.ChangeType,
|
|
// ChangeQuantity = model.ChangeQuantity,
|
|
// ActionTime = model.ActionTime,
|
|
// Status = model.Status,
|
|
// Remark = model.Remark,
|
|
// CreatedBy = model.CreatedBy,
|
|
// CreatedTime = model.CreatedTime,
|
|
// UpdatedBy = model.UpdatedBy,
|
|
// UpdatedTime = model.UpdatedTime,
|
|
//});
|
|
//return response;
|
|
return Update(model, true);
|
|
}
|
|
}
|
|
}
|