82 lines
2.6 KiB
C#
82 lines
2.6 KiB
C#
using Infrastructure.Attribute;
|
|
using SqlSugar;
|
|
using ZR.Model;
|
|
using ZR.Model.Business;
|
|
using ZR.Model.Dto;
|
|
using ZR.Repository;
|
|
using ZR.Service.Business.IBusinessService;
|
|
|
|
namespace ZR.Service.Business
|
|
{
|
|
/// <summary>
|
|
/// 质量BackEnd工单操作日志Service业务层处理
|
|
/// </summary>
|
|
[AppService(ServiceType = typeof(IQcBackEndLogWorkorderService), ServiceLifetime = LifeTime.Transient)]
|
|
public class QcBackEndLogWorkorderService : BaseService<QcBackEndLogWorkorder>, IQcBackEndLogWorkorderService
|
|
{
|
|
/// <summary>
|
|
/// 查询质量BackEnd工单操作日志列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<QcBackEndLogWorkorderDto> GetList(QcBackEndLogWorkorderQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<QcBackEndLogWorkorder>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<QcBackEndLogWorkorder, QcBackEndLogWorkorderDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public QcBackEndLogWorkorder GetInfo(string Id)
|
|
{
|
|
var response = Queryable()
|
|
.Where(x => x.Id == Id)
|
|
.First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加质量BackEnd工单操作日志
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public QcBackEndLogWorkorder AddQcBackEndLogWorkorder(QcBackEndLogWorkorder model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改质量BackEnd工单操作日志
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateQcBackEndLogWorkorder(QcBackEndLogWorkorder model)
|
|
{
|
|
//var response = Update(w => w.Id == model.Id, it => new QcBackEndLogWorkorder()
|
|
//{
|
|
// Name = model.Name,
|
|
// Content = model.Content,
|
|
// Type = model.Type,
|
|
// Status = model.Status,
|
|
// Remark = model.Remark,
|
|
// CreatedBy = model.CreatedBy,
|
|
// CreatedTime = model.CreatedTime,
|
|
// UpdatedBy = model.UpdatedBy,
|
|
// UpdatedTime = model.UpdatedTime,
|
|
//});
|
|
//return response;
|
|
return Update(model, true);
|
|
}
|
|
|
|
}
|
|
} |