| | |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using WIDESEAWCS_BasicInfoService; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | |
| | | /// </summary> |
| | | public IRepository<Dt_Task> Repository => BaseDal; |
| | | |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService) : base(BaseDal) |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService, IStationMangerService stationMangerService) : base(BaseDal) |
| | | { |
| | | _routerService = routerService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _hKLocationInfoService = hKLocationInfoService; |
| | | _apiInfoService = apiInfoService; |
| | | _trackloginfoService = trackloginfoService; |
| | | _stationMangerService=stationMangerService; |
| | | } |
| | | public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTasksDTO> taskDTOs) |
| | | { |
| | |
| | | Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(HIKROBOTTaskGrade)); |
| | | if (apiInfo == null) throw new Exception("æªæ¾å°åå车AGVä»»å¡ä¸åæ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize()); |
| | | HIKROBOTReturn hIKROBOTReturn=response.DeserializeObject<HIKROBOTReturn>(); |
| | | if (hIKROBOTReturn.code == "SUCCESS0"&&hIKROBOTReturn.message=="æå") |
| | | HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>(); |
| | | if (hIKROBOTReturn.code == "SUCCESS0" && hIKROBOTReturn.message == "æå") |
| | | { |
| | | BaseDal.UpdateData(dt_Task); |
| | | return content.OK("ä¿®æ¹ä»»å¡ä¼å
级æå", dt_Task); |
| | |
| | | { |
| | | try |
| | | { |
| | | var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x=> fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode)); |
| | | 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.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable); |
| | | } |
| | | _rGVLocationInfoService.UpdateData(Agvlocation); |
| | | return WebResponseContent.Instance.OK(); |