| | |
| | | /// </summary> |
| | | /// <param name="batch"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [HttpPost] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> GetWoBatchCount(ApiAction action) |
| | | public async Task<IActionResult> GetWoBatchCount([FromBody] ApiAction action) |
| | | { |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { BATCH = action.Data?.ToString(), 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_GET_WO_BATCH_COUNT", pars); |
| | | response.Data = pars[1].Value; |
| | | response.IsSuccessed = pars[1].Value.ToInt32() == 0 ? true : false; |
| | | response.LocaleMsg = new(pars[2].Value.ToString()); |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { BATCH = action.Data?.ToString()}); |
| | | var dt = Biz.Db.Ado.UseStoredProcedure().GetDataTable("SP_MES_GET_WO_BATCH_COUNT", pars); |
| | | response.Data = dt; |
| | | } |
| | | catch (System.Exception ex) |
| | | { |