pangshenghao 1 year ago
parent
commit
d56eb60dfc
  1. 2
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java

2
acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java

@ -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()));

Loading…
Cancel
Save