成品检验
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
using DOAN.Model.MES.quality.IQC;
|
||||
using DOAN.Model.MES.quality.IQC.Dto;
|
||||
using DOAN.Service.MES.quality.FQC.IService;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
//创建时间:2024-10-10
|
||||
namespace DOAN.WebApi.Controllers.MES.quality.FQC
|
||||
{
|
||||
/// <summary>
|
||||
/// 成品检验 缺陷收集
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[Route("mes/qualityManagement/FQC/QcFinishedproductDefect")]
|
||||
public class QcFinishedproductDefectController : BaseController
|
||||
{
|
||||
private readonly IQcFinishedproductDefectService qcFinishedproductDefectService;
|
||||
public QcFinishedproductDefectController(IQcFinishedproductDefectService qcFinishedproductDefectService)
|
||||
{
|
||||
this.qcFinishedproductDefectService = qcFinishedproductDefectService;
|
||||
}
|
||||
|
||||
|
||||
//TODO 增加 缺陷数
|
||||
[HttpGet("add_defect_num")]
|
||||
public IActionResult AddDefectNum(string WorkOrder, string DefectCode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(WorkOrder) || string.IsNullOrEmpty(DefectCode))
|
||||
{
|
||||
throw new CustomException("WorkOrder为空||DefectCode为空");
|
||||
}
|
||||
var response = qcFinishedproductDefectService.AddDefectNum(WorkOrder, DefectCode);
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
|
||||
//TODO 修改缺陷数
|
||||
[HttpGet("update_defect_num")]
|
||||
public IActionResult UpdateDefectNum(string WorkOrder, string DefectCode, int num)
|
||||
{
|
||||
if (string.IsNullOrEmpty(WorkOrder) || string.IsNullOrEmpty(DefectCode))
|
||||
{
|
||||
throw new CustomException("WorkOrder为空||DefectCode为空");
|
||||
}
|
||||
var response = qcFinishedproductDefectService.UpdateDefectNum(WorkOrder, DefectCode, num);
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
|
||||
//TODO 查询指定工单下的缺陷
|
||||
[HttpGet("search_defects")]
|
||||
public IActionResult SearchDefectList(string WorkOrder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(WorkOrder) )
|
||||
{
|
||||
throw new CustomException("WorkOrder为空");
|
||||
}
|
||||
var response = qcFinishedproductDefectService.SearchDefectList(WorkOrder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user