87 lines
2.8 KiB
C#
87 lines
2.8 KiB
C#
|
|
using System;
|
||
|
|
using SqlSugar;
|
||
|
|
using Infrastructure.Attribute;
|
||
|
|
using Infrastructure.Extensions;
|
||
|
|
using DOAN.Model;
|
||
|
|
using DOAN.Model.Dto;
|
||
|
|
using DOAN.Model.MES.exception.Dto;
|
||
|
|
using DOAN.Model.MES.exception;
|
||
|
|
using DOAN.Repository;
|
||
|
|
|
||
|
|
using System.Linq;
|
||
|
|
using DOAN.Service.exception.IService;
|
||
|
|
|
||
|
|
namespace DOAN.Service.exception.Service
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 工单修改日志表Service业务层处理
|
||
|
|
/// </summary>
|
||
|
|
[AppService(ServiceType = typeof(IProWorkorderUpdateLogService), ServiceLifetime = LifeTime.Transient)]
|
||
|
|
public class ProWorkorderUpdateLogService : BaseService<ProWorkorderUpdateLog>, IProWorkorderUpdateLogService
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 查询工单修改日志表列表
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="parm"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public PagedInfo<ProWorkorderUpdateLogDto> GetList(ProWorkorderUpdateLogQueryDto parm)
|
||
|
|
{
|
||
|
|
var predicate = Expressionable.Create<ProWorkorderUpdateLog>();
|
||
|
|
|
||
|
|
var response = Queryable()
|
||
|
|
.Where(predicate.ToExpression())
|
||
|
|
.ToPage<ProWorkorderUpdateLog, ProWorkorderUpdateLogDto>(parm);
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 获取详情
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="Id"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public ProWorkorderUpdateLog GetInfo(string Id)
|
||
|
|
{
|
||
|
|
var response = Queryable()
|
||
|
|
.Where(x => x.Id == Id)
|
||
|
|
.First();
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 添加工单修改日志表
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="model"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public ProWorkorderUpdateLog AddProWorkorderUpdateLog(ProWorkorderUpdateLog model)
|
||
|
|
{
|
||
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 修改工单修改日志表
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="model"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public int UpdateProWorkorderUpdateLog(ProWorkorderUpdateLog model)
|
||
|
|
{
|
||
|
|
//var response = Update(w => w.Id == model.Id, it => new ProWorkorderUpdateLog()
|
||
|
|
//{
|
||
|
|
// Workorder = model.Workorder,
|
||
|
|
// Log = model.Log,
|
||
|
|
// ResponsiblePerson = model.ResponsiblePerson,
|
||
|
|
// Reason = model.Reason,
|
||
|
|
// ChangeTime = model.ChangeTime,
|
||
|
|
// Operator = model.Operator,
|
||
|
|
// CreatedTime = model.CreatedTime,
|
||
|
|
// CreatedBy = model.CreatedBy,
|
||
|
|
// UpdatedTime = model.UpdatedTime,
|
||
|
|
// UpdatedBy = model.UpdatedBy,
|
||
|
|
//});
|
||
|
|
//return response;
|
||
|
|
return Update(model, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|