From eb0ad83719de660e5c4f7676aea4710625b6bd51 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期四, 19 十二月 2024 21:55:43 +0800 Subject: [PATCH] WMS增加标准上下架功能事务 --- Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs | 141 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 141 insertions(+), 0 deletions(-) diff --git a/Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs b/Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs index 45acf6e..cb8cdb5 100644 --- a/Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs +++ b/Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs @@ -7,6 +7,8 @@ using Tiger.Model.Entitys.MES.BizMesWo; using Tiger.Model.Entitys.MES.BizMesWoBatch; using Tiger.Api.iBiz; +using Newtonsoft.Json; +using Tiger.Model.Entitys.MES.Position; namespace Tiger.Api.Controllers.MES { @@ -119,6 +121,27 @@ } /// <summary> + /// 浠庡伐鍗曚腑瑙g粦姝e湪鐢熶骇鐨勬潯鐮� + /// </summary> + /// <param name="action"></param> + /// <returns></returns> + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> UnbindWipSnFromWO([FromBody] ApiAction<UnbindWipSnInput> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().UnbindWipSnFromWO(action.Data)); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } + + /// <summary> /// 鏇存柊宸ュ崟妯℃澘鍙橀噺 /// </summary> /// <param name="action"></param> @@ -160,6 +183,64 @@ return Ok(response); } + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> SavePrintLabelInAct([FromBody] ApiAction action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().SavePrintLabelInAct(action.Data?.ToString())); + } + 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> GetRePrintInfo([FromBody] ApiAction<RePrintInput> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().GetRePrintInfo(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> GetShipList([FromBody] ApiAction<ShippingInput> action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().GetShipList(action.Data)); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } + /// <summary> /// 鑾峰彇宸ュ崟鎵规鐨勬暟閲忔眹鎬� /// </summary> @@ -182,5 +263,65 @@ } return Ok(response); } + + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> GetWoNodeBatchCount([FromBody] ApiAction<GetWoNodeBatchCountInput> action) + { + ApiAction response = new(); + try + { + SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { BATCH = action.Data.BatchNo, NodeIdOrName=action.Data.NodeName }); + var dt = Biz.Db.Ado.UseStoredProcedure().GetDataTable("SP_MES_GET_NODE_BATCH_COUNT", pars); + response.Data = dt; + } + 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> GetErpProdInBth([FromBody] ApiAction action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().GetErpProdInBth(action.Data?.ToString())); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } + + /// <summary> + /// 鎻愪氦鍓嶆鏌ユ槸鍚﹀矖浣嶃�佸伐鍗曞拰涓嶈壇浠g爜 + /// </summary> + /// <param name="action"></param> + /// <returns></returns> + [HttpPost] + [Route("api/[controller]/[action]")] + public async Task<IActionResult> CheckCode([FromBody] ApiAction action) + { + ApiAction response = new(); + try + { + response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().CheckCode(action.Data?.ToString())); + } + catch (System.Exception ex) + { + response = response.GetResponse().CatchExceptionWithLog(ex); + } + return Ok(response); + } } } -- Gitblit v1.9.3