| | |
| | | }; |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize()); |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | if (fOURBOTReturn.returnCode != 0 && fOURBOTReturn.returnUserMsg != $"ç«ç¹å·²è¢«å ç¨,(podID={iQC.ContainerCode})") |
| | | if (fOURBOTReturn.returnCode != 0 /*&& fOURBOTReturn.returnUserMsg != $"ç«ç¹å·²è¢«å ç¨,(podID={iQC.ContainerCode})"*/) |
| | | throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | #endregion |
| | | |
| | | #region å建ååè½¦ä»»å¡ |
| | | var task = BaseDal.QueryFirst(x => x.PalletCode == iQC.ContainerCode && x.SourceAddress == iQC.StationCode && x.TaskState == (int)TaskStatusEnum.New); |
| | | //var task = BaseDal.QueryFirst(x => x.PalletCode == iQC.ContainerCode && x.SourceAddress == iQC.StationCode && x.TaskState == (int)TaskStatusEnum.New); |
| | | #endregion |
| | | #region å¼å«åå车 |
| | | apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(FOURBOTnewMovePodTask)) ?? throw new Exception("æªæ¾å°åå车任å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | FOURBOTnewMovePodTask fOURBOTnewMovePodTask = new() |
| | | { |
| | | priority = task.Grade, |
| | | podID = task.PalletCode, |
| | | //desNodeID = task.SourceAddress, |
| | | desExt = new |
| | | { |
| | | unload = 0//æ¯å¦æ¾ä¸å®¹å¨,0å¦1æ¯ |
| | | }, |
| | | desStationCodes = task.SourceAddress, |
| | | desType = 5 |
| | | }; |
| | | response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize()); |
| | | fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | content.Data = fOURBOTReturn; |
| | | if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | task.TaskState = (int)TaskStatusEnum.Execut; |
| | | BaseDal.UpdateData(task); |
| | | //apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(FOURBOTnewMovePodTask)) ?? throw new Exception("æªæ¾å°åå车任å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | //FOURBOTnewMovePodTask fOURBOTnewMovePodTask = new() |
| | | //{ |
| | | // priority = task.Grade, |
| | | // podID = task.PalletCode, |
| | | // //desNodeID = task.SourceAddress, |
| | | // desExt = new |
| | | // { |
| | | // unload = 0//æ¯å¦æ¾ä¸å®¹å¨,0å¦1æ¯ |
| | | // }, |
| | | // desStationCodes = task.SourceAddress, |
| | | // desType = 5 |
| | | //}; |
| | | //response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize()); |
| | | //fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | //content.Data = fOURBOTReturn; |
| | | //if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | //task.TaskState = (int)TaskStatusEnum.Execut; |
| | | //BaseDal.UpdateData(task); |
| | | #endregion |
| | | return WebResponseContent.Instance.OK(); |
| | | } |