| | |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode || x.PalletCode == task.containerCode) != null) |
| | | { |
| | | continue; |
| | | throw new Exception($"ä»»å¡å·ã{task.taskCode}ã/æçå·ã{task.containerCode}ãå·²åå¨ä»»å¡"); |
| | | //continue; |
| | | } |
| | | switch (item.taskType) |
| | | { |
| | |
| | | { |
| | | CancelSXCTake cancelSXCTake = new CancelSXCTake |
| | | { |
| | | taskID = dt_Task.RGVTaskId |
| | | taskID = dt_Task.RGVTaskId, |
| | | withoutRunning = 1 |
| | | }; |
| | | Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(CancelSXCTake)); |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°åå车AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | |
| | | { |
| | | //ç´æ¥ç§»å
¥åå² |
| | | BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.èªå¨å®æ); |
| | | return content.OK("忶任塿å", dt_Task); |
| | | return content.OK($"åæ¶ä»»å¡ã{dt_Task.WMSTaskNum}ãæå", dt_Task); |
| | | } |
| | | else |
| | | { |
| | | return content.Error($"ä»»å¡å¤±è´¥{fOURBOTReturn.data}"); |
| | | return content.Error($"ä»»å¡åæ¶å¤±è´¥ã{dt_Task.WMSTaskNum}ã{fOURBOTReturn.returnUserMsg}"); |
| | | } |
| | | } |
| | | #endregion |
| | |
| | | priority = updateTaskPriority.taskPriority |
| | | }; |
| | | Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(UpdateAgvSXCTake)); |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°åå车AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°æ´æ°åå车任å¡ä¼å
级æ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize()); |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "æå") |
| | |
| | | }; |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize()); |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | if (fOURBOTReturn.returnCode != 0 && fOURBOTReturn.returnUserMsg != $"ç«ç¹å·²è¢«å ç¨,(podID={iQC.ContainerCode})") |
| | | throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | #endregion |
| | | |
| | | #region å建ååè½¦ä»»å¡ |
| | |
| | | var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x => fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode)); |
| | | foreach (var item in Agvlocation) |
| | | { |
| | | item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable); |
| | | item.EnableStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable); |
| | | } |
| | | _rGVLocationInfoService.UpdateData(Agvlocation); |
| | | return WebResponseContent.Instance.OK(); |