| | |
| | | /// <param name="rotId"></param> |
| | | /// <param name="wo"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [HttpPost] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> SP_MES_PROD2WO(string? rotId, string? wo) |
| | | public async Task<IActionResult> ProdRouteToWo([FromBody] ApiAction<WoRotInput> action) |
| | | { |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { ROT_ID = rotId, WO = wo, ERR_CODE = 0, ERR_MSG = "" }); |
| | | pars[2].Direction = System.Data.ParameterDirection.Output; |
| | | pars[3].Direction = System.Data.ParameterDirection.Output; |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_PROD2WO", pars); |
| | | response.Data = pars[2].Value; |
| | | response.IsSuccessed = pars[2].Value.ToInt32() == 0 ? true : false; |
| | | response.LocaleMsg = new(pars[3].Value.ToString()); |
| | | response = response.GetResponse(await DI.Resolve<IRoute>().ProdRouteToWo(action.Data)); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |