46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using DOAN.Admin.WebApi.Filters;
|
||
using DOAN.Model.MES.api.Dto;
|
||
using DOAN.Model.MES.base_;
|
||
using DOAN.Model.MES.base_.Dto;
|
||
using DOAN.Model.MES.mm;
|
||
using DOAN.Model.Mobile.Dto;
|
||
using DOAN.Service.MES.base_.IService;
|
||
using DOAN.Service.Mobile.IService;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
|
||
//创建时间:2024-07-09
|
||
namespace DOAN.Admin.WebApi.Controllers
|
||
{
|
||
/// <summary>
|
||
/// WMS集成接口
|
||
/// </summary>
|
||
[Verify]
|
||
[Route("mes/api_client/Integrations")]
|
||
public class IntegrationsController : BaseController
|
||
{
|
||
private readonly IPreparationTaskService _preparationTask;
|
||
public IntegrationsController(IPreparationTaskService preparationTask)
|
||
{
|
||
_preparationTask = preparationTask;
|
||
}
|
||
|
||
/// <summary>
|
||
/// WMS的PDA 提交备料信息
|
||
/// </summary>
|
||
/// <param name="parm"></param>
|
||
/// <returns></returns>
|
||
[HttpPost("putMaterialPreparation")]
|
||
[AllowAnonymous]
|
||
public IActionResult PutMaterialPreparation([FromBody] IngredientTaskRequestForm2 parm)
|
||
{
|
||
if (parm == null || string.IsNullOrEmpty(parm.lineCode) || parm.Ingredient_task == null || parm.Ingredient_task.Count() == 0)
|
||
{
|
||
return SUCCESS(null);
|
||
}
|
||
var response = _preparationTask.GenerateIngredientTaskByline(parm);
|
||
|
||
return SUCCESS(response);
|
||
}
|
||
}
|
||
}
|