| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Rhea.Common; |
| | | using SqlSugar; |
| | | using System.Threading.Tasks; |
| | | using Tiger.IBusiness; |
| | | using Tiger.Model; |
| | | using Tiger.Model.Entitys.MES.BizMesWo; |
| | | using Tiger.Model.Entitys.MES.BizMesWoBatch; |
| | | using Tiger.Api.iBiz; |
| | | |
| | | namespace Tiger.Api.Controllers.MES |
| | | { |
| | |
| | | } |
| | | return Ok(response); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取工单批次的数量汇总 |
| | | /// </summary> |
| | | /// <param name="batch"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("api/[controller]/[action]")] |
| | | public async Task<IActionResult> GetWoBatchCount(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()); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | response = response.GetResponse().CatchExceptionWithLog(ex); |
| | | } |
| | | return Ok(response); |
| | | } |
| | | } |
| | | } |