主体工程完成
This commit is contained in:
@@ -10,7 +10,7 @@ using SqlSugar;
|
||||
using System.Text.Json;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.mes.pro;
|
||||
|
||||
using ZR.Model.MES.pro;
|
||||
using ZR.Service.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
@@ -155,6 +155,63 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增生产工单
|
||||
/// </summary>
|
||||
/// <param name="proWorkplan">生产工单对象</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("addworkorder")]
|
||||
public IActionResult AddWorkOrder([FromBody] ProWorkorder_v2 proWorkorder)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkorder != null)
|
||||
{
|
||||
proWorkorder.ToCreate(HttpContext);
|
||||
data = proWorkorderService.AddWorkOrder(proWorkorder);
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除生产工单
|
||||
/// </summary>
|
||||
/// <param name="id">工单ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("deleteitem/{id}")]
|
||||
public IActionResult DeleteItem(string id)
|
||||
{
|
||||
int data = 0;
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
data = proWorkorderService.DeleteWorkOrder(id);
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新生产计划
|
||||
/// </summary>
|
||||
/// <param name="proWorkplan">生产计划对象</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updateworkorder")]
|
||||
public IActionResult UpdateWorkOrder([FromBody] ProWorkorder_v2 proWorkorder)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkorder != null)
|
||||
{
|
||||
proWorkorder.ToUpdate(HttpContext);
|
||||
data = proWorkorderService.UpdateWorkOrder(proWorkorder);
|
||||
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -212,19 +212,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
{
|
||||
return ToResponse(ResultCode.GLOBAL_ERROR,"模板内容错误,请仔细检测格式,并联系管理员"+ex.Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return SUCCESS(null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user