From 25f8eb843fd2046d8b94b410185e4ecdd3c07f57 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期日, 04 八月 2024 18:44:28 +0800 Subject: [PATCH] 工单工艺路线编辑 --- Tiger.Api/Controllers/MES/MESController.Route.cs | 63 +++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/Tiger.Api/Controllers/MES/MESController.Route.cs b/Tiger.Api/Controllers/MES/MESController.Route.cs index 55edb33..f1030aa 100644 --- a/Tiger.Api/Controllers/MES/MESController.Route.cs +++ b/Tiger.Api/Controllers/MES/MESController.Route.cs @@ -160,6 +160,69 @@ } /// <summary> + /// 淇濆瓨宸ュ崟宸ヨ壓鑺傜偣宀椾綅璧勬簮 + /// </summary> + /// <param name="action"></param> + /// <returns></returns> + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> SaveWoRouteNodePost([FromBody] ApiAction<List<MES_WO_NODE_POST>> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IRoute>().SaveWoRouteNodePost(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> SaveWoRouteData([FromBody] ApiAction<WoRouteData> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IRoute>().SaveWoRouteData(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> GetWoRouteData([FromBody] ApiAction action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IRoute>().GetWoRouteData(action.Data?.ToString())); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } + + /// <summary> /// 鍒犻櫎宸ュ崟缁戝畾鐨勫伐鑹鸿矾绾� /// </summary> /// <param name="action"></param> -- Gitblit v1.9.3