|
|
|
@ -116,7 +116,7 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
|
|
|
|
|
List<TankShellEnergyConsumption> tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.getTankShellYesterdayEnergies(in_id);
|
|
|
|
|
|
|
|
|
|
result[0] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getProduction():"0";
|
|
|
|
|
result[1] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getEnergy():"0";
|
|
|
|
|
result[1] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getHourenergy():"0";
|
|
|
|
|
result[2] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getProduction():"0";
|
|
|
|
|
result[3] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getEnergy():"0";
|
|
|
|
|
|
|
|
|
@ -208,14 +208,16 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
|
|
|
|
|
|
|
|
|
|
for (int i = 0;i< tankShellEnergyConsumptions.size();i++){
|
|
|
|
|
productionArray[i] = tankShellEnergyConsumptions.get(i).getProduction();
|
|
|
|
|
energyArray[i] = tankShellEnergyConsumptions.get(i).getEnergy();
|
|
|
|
|
energyArray[i] = tankShellEnergyConsumptions.get(i).getHourenergy();
|
|
|
|
|
xValueArray[i] = dateFormat.format(tankShellEnergyConsumptions.get(i).getCreateTime());
|
|
|
|
|
}
|
|
|
|
|
jsonObject.put("productionArray",productionArray);
|
|
|
|
|
jsonObject.put("energyArray",energyArray);
|
|
|
|
|
jsonObject.put("xValueArray",xValueArray);
|
|
|
|
|
}
|
|
|
|
|
return JSONArray.toJSONString(jsonObject);
|
|
|
|
|
String s = JSONArray.toJSONString(jsonObject);
|
|
|
|
|
System.out.println("能耗产量数据:"+s);
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|