1
This commit is contained in:
@@ -33,7 +33,7 @@ public class ReportFlowController : BaseController
|
|||||||
var response = _reportFlowService.GetWorkOrderDetail(workOrder);
|
var response = _reportFlowService.GetWorkOrderDetail(workOrder);
|
||||||
if (response == null)
|
if (response == null)
|
||||||
{
|
{
|
||||||
return ToResponse(ResultCode.NO_DATA, "工单不存在");
|
return ToResponse(ResultCode.SUCCESS, "工单不存在");
|
||||||
}
|
}
|
||||||
return SUCCESS(response);
|
return SUCCESS(response);
|
||||||
}
|
}
|
||||||
@@ -50,9 +50,9 @@ public class ReportFlowController : BaseController
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(workorder))
|
if (string.IsNullOrEmpty(workorder))
|
||||||
{
|
{
|
||||||
throw new CustomException("workorder or process is null");
|
throw new CustomException("workorder is null");
|
||||||
}
|
}
|
||||||
return SUCCESS(_reportFlowService.GetProcessReportWorkDetail(workorder, processId));
|
return ToResponse(ResultCode.SUCCESS,_reportFlowService.GetProcessReportWorkDetail(workorder, processId));
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO 工序报工
|
//TODO 工序报工
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ namespace Infrastructure.Controllers
|
|||||||
{
|
{
|
||||||
return ToResponse(new ApiResult((int)resultCode, msg));
|
return ToResponse(new ApiResult((int)resultCode, msg));
|
||||||
}
|
}
|
||||||
|
protected IActionResult ToResponse(ResultCode resultCode, Object data)
|
||||||
|
{
|
||||||
|
return ToResponse(new ApiResult((int)resultCode, data));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导出Excel
|
/// 导出Excel
|
||||||
|
|||||||
@@ -53,6 +53,15 @@ namespace Infrastructure.Model
|
|||||||
Add(DATA_TAG, data);
|
Add(DATA_TAG, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public ApiResult(int code, object data)
|
||||||
|
{
|
||||||
|
Add(CODE_TAG, code);
|
||||||
|
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
|
Add(DATA_TAG, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 返回成功消息
|
/// 返回成功消息
|
||||||
|
|||||||
Reference in New Issue
Block a user