|
@@ -5,6 +5,7 @@ import com.sky.ioc.entity.Indeicator;
|
|
|
import com.sky.ioc.entity.Label;
|
|
|
import com.sky.ioc.entity.Cake;
|
|
|
import com.sky.ioc.service.energy.EnergyService;
|
|
|
+import com.sky.ioc.tool.DateUtil;
|
|
|
import com.sky.ioc.tool.GeneralMethod;
|
|
|
import com.sky.ioc.tool.ReturnMsg;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -53,7 +54,9 @@ public class EnergyServiceImpl implements EnergyService {
|
|
|
@Override
|
|
|
public ReturnMsg getElectricityInfoList() {
|
|
|
String[] param = {"powerConsumption"};
|
|
|
- String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
|
|
|
+ //String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
|
|
|
+ List<String> lists = DateUtil.getBetweenDays("2023/03/01", "2023/03/31");
|
|
|
+ String[] labKey = lists.toArray(new String[0]);
|
|
|
List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
|
return ReturnMsg.ok(labels1);
|
|
|
}
|
|
@@ -61,11 +64,11 @@ public class EnergyServiceImpl implements EnergyService {
|
|
|
@Override
|
|
|
public ReturnMsg getElectricityCircleInfoList() {
|
|
|
List<Cake> list = new ArrayList<>();
|
|
|
- list.add(new Cake("qita"));
|
|
|
- list.add(new Cake("gonggong"));
|
|
|
- list.add(new Cake("xinxi"));
|
|
|
- list.add(new Cake("zhaoming"));
|
|
|
- list.add(new Cake("dongli"));
|
|
|
+ list.add(new Cake("其他"));
|
|
|
+ list.add(new Cake("公共"));
|
|
|
+ list.add(new Cake("信息"));
|
|
|
+ list.add(new Cake("照明"));
|
|
|
+ list.add(new Cake("动力"));
|
|
|
return ReturnMsg.ok(list);
|
|
|
}
|
|
|
|
|
@@ -99,7 +102,9 @@ public class EnergyServiceImpl implements EnergyService {
|
|
|
@Override
|
|
|
public ReturnMsg getWaterInfoList() {
|
|
|
String[] param = {"water"};
|
|
|
- String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
|
|
|
+ /* String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};*/
|
|
|
+ List<String> lists = DateUtil.getBetweenDays("2023/03/01", "2023/03/31");
|
|
|
+ String[] labKey = lists.toArray(new String[0]);
|
|
|
List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
|
return ReturnMsg.ok(labels1);
|
|
|
}
|
|
@@ -107,8 +112,8 @@ public class EnergyServiceImpl implements EnergyService {
|
|
|
@Override
|
|
|
public ReturnMsg getWaterCircleInfoList() {
|
|
|
List<Cake> list = new ArrayList<>();
|
|
|
- list.add(new Cake("tapWater"));
|
|
|
- list.add(new Cake("recycledWater"));
|
|
|
+ list.add(new Cake("自来水"));
|
|
|
+ list.add(new Cake("可循环水"));
|
|
|
return ReturnMsg.ok(list);
|
|
|
}
|
|
|
|
|
@@ -141,7 +146,9 @@ public class EnergyServiceImpl implements EnergyService {
|
|
|
@Override
|
|
|
public ReturnMsg getUseColdInfoList() {
|
|
|
String[] param = {"coolingCapacity","temperature"};
|
|
|
- String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
|
|
|
+ /* String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};*/
|
|
|
+ List<String> lists = DateUtil.getBetweenDays("2023/03/01", "2023/03/31");
|
|
|
+ String[] labKey = lists.toArray(new String[0]);
|
|
|
List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
|
return ReturnMsg.ok(labels1);
|
|
|
}
|
|
@@ -175,7 +182,9 @@ public class EnergyServiceImpl implements EnergyService {
|
|
|
@Override
|
|
|
public ReturnMsg getUseHeatInfoList() {
|
|
|
String[] param = {"heatConsumption","temperature"};
|
|
|
- String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
|
|
|
+ /* String[] labKey = {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};*/
|
|
|
+ List<String> lists = DateUtil.getBetweenDays("2023/03/01", "2023/03/31");
|
|
|
+ String[] labKey = lists.toArray(new String[0]);
|
|
|
List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
|
return ReturnMsg.ok(labels1);
|
|
|
}
|