| | |
| | | |
| | | |
| | | //读åç³è¯·ï¼ç»agvä¸åä»»å¡ |
| | | public WebResponseContent GetAGVTaskdistribution(string TargetAddress) |
| | | public WebResponseContent GetAGVTaskdistribution(string TargetAddress,string Number) |
| | | { |
| | | |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | { |
| | | throw new InvalidOperationException("WMS IP æªé
ç½®"); |
| | | } |
| | | var wmsIpAddress = wmsBase + completeTask; |
| | | var taskDto = new RequestTaskDto() |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1000"); |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)device; |
| | | DeviceProDTO? deviceProDTOt = conveyorLine.DeviceProDTOs.Find(x => x.DeviceChildCode == TargetAddress && x.DeviceProParamName == "ConveyorLineSingal"); |
| | | if (conveyorLine.Communicator.Read<short>(deviceProDTOt.DeviceProAddress) == 1) |
| | | { |
| | | RequestType = "999", |
| | | Position = TargetAddress, |
| | | }; |
| | | |
| | | |
| | | var result = HttpHelper.PostAsync(wmsIpAddress, taskDto.ToJsonString()).Result; |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | var wmsIpAddress = wmsBase + completeTask; |
| | | var taskDto = new RequestTaskDto() |
| | | { |
| | | RequestType = "999", |
| | | Position = TargetAddress, |
| | | }; |
| | | |
| | | |
| | | var result = HttpHelper.PostAsync(wmsIpAddress, taskDto.ToJsonString()).Result; |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | if (content.Status) |
| | | { |
| | | List<Dt_Task> tasks = BaseDal.QueryData(x => x.axle_czh == Number); |
| | | if (tasks.Count > 0) |
| | | { |
| | | foreach (var task in tasks) |
| | | { |
| | | task.Towhereabouts = TargetAddress; |
| | | } |
| | | BaseDal.UpdateData(tasks); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | content.Error(); |
| | | } |
| | | |
| | | return content; |
| | | } |
| | | catch (Exception ex) |