85 lines
2.6 KiB
C#
85 lines
2.6 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>
|
||
|
|
/// 质量GP12工单操作日志Service业务层处理
|
||
|
|
/// </summary>
|
||
|
|
[AppService(ServiceType = typeof(IQcGp12LogWorkorderService), ServiceLifetime = LifeTime.Transient)]
|
||
|
|
public class QcGp12LogWorkorderService : BaseService<QcGp12LogWorkorder>, IQcGp12LogWorkorderService
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 查询质量GP12工单操作日志列表
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="parm"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public PagedInfo<QcGp12LogWorkorderDto> GetList(QcGp12LogWorkorderQueryDto parm)
|
||
|
|
{
|
||
|
|
var predicate = Expressionable.Create<QcGp12LogWorkorder>();
|
||
|
|
|
||
|
|
var response = Queryable()
|
||
|
|
.Where(predicate.ToExpression())
|
||
|
|
.ToPage<QcGp12LogWorkorder, QcGp12LogWorkorderDto>(parm);
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 获取详情
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="Id"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public QcGp12LogWorkorder GetInfo(string Id)
|
||
|
|
{
|
||
|
|
var response = Queryable()
|
||
|
|
.Where(x => x.Id == Id)
|
||
|
|
.First();
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 添加质量GP12工单操作日志
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="model"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public QcGp12LogWorkorder AddQcGp12LogWorkorder(QcGp12LogWorkorder model)
|
||
|
|
{
|
||
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 修改质量GP12工单操作日志
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="model"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public int UpdateQcGp12LogWorkorder(QcGp12LogWorkorder model)
|
||
|
|
{
|
||
|
|
//var response = Update(w => w.Id == model.Id, it => new QcGp12LogWorkorder()
|
||
|
|
//{
|
||
|
|
// 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);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|