| | |
| | | public async Task<IActionResult> GetWoPTreeAsync(string wo) |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { WO = wo }); |
| | | var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<V_MES_ROUTE_PTREE>("SP_MES_GET_WO_PTREE", pars);//返回List |
| | | var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<V_MES_WO_PTREE>("SP_MES_GET_WO_PTREE", pars);//返回List |
| | | return Ok(data); |
| | | } |
| | | |
| | |
| | | } |
| | | return Ok(response); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加工单的客户的工艺路线 |
| | | /// </summary> |
| | | /// <param name="wo"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> SP_MES_WO2CUST(string wo) |
| | | { |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { WO = wo, ERR_CODE = 0, ERR_MSG = "" }); |
| | | pars[1].Direction = System.Data.ParameterDirection.Output; |
| | | pars[2].Direction = System.Data.ParameterDirection.Output; |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_WO2CUST", pars); |
| | | response.Data = pars[1].Value; |
| | | response.IsSuccessed = pars[1].Value.ToInt32() == 0 ? true : false; |
| | | response.LocaleMsg = new(pars[2].Value.ToString()); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | response = response.GetResponse().CatchExceptionWithLog(ex); |
| | | } |
| | | return Ok(response); |
| | | } |
| | | } |
| | | } |