95 lines
3.1 KiB
C#
95 lines
3.1 KiB
C#
using System;
|
|
using SqlSugar;
|
|
using Infrastructure.Attribute;
|
|
using Infrastructure.Extensions;
|
|
using DOAN.Model;
|
|
using DOAN.Model.Dto;
|
|
using DOAN.Model.Business;
|
|
using DOAN.Repository;
|
|
using DOAN.Service.Business.IBusinessService;
|
|
using System.Linq;
|
|
|
|
namespace DOAN.Service.Business
|
|
{
|
|
/// <summary>
|
|
/// 最终检验Service业务层处理
|
|
/// </summary>
|
|
[AppService(ServiceType = typeof(IQcFinalInspectionService), ServiceLifetime = LifeTime.Transient)]
|
|
public class QcFinalInspectionService : BaseService<QcFinalInspection>, IQcFinalInspectionService
|
|
{
|
|
/// <summary>
|
|
/// 查询最终检验列表
|
|
/// </summary>
|
|
/// <param name="parm"></param>
|
|
/// <returns></returns>
|
|
public PagedInfo<QcFinalInspectionDto> GetList(QcFinalInspectionQueryDto parm)
|
|
{
|
|
var predicate = Expressionable.Create<QcFinalInspection>();
|
|
|
|
var response = Queryable()
|
|
.Where(predicate.ToExpression())
|
|
.ToPage<QcFinalInspection, QcFinalInspectionDto>(parm);
|
|
|
|
return response;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取详情
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <returns></returns>
|
|
public QcFinalInspection GetInfo(int Id)
|
|
{
|
|
var response = Queryable()
|
|
.Where(x => x.Id == Id)
|
|
.First();
|
|
|
|
return response;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加最终检验
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public QcFinalInspection AddQcFinalInspection(QcFinalInspection model)
|
|
{
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改最终检验
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public int UpdateQcFinalInspection(QcFinalInspection model)
|
|
{
|
|
//var response = Update(w => w.Id == model.Id, it => new QcFinalInspection()
|
|
//{
|
|
// FkWorkorder = model.FkWorkorder,
|
|
// FactoryCode = model.FactoryCode,
|
|
// LineCode = model.LineCode,
|
|
// MachineCode = model.MachineCode,
|
|
// ProductCode = model.ProductCode,
|
|
// Productname = model.Productname,
|
|
// SNnumber = model.SNnumber,
|
|
// ParamterName = model.ParamterName,
|
|
// StandardParamterValue = model.StandardParamterValue,
|
|
// RealParamterValue = model.RealParamterValue,
|
|
// UpRangeLimit = model.UpRangeLimit,
|
|
// LowRangeLimit = model.LowRangeLimit,
|
|
// Unit = model.Unit,
|
|
// CheckResult = model.CheckResult,
|
|
// ParamTime = model.ParamTime,
|
|
// Createdby = model.Createdby,
|
|
// Updatedby = model.Updatedby,
|
|
// CreatedTime = model.CreatedTime,
|
|
// UpdatedTime = model.UpdatedTime,
|
|
//});
|
|
//return response;
|
|
return Update(model, true);
|
|
}
|
|
|
|
}
|
|
} |