质检看板反馈优化

This commit is contained in:
2024-07-12 15:57:37 +08:00
parent 5ca9d57566
commit 9e85bc8d4a
2 changed files with 16 additions and 8 deletions

View File

@@ -87,16 +87,24 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
[HttpGet("getWorkOrderBoardData")] [HttpGet("getWorkOrderBoardData")]
public IActionResult GetWorkOrderBoardData(string workOrderId) public IActionResult GetWorkOrderBoardData(string workOrderId)
{ {
if (string.IsNullOrEmpty(workOrderId)) try
{ {
return ToResponse(new ApiResult(500, "工单号传入异常!", "工单号传入异常!")); if (string.IsNullOrEmpty(workOrderId))
{
return ToResponse(new ApiResult(500, "工单号传入异常!", "工单号传入异常!"));
}
var result = _commonFQCService.GetWorkOrderBoardData(workOrderId);
if (result == null)
{
return ToResponse(new ApiResult(500, "获取看板数据异常-01:返回值为空", result));
}
return ToResponse(new ApiResult(200, "ok", result));
} }
var result = _commonFQCService.GetWorkOrderBoardData(workOrderId); catch (Exception ex)
if (result == null)
{ {
return ToResponse(new ApiResult(500, "获取看板数据异常-01:返回值为空", result)); return ToResponse(new ApiResult(500, "获取看板数据异常-02" + ex.Message, ex.Message));
} }
return ToResponse(new ApiResult(200, "ok", result));
} }
/// <summary> /// <summary>
/// 获取质量检测工单,生产线数据列表 /// 获取质量检测工单,生产线数据列表

View File

@@ -285,7 +285,7 @@ namespace ZR.Service.mes.qc
.First(); .First();
if (proWorkOrder == null) if (proWorkOrder == null)
{ {
return null; throw new Exception("未在生产工单中找到该工单!");
} }
// //
QcCommonFqcBoardDto boardData = new QcCommonFqcBoardDto(); QcCommonFqcBoardDto boardData = new QcCommonFqcBoardDto();
@@ -353,7 +353,7 @@ namespace ZR.Service.mes.qc
} }
catch (Exception ex) catch (Exception ex)
{ {
return null; throw new Exception(ex.Message);
} }
} }