|
|
@ -29,13 +29,13 @@ public class ToAgvDevice { |
|
|
|
DeviceAppService deviceAppService; |
|
|
|
public void run() throws Exception { |
|
|
|
JSONArray agv_rows = new JSONArray(); |
|
|
|
JSONObject row = new JSONObject(); |
|
|
|
|
|
|
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver; |
|
|
|
try { |
|
|
|
List<Device> deviceList = deviceAppService.findDeviceByType(DeviceType.agv); |
|
|
|
for(Device device:deviceList) { |
|
|
|
if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) { |
|
|
|
JSONObject row = new JSONObject(); |
|
|
|
agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver(); |
|
|
|
row.put("device_code", String.valueOf(device.getDevice_code())); |
|
|
|
row.put("energyLevel", String.valueOf(agvNdcOneDeviceDriver.getElectric_qty())); |
|
|
|