服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-09-01 baad883a45b5434117a7769354701c6aa607a5a9
Tiger.Api/Controllers/MES/SMTController.Tool.cs
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Rhea.Common;
using System.Collections.Generic;
using System.Threading.Tasks;
using Tiger.IBusiness;
using Tiger.Model;
@@ -28,5 +29,45 @@
            }
            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);
        }
    }
}