| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Rhea.Common; |
| | | using SqlSugar; |
| | | using System.Collections.Generic; |
| | | using System.Threading.Tasks; |
| | | using System.Xml.Linq; |
| | | using Tiger.Api.iBiz; |
| | | using Tiger.IBusiness; |
| | | using Tiger.Model; |
| | | |
| | |
| | | } |
| | | return Ok(response); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取工艺路线树形结构 |
| | | /// </summary> |
| | | /// <param name="param"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> GetRoutePTreeAsync(string param) { |
| | | var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<V_MES_ROUTE_PTREE>("SP_MES_GET_ROUTE_PTREE", new SugarParameter("@PROD_CODE", param));//返回List |
| | | return Ok(data); |
| | | } |
| | | |
| | | [HttpGet] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> RouteToProd(string rotId, string prodCode) |
| | | { |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { ROT_ID = rotId, PROD_CODE = prodCode }); |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_ROUTE2PROD", pars); ; |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | response = response.GetResponse().CatchExceptionWithLog(ex); |
| | | } |
| | | return Ok(response); |
| | | } |
| | | } |
| | | } |