添加不良品相关操作逻辑
This commit is contained in:
@@ -240,6 +240,33 @@ namespace DOAN.Admin.WebApi.Controllers.BZFM
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据工单号填写不良品单
|
||||
/// </summary>
|
||||
/// <param name="parm">不良品单数据</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("defectOrder/byWorkorder")]
|
||||
[ActionPermissionFilter(Permission = "qcscraprecords:add")]
|
||||
[Log(Title = "根据工单号创建不良品单", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult CreateDefectOrderByWorkorder([FromBody] QcScrapRecordsDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(parm.Workorder))
|
||||
{
|
||||
return ToResponse(StatusCodes.Status400BadRequest, "工单号不能为空");
|
||||
}
|
||||
|
||||
var modal = parm.Adapt<QcScrapRecords>().ToCreate(HttpContext);
|
||||
var response = _QcScrapRecordsService.CreateDefectOrderByWorkorder(modal);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(StatusCodes.Status500InternalServerError, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据不良品记录ID撤销不良品记录
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user