using Microsoft.AspNetCore.Mvc;
|
using Rhea.Common;
|
using System.Collections.Generic;
|
using System.Threading.Tasks;
|
using Tiger.IBusiness;
|
using Tiger.Model;
|
|
namespace Tiger.Api.Controllers.MES
|
{
|
public partial class SMTController: ControllerBase
|
{
|
/// <summary>
|
/// 获取未上料列表
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetNotLoadingMaterial([FromBody] ApiAction<SmtLoadingInput> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<ISmtTool>().GetNotLoadingMaterial(action.Data));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
/// <summary>
|
/// 导入工单料站表
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> ValidateTableImport([FromBody]List<smtWoTableIn> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<ISmtTool>().ValidateTableImport(action));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
/// <summary>
|
/// 保存导入工单料站表
|
/// </summary>
|
/// <param name="action"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> SaveValidateTableImport([FromBody] List<smtWoTableIn> action)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(await DI.Resolve<ISmtTool>().SaveValidateTableImport(action));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
}
|
}
|