| | |
| | | using System.Dynamic; |
| | | using AngleSharp.Text; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Dto.webApi; |
| | | using MES.Service.Modes; |
| | | using MES.Service.service; |
| | | using MES.Service.service.Warehouse; |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询栈板码状态 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetStackCodeState")] |
| | | public ResponseResult GetStackCodeState(StackCodeStateDto request) |
| | | { |
| | | var entity = new MessageCenter(); |
| | | entity.TableName = TableName; |
| | | entity.Url = URL + "GetStackCodeState"; |
| | | entity.Method = METHOD; |
| | | entity.Data = JsonConvert.SerializeObject(request); |
| | | entity.Status = 1; |
| | | entity.CreateBy = "PL017"; |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var state = m.GetStackCodeState(request.StackCode); |
| | | resultInfos.state = state; |
| | | |
| | | entity.Result = 1; |
| | | entity.DealWith = 1; |
| | | _manager.save(entity); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = state, |
| | | message = state == 1 ? "该栈板码已入库,不允许解绑" : "允许解绑", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | entity.Result = 0; |
| | | entity.DealWith = 0; |
| | | entity.ResultData = ex.Message; |
| | | _manager.save(entity); |
| | | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |