| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åç©¿æ¢è½¦çµé |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("GetShuttleCarInfos")] |
| | | public WebResponseContent GetShuttleCarInfos() |
| | | { |
| | | WebResponseContent webResponseContent = new WebResponseContent(); |
| | | int ElectricQuantity1 = 0; |
| | | int ElectricQuantity2 = 0; |
| | | try |
| | | { |
| | | var Device = _cacheService.Get(typeof(ShuttleCarTaskCommandR), "RGV01"); |
| | | if (Device != null) |
| | | { |
| | | ShuttleCarTaskCommandR? shuttleCar = Device as ShuttleCarTaskCommandR; |
| | | if (shuttleCar != null) ElectricQuantity1 = shuttleCar.ElectricQuantity; |
| | | } |
| | | Device = _cacheService.Get(typeof(ShuttleCarTaskCommandR), "RGV02"); |
| | | if (Device != null) |
| | | { |
| | | ShuttleCarTaskCommandR? shuttleCar = Device as ShuttleCarTaskCommandR; |
| | | if (shuttleCar != null) ElectricQuantity2 = shuttleCar.ElectricQuantity; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | webResponseContent.Error(ex.Message); |
| | | } |
| | | return webResponseContent.OK(data: new |
| | | { |
| | | ElectricQuantity1, |
| | | ElectricQuantity2 |
| | | }); |
| | | } |
| | | /// <summary> |
| | | /// è·å设å¤ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | DeviceInfo deviceInfo = new DeviceInfo() |
| | | { |
| | | DeviceName = item.DeviceName, |
| | | DeviceName = childDeviceCode, |
| | | Deviceinfo = Device |
| | | }; |
| | | devices.Add(deviceInfo); |