提交
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Model.DBModel;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
|
||||
@@ -34,5 +35,63 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增生产计划
|
||||
/// </summary>
|
||||
/// <param name="proWorkplan">生产计划对象</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("addworkplan")]
|
||||
public IActionResult AddWorkPlan([FromBody] ProWorklplan_v2 proWorkplan)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkplan != null)
|
||||
{
|
||||
proWorkplan.ToCreate(HttpContext);
|
||||
data = proWorkplanService.AddWorkPlan(proWorkplan);
|
||||
}
|
||||
|
||||
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 = proWorkplanService.DeleteWorkPlan(id);
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新生产计划
|
||||
/// </summary>
|
||||
/// <param name="proWorkplan">生产计划对象</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updateworkplan")]
|
||||
public IActionResult UpdateWorkPlan([FromBody] ProWorklplan_v2 proWorkplan)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkplan != null)
|
||||
{
|
||||
proWorkplan.ToUpdate(HttpContext);
|
||||
data = proWorkplanService.UpdateWorkPlan(proWorkplan);
|
||||
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user