| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Rhea.Common; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Threading.Tasks; |
| | | using System.Xml.Linq; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存默认工艺路线到产品 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> SetDefaultRoute([FromBody] ApiAction<ProdRotInput> action) |
| | | { |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | response = response.GetResponse(await DI.Resolve<IRoute>().SetDefaultRoute(action.Data)); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | response = response.GetResponse().CatchExceptionWithLog(ex); |
| | | } |
| | | return Ok(response); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存工单工艺节点岗位资源 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | |
| | | [HttpGet] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> GetRoutePTreeAsync(string? prodCode, string? orgCode) { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { PROD_CODE = prodCode,ORG_CODE = orgCode }); |
| | | var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<V_MES_ROUTE_PTREE>("SP_MES_GET_ROUTE_PTREE", pars);//返回List |
| | | var data = await DI.Resolve<IRoute>().GetRoutePTree(prodCode, orgCode); |
| | | return Ok(data); |
| | | } |
| | | |