| | |
| | | using AutoMapper; |
| | | using SixLabors.ImageSharp.ColorSpaces; |
| | | using SqlSugar; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using WIDESEAWCS_BasicInfoService; |
| | | using WIDESEAWCS_Common; |
| | |
| | | continue; |
| | | //throw new Exception(content.Message); |
| | | } |
| | | if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode) != null) |
| | | if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode && x.TaskType == item.taskType) != null) |
| | | { |
| | | objects.Add(new |
| | | { |
| | |
| | | continue; |
| | | //throw new Exception($"ä»»å¡å·ã{task.taskCode}ãå·²åå¨ä»»å¡"); |
| | | } |
| | | if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode) != null) |
| | | if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode && x.TaskType == item.taskType) != null) |
| | | { |
| | | objects.Add(new |
| | | { |
| | |
| | | continue; |
| | | //throw new Exception($"æçå·ã{task.containerCode}ãå·²åå¨ä»»å¡"); |
| | | } |
| | | if (BaseDal.QueryFirst(x => x.SourceAddress == task.fromLocationCode) != null) |
| | | if (BaseDal.QueryFirst(x => x.SourceAddress == task.fromLocationCode && x.TaskType == item.taskType) != null) |
| | | { |
| | | objects.Add(new |
| | | { |
| | |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°å¯ä¹å£«AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, KLS.Serialize()); |
| | | GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>(); |
| | | content.OK(data: agvContent); |
| | | if (agvContent.success == true && agvContent.code == 0) |
| | | { |
| | | //ç´æ¥ç§»å
¥åå² |
| | |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°åå车AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, cancelSXCTake.Serialize()); |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | content.OK(data: fOURBOTReturn); |
| | | if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "æå") |
| | | { |
| | | //ç´æ¥ç§»å
¥åå² |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 海康 |
| | | if (isHK) |
| | | { |
| | |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°åå车AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, cancelHIKROBOTTask.Serialize()); |
| | | HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>(); |
| | | content.OK(data: hIKROBOTReturn); |
| | | if (hIKROBOTReturn.code == "SUCCESS" && hIKROBOTReturn.message == "æå") |
| | | { |
| | | //ç´æ¥ç§»å
¥åå² |
| | |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°å¯ä¹å£«AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, updateGALAXISTaskGrade.Serialize()); |
| | | GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>(); |
| | | content.OK(data: agvContent); |
| | | if (agvContent.success == true && agvContent.code == 0) |
| | | { |
| | | |
| | |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°æ´æ°åå车任å¡ä¼å
级æ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize()); |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | content.OK(data: fOURBOTReturn); |
| | | if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "æå") |
| | | { |
| | | BaseDal.UpdateData(dt_Task); |
| | |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°åå车AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, Hkrequest.Serialize()); |
| | | HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>(); |
| | | content.OK(data: hIKROBOTReturn); |
| | | if (hIKROBOTReturn.code == "SUCCESS0" && hIKROBOTReturn.message == "æå") |
| | | { |
| | | BaseDal.UpdateData(dt_Task); |
| | |
| | | try |
| | | { |
| | | if (getLocationInfo == null) throw new Exception("请æ±åæ°ä¸è½ä¸ºç©ºï¼"); |
| | | if (getLocationInfo.AreaCode == null) throw new Exception("åºåºç¼å·ä¸è½ä¸ºç©ºï¼"); |
| | | //if (getLocationInfo.AreaCode == null) throw new Exception("åºåºç¼å·ä¸è½ä¸ºç©ºï¼"); |
| | | if (getLocationInfo.WarehouseId == 0) throw new Exception("ä»åºIDä¸è½ä¸ºç©ºï¼"); |
| | | if (getLocationInfo.WarehouseId == 1) |
| | | { |
| | | List<Dt_RGVLocationInfo> rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt()); |
| | | List<Dt_RGVLocationInfo> rGVLocationInfos = new List<Dt_RGVLocationInfo>(); |
| | | if (!string.IsNullOrEmpty(getLocationInfo.AreaCode)) |
| | | rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt()); |
| | | else |
| | | rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(); |
| | | foreach (var item in rGVLocationInfos) |
| | | { |
| | | list.Add(new |
| | |
| | | EnableStatus = item.EnableStatus |
| | | }); |
| | | } |
| | | content.Data = list; |
| | | content.OK(data: list); |
| | | } |
| | | else if (getLocationInfo.WarehouseId == 2) |
| | | { |
| | | |
| | | List<Dt_KLSLocationInfo> rGVLocationInfos = new List<Dt_KLSLocationInfo>(); |
| | | if (!string.IsNullOrEmpty(getLocationInfo.AreaCode)) |
| | | rGVLocationInfos = _kLSLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt()); |
| | | else |
| | | rGVLocationInfos = _kLSLocationInfoService.Repository.QueryData(); |
| | | foreach (var item in rGVLocationInfos) |
| | | { |
| | | list.Add(new |
| | | { |
| | | LoctionCode = item.LocationCode, |
| | | LocationStatus = item.LocationStatus, |
| | | EnableStatus = item.EnableStatus |
| | | }); |
| | | } |
| | | content.OK(data: list); |
| | | } |
| | | else if (getLocationInfo.WarehouseId == 3) |
| | | { |
| | |
| | | }; |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize()); |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | content.OK(data: fOURBOTReturn); |
| | | if (fOURBOTReturn.returnCode != 0 /*&& fOURBOTReturn.returnUserMsg != $"ç«ç¹å·²è¢«å ç¨,(podID={iQC.ContainerCode})"*/) |
| | | throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | #endregion |