| | |
| | | errorMsg += $"æç®±{item.TaskDescribe.ContainerCode}ä¸åå¨;"; |
| | | content.FailData.Add(new BinCodeObj() { Bincode = item.TaskDescribe.ContainerCode }); |
| | | continue; |
| | | }; |
| | | } |
| | | Dt_LocationInfo? noOutLocation = locationInfos.FirstOrDefault(x => (x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() || x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) && x.PalletCode == item.TaskDescribe.ContainerCode); |
| | | if (noOutLocation != null) |
| | | { |
| | |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent WmsRecovery() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | // å é¤ç¬¬ä¸ä¸ªå¼å¸¸ |
| | | // æå建æ¶é´ååºè·åç¬¬ä¸æ¡è®°å½ |
| | | var orderBy = new Dictionary<string, OrderByType> |
| | | { |
| | | { "CreateDate", OrderByType.Asc } |
| | | }; |
| | | Dt_ErrorInfo errorInfo = _errorInfoRepository.QueryFirst(x => true, orderBy); |
| | | if (errorInfo == null) |
| | | { |
| | | return content.Error("å½å没æå¼å¸¸ä»»å¡"); |
| | | } |
| | | // è·å第ä¸ä¸ªå¼å¸¸ï¼æå建æ¶é´æåºï¼ |
| | | _unitOfWorkManage.BeginTran(); |
| | | _errorInfoRepository.DeleteData(errorInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | // 䏿¥æ¢å¤ |
| | | string? apiErrorBack = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMSErrorBack.ToString())?.ApiAddress; |
| | | if (string.IsNullOrEmpty(apiErrorBack)) throw new Exception($"æªæ¾å°WMSæ
é䏿¥,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | TaskError taskError = new TaskError() |
| | | { |
| | | MsgID = errorInfo.Id, |
| | | StationCode = errorInfo.StationCode, |
| | | MsgCode = 0, |
| | | Msg = "æ¢å¤" |
| | | }; |
| | | string reqErrorBack = JsonConvert.SerializeObject(taskError, settings); |
| | | HttpHelper.Post(apiErrorBack, reqErrorBack); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(ex.Message); |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |