质量控制管理
This commit is contained in:
parent
b09a570636
commit
4593023a6c
@ -0,0 +1,100 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RIZO.Model.Mes.Dto.ProductionPreparation;
|
||||
using RIZO.Model.Mes.ProductionPreparation;
|
||||
using RIZO.Service.Mes.IMesService.ProductionPreparation;
|
||||
|
||||
//创建时间:2025-11-29
|
||||
namespace RIZO.Admin.WebApi.Controllers.Mes.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制主表
|
||||
/// </summary>
|
||||
[Route("mes/QualityControl")]
|
||||
public class QualityControlController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制主表接口
|
||||
/// </summary>
|
||||
private readonly IQualityControlService _QualityControlService;
|
||||
|
||||
public QualityControlController(IQualityControlService QualityControlService)
|
||||
{
|
||||
_QualityControlService = QualityControlService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询质量控制主表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "qualitycontrol:list")]
|
||||
public IActionResult QueryQualityControl([FromQuery] QualityControlQueryDto parm)
|
||||
{
|
||||
var response = _QualityControlService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询质量控制主表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "qualitycontrol:query")]
|
||||
public IActionResult GetQualityControl(long Id)
|
||||
{
|
||||
var response = _QualityControlService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<QualityControlDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量控制主表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "qualitycontrol:add")]
|
||||
[Log(Title = "质量控制主表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddQualityControl([FromBody] QualityControlDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<QualityControl>().ToCreate(HttpContext);
|
||||
|
||||
var response = _QualityControlService.AddQualityControl(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新质量控制主表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "qualitycontrol:edit")]
|
||||
[Log(Title = "质量控制主表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateQualityControl([FromBody] QualityControlDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<QualityControl>().ToUpdate(HttpContext);
|
||||
var response = _QualityControlService.UpdateQualityControl(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除质量控制主表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "qualitycontrol:delete")]
|
||||
[Log(Title = "质量控制主表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteQualityControl([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<long>(ids);
|
||||
|
||||
return ToResponse(_QualityControlService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RIZO.Model.Mes.Dto.ProductionPreparation;
|
||||
using RIZO.Model.Mes.ProductionPreparation;
|
||||
using RIZO.Service.Mes.IMesService.ProductionPreparation;
|
||||
|
||||
//创建时间:2025-11-29
|
||||
namespace RIZO.Admin.WebApi.Controllers.Mes.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
[Route("mes/QualityControlDetail")]
|
||||
public class QualityControlDetailController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)接口
|
||||
/// </summary>
|
||||
private readonly IQualityControlDetailService _QualityControlDetailService;
|
||||
|
||||
public QualityControlDetailController(IQualityControlDetailService QualityControlDetailService)
|
||||
{
|
||||
_QualityControlDetailService = QualityControlDetailService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询质量控制从表(存储具体检查参数明细)列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "qualitycontroldetail:list")]
|
||||
public IActionResult QueryQualityControlDetail([FromQuery] QualityControlDetailQueryDto parm)
|
||||
{
|
||||
var response = _QualityControlDetailService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询质量控制从表(存储具体检查参数明细)详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "qualitycontroldetail:query")]
|
||||
public IActionResult GetQualityControlDetail(long Id)
|
||||
{
|
||||
var response = _QualityControlDetailService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<QualityControlDetailDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "qualitycontroldetail:add")]
|
||||
[Log(Title = "质量控制从表(存储具体检查参数明细)", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddQualityControlDetail([FromBody] QualityControlDetailDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<QualityControlDetail>().ToCreate(HttpContext);
|
||||
|
||||
var response = _QualityControlDetailService.AddQualityControlDetail(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "qualitycontroldetail:edit")]
|
||||
[Log(Title = "质量控制从表(存储具体检查参数明细)", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateQualityControlDetail([FromBody] QualityControlDetailDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<QualityControlDetail>().ToUpdate(HttpContext);
|
||||
var response = _QualityControlDetailService.UpdateQualityControlDetail(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "qualitycontroldetail:delete")]
|
||||
[Log(Title = "质量控制从表(存储具体检查参数明细)", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteQualityControlDetail([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<long>(ids);
|
||||
|
||||
return ToResponse(_QualityControlDetailService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -41,6 +41,7 @@
|
||||
<Folder Include="Controllers\Mes\WorkOrderInfo\" />
|
||||
<Folder Include="Controllers\Mes\GatherData\" />
|
||||
<Folder Include="Controllers\Mes\PassWord\" />
|
||||
<Folder Include="Controllers\Mes\ProductionPreparation\" />
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
|
||||
namespace RIZO.Model.Mes.Dto.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)查询对象
|
||||
/// </summary>
|
||||
public class QualityControlDetailQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)输入输出对象
|
||||
/// </summary>
|
||||
public class QualityControlDetailDto
|
||||
{
|
||||
[Required(ErrorMessage = "从表主键ID(自增)不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "关联主表质控编码(quality_control.qc_code)不能为空")]
|
||||
public string QcCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "检查参数名称(如:环境温度、设备运行状态)不能为空")]
|
||||
public string ParamName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "参数值(如:23℃、正常)不能为空")]
|
||||
public string ParamValue { get; set; }
|
||||
|
||||
public string ParamUnit { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "该参数是否合格(0=不合格,1=合格)不能为空")]
|
||||
public string IsPass { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
|
||||
|
||||
[ExcelColumn(Name = "该参数是否合格(0=不合格,1=合格)")]
|
||||
public string IsPassLabel { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
|
||||
namespace RIZO.Model.Mes.Dto.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制主表查询对象
|
||||
/// </summary>
|
||||
public class QualityControlQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量控制主表输入输出对象
|
||||
/// </summary>
|
||||
public class QualityControlDto
|
||||
{
|
||||
[Required(ErrorMessage = "主表主键ID(自增)不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "质控编码(唯一标识,格式:QC+日期+序号,如QC20251201001)不能为空")]
|
||||
public string QcCode { get; set; }
|
||||
|
||||
public string CheckType { get; set; }
|
||||
|
||||
public string CheckDate { get; set; }
|
||||
|
||||
public string LineCode { get; set; }
|
||||
|
||||
public string WorkOrderNo { get; set; }
|
||||
|
||||
public int? CheckResult { get; set; }
|
||||
|
||||
public DateTime? CheckTime { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
|
||||
|
||||
[ExcelColumn(Name = "质控类型")]
|
||||
public string CheckTypeLabel { get; set; }
|
||||
}
|
||||
}
|
||||
88
RIZO.Model/Mes/ProductionPreparation/QualityControl.cs
Normal file
88
RIZO.Model/Mes/ProductionPreparation/QualityControl.cs
Normal file
@ -0,0 +1,88 @@
|
||||
|
||||
namespace RIZO.Model.Mes.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制主表
|
||||
/// </summary>
|
||||
[SugarTable("quality_control")]
|
||||
public class QualityControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 主表主键ID(自增)
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 质控编码(唯一标识,格式:QC+日期+序号,如QC20251201001)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "qc_code")]
|
||||
public string QcCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 质控类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "check_type")]
|
||||
public string CheckType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查日期(格式:YYYY-MM-DD)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "check_date")]
|
||||
public string CheckDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联产线(如:1号产线/2号产线)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "line_code")]
|
||||
public string LineCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联工单编号(可选)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "work_order_no")]
|
||||
public string WorkOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查结果(0=不合格,1=合格)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "check_result")]
|
||||
public int? CheckResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查完成时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "check_time")]
|
||||
public DateTime? CheckTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注(如不合格原因)
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "created_time")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间(自动同步)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "updated_time")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
59
RIZO.Model/Mes/ProductionPreparation/QualityControlDetail.cs
Normal file
59
RIZO.Model/Mes/ProductionPreparation/QualityControlDetail.cs
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
namespace RIZO.Model.Mes.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
[SugarTable("quality_control_detail")]
|
||||
public class QualityControlDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// 从表主键ID(自增)
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联主表质控编码(quality_control.qc_code)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "qc_code")]
|
||||
public string QcCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查参数名称(如:环境温度、设备运行状态)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "param_name")]
|
||||
public string ParamName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数值(如:23℃、正常)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "param_value")]
|
||||
public string ParamValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数单位(如:℃/%/MPa,无单位则留空)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "param_unit")]
|
||||
public string ParamUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 该参数是否合格(0=不合格,1=合格)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "is_pass")]
|
||||
public string IsPass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "created_time")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -22,7 +22,9 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Mes\Dto\GatherData\" />
|
||||
<Folder Include="Mes\Dto\PassWord\" />
|
||||
<Folder Include="Mes\Dto\ProductionPreparation\" />
|
||||
<Folder Include="Mes\GatherData\" />
|
||||
<Folder Include="Mes\PassWord\" />
|
||||
<Folder Include="Mes\ProductionPreparation\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
using RIZO.Model.Mes.Dto.ProductionPreparation;
|
||||
using RIZO.Model.Mes.ProductionPreparation;
|
||||
|
||||
namespace RIZO.Service.Mes.IMesService.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)service接口
|
||||
/// </summary>
|
||||
public interface IQualityControlDetailService : IBaseService<QualityControlDetail>
|
||||
{
|
||||
PagedInfo<QualityControlDetailDto> GetList(QualityControlDetailQueryDto parm);
|
||||
|
||||
QualityControlDetail GetInfo(long Id);
|
||||
|
||||
|
||||
QualityControlDetail AddQualityControlDetail(QualityControlDetail parm);
|
||||
int UpdateQualityControlDetail(QualityControlDetail parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
using RIZO.Model.Mes.Dto.ProductionPreparation;
|
||||
using RIZO.Model.Mes.ProductionPreparation;
|
||||
|
||||
namespace RIZO.Service.Mes.IMesService.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制主表service接口
|
||||
/// </summary>
|
||||
public interface IQualityControlService : IBaseService<QualityControl>
|
||||
{
|
||||
PagedInfo<QualityControlDto> GetList(QualityControlQueryDto parm);
|
||||
|
||||
QualityControl GetInfo(long Id);
|
||||
|
||||
|
||||
QualityControl AddQualityControl(QualityControl parm);
|
||||
int UpdateQualityControl(QualityControl parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using RIZO.Model.Mes.Dto.ProductionPreparation;
|
||||
using RIZO.Model.Mes.ProductionPreparation;
|
||||
using RIZO.Repository;
|
||||
using RIZO.Service.Mes.IMesService.ProductionPreparation;
|
||||
|
||||
namespace RIZO.Service.Mes.ProductionPreparation
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制从表(存储具体检查参数明细)Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IQualityControlDetailService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class QualityControlDetailService : BaseService<QualityControlDetail>, IQualityControlDetailService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询质量控制从表(存储具体检查参数明细)列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<QualityControlDetailDto> GetList(QualityControlDetailQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<QualityControlDetail, QualityControlDetailDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public QualityControlDetail GetInfo(long Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public QualityControlDetail AddQualityControlDetail(QualityControlDetail model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改质量控制从表(存储具体检查参数明细)
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateQualityControlDetail(QualityControlDetail model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<QualityControlDetail> QueryExp(QualityControlDetailQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<QualityControlDetail>();
|
||||
|
||||
return predicate;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using RIZO.Model.Mes.Dto.ProductionPreparation;
|
||||
using RIZO.Model.Mes.ProductionPreparation;
|
||||
using RIZO.Repository;
|
||||
using RIZO.Service.Mes.IMesService.ProductionPreparation;
|
||||
|
||||
namespace RIZO.Service.Mes
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量控制主表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IQualityControlService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class QualityControlService : BaseService<QualityControl>, IQualityControlService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询质量控制主表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<QualityControlDto> GetList(QualityControlQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<QualityControl, QualityControlDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public QualityControl GetInfo(long Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量控制主表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public QualityControl AddQualityControl(QualityControl model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改质量控制主表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateQualityControl(QualityControl model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<QualityControl> QueryExp(QualityControlQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<QualityControl>();
|
||||
|
||||
return predicate;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,9 +28,11 @@
|
||||
<Folder Include="Mes\IMesService\WorkOrderInfo\" />
|
||||
<Folder Include="Mes\IMesService\GatherData\" />
|
||||
<Folder Include="Mes\IMesService\PassWord\" />
|
||||
<Folder Include="Mes\IMesService\ProductionPreparation\" />
|
||||
<Folder Include="Mes\WorkOrderInfo\" />
|
||||
<Folder Include="Mes\GatherData\" />
|
||||
<Folder Include="Mes\PassWord\" />
|
||||
<Folder Include="Mes\ProductionPreparation\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user