diff --git a/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellEnergyConsumption.java b/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellEnergyConsumption.java index 33d2230..66fa4b3 100644 --- a/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellEnergyConsumption.java +++ b/productionboard/src/main/java/com/productionboard/entity/TankShellDevice/TankShellEnergyConsumption.java @@ -24,7 +24,7 @@ public class TankShellEnergyConsumption implements Serializable { private String production; @TableField("hourenergy") - private String energy; + private String hourenergy; @TableField(exist = false) private String xValue; diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java index c50a4f6..e81b87b 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java @@ -20,7 +20,7 @@ public interface TankShellEnergyConsumptionMapper extends BaseMapper getTankShellEnergyConsumptions(@Param("in_id") Integer in_id); /** @@ -28,6 +28,6 @@ public interface TankShellEnergyConsumptionMapper extends BaseMapper getTankShellYesterdayEnergies(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java index d6216a8..c213e89 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java @@ -116,7 +116,7 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi List 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 diff --git a/productionboard/src/main/resources/static/js/common/echarts.common.js b/productionboard/src/main/resources/static/js/common/echarts.common.js index b214ccc..2794652 100644 --- a/productionboard/src/main/resources/static/js/common/echarts.common.js +++ b/productionboard/src/main/resources/static/js/common/echarts.common.js @@ -2293,8 +2293,15 @@ const energyConsumption = (res, ids) => { } }, lineStyle: { - color: '#45b685' + color: '#0066FF' }, + /*label: { + show: true, + position: "buttom", + textStyle: { + color: "#0066FF", + }, + },*/ data: yAxisDataTwo, }, { diff --git a/productionboard/target/classes/application.yml b/productionboard/target/classes/application.yml index 142f6dd..bea2bcb 100644 --- a/productionboard/target/classes/application.yml +++ b/productionboard/target/classes/application.yml @@ -12,6 +12,6 @@ mybatis-plus: mapper-locations: classpath*:/mapper/**Mapper.xml server: - port: 6070 + port: 6069 -in_id: 2 \ No newline at end of file +in_id: 1 \ No newline at end of file diff --git a/productionboard/target/classes/com/productionboard/mapper/TankShellEnergyConsumptionMapper.class b/productionboard/target/classes/com/productionboard/mapper/TankShellEnergyConsumptionMapper.class index 8807354..8ee998a 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/TankShellEnergyConsumptionMapper.class and b/productionboard/target/classes/com/productionboard/mapper/TankShellEnergyConsumptionMapper.class differ diff --git a/productionboard/target/classes/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.class b/productionboard/target/classes/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.class index e129e63..99a4f72 100644 Binary files a/productionboard/target/classes/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.class and b/productionboard/target/classes/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.class differ diff --git a/productionboard/target/classes/static/js/aluminumLiner/index.js b/productionboard/target/classes/static/js/aluminumLiner/index.js index db8295f..7dac822 100644 --- a/productionboard/target/classes/static/js/aluminumLiner/index.js +++ b/productionboard/target/classes/static/js/aluminumLiner/index.js @@ -7,8 +7,8 @@ $(() => { if (result.length > 0) { if(result[0].deviceEnergy > 0){ statusArray[0] = result[0].deviceStatus == "正常" ? "1" : "0"; - statusArray[1] = test(result[0].devicePower,1000); - statusArray[2] = test(result[0].deviceEnergy,100); + statusArray[1] = result[0].devicePower; + statusArray[2] = result[0].deviceEnergy; statusArray[3] = result[0].count; dataInformationFunction(statusArray); }