生产队列
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Aliyun.OSS;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using MiniExcelLibs;
|
||||
using SqlSugar;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
|
||||
using ZR.Model.DTO.MES.pro;
|
||||
using ZR.Model.MES.andon;
|
||||
using ZR.Model.MES.pro;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
@@ -11,6 +13,7 @@ using ZR.Service.mes.pro.IService;
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
{
|
||||
[Route("mes/pro/workorder_v2")]
|
||||
[AllowAnonymous]
|
||||
public class ProWorkorderV2Controller : BaseController
|
||||
{
|
||||
|
||||
@@ -239,28 +242,28 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
/// <param name="proWorkplan">生产计划对象</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updateworkorder")]
|
||||
public IActionResult UpdateWorkOrder([FromBody] ProWorkorder_v2 proWorkorder)
|
||||
public IActionResult UpdateWorkOrder([FromBody] ProWorkorderV2Dto parm)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkorder != null)
|
||||
if (parm != null)
|
||||
{
|
||||
proWorkorder.PQqualifiedRate = 0;
|
||||
if (!string.IsNullOrEmpty(proWorkorder.PQqualifiedRate2))
|
||||
var modal = parm.Adapt<ProWorkorder_v2>().ToUpdate(HttpContext);
|
||||
modal.PQqualifiedRate = 0;
|
||||
if (!string.IsNullOrEmpty(parm.PQqualifiedRate))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
proWorkorder.PQqualifiedRate = decimal.Parse(proWorkorder.PQqualifiedRate2.Trim());
|
||||
modal.PQqualifiedRate = decimal.Parse(parm.PQqualifiedRate.Trim());
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
proWorkorder.PQqualifiedRate = 0;
|
||||
modal.PQqualifiedRate = 0;
|
||||
}
|
||||
|
||||
}
|
||||
proWorkorder.ToUpdate(HttpContext);
|
||||
data = proWorkorderService.UpdateWorkOrder(proWorkorder);
|
||||
data = proWorkorderService.UpdateWorkOrder(modal);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user