|
@@ -366,27 +366,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
,Map<String,String> workZonIds){
|
|
|
ResponseRes responseRes = new ResponseRes();
|
|
|
List<Map<String,Object>> list =new ArrayList<>();
|
|
|
- if("water_volume_prediction_jiangjin2".equals(databaseName)){
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", null);
|
|
|
- map.put("date", null);
|
|
|
- map.put("max_temperature", null);
|
|
|
- map.put("min_temperature", null);
|
|
|
- map.put("weather", null);
|
|
|
- map.put("month", null);
|
|
|
- map.put("week", null);
|
|
|
- map.put("holiday", null);
|
|
|
- map.put("last_actual_water_withdrawals", null);
|
|
|
- map.put("last_actual_water_supply", null);
|
|
|
- map.put("actual_water_withdrawals", null);
|
|
|
- map.put("actual_water_supply", null);
|
|
|
- map.put("forecast_water_withdrawals", null);
|
|
|
- map.put("forecast_actual_water_supply", null);
|
|
|
- map.put("is_abnormal", null);
|
|
|
- map.put("is_forecast", null);
|
|
|
- map.put("last_modify_time", null);
|
|
|
- list.add(map);
|
|
|
- }else {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("ID", null);
|
|
|
map.put("Date", null);
|
|
@@ -406,7 +385,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
map.put("isForecast", null);
|
|
|
map.put("LastModifyTime", null);
|
|
|
list.add(map);
|
|
|
- }
|
|
|
responseRes.setResdata(list);
|
|
|
responseRes.setRescode(ResponseCode.RESULT_NORMAL.toStrCode());
|
|
|
responseRes.setResmsg(ResponseCode.RESULT_NORMAL.toStrMsg());
|
|
@@ -538,22 +516,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
, "2222");
|
|
|
ResponseRes responseRes = new ResponseRes();
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
- if("water_volume_prediction_jiangjin2".equals(databaseName)){
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", null);
|
|
|
- map.put("date", null);
|
|
|
- map.put("hour", null);
|
|
|
- map.put("hour_forecast_water_withdrawals", null);
|
|
|
- map.put("hour_forecast_actual_water_supply", null);
|
|
|
- map.put("water_withdrawals_energy", null);
|
|
|
- map.put("water_supply_energy", null);
|
|
|
- map.put("real_water_withdrawals_energy", null);
|
|
|
- map.put("real_water_supply_energy", null);
|
|
|
- map.put("last_modify_time", null);
|
|
|
- map.put("hour_actual_water_withdrawals", null);
|
|
|
- map.put("hour_actual_water_supply ", null);
|
|
|
- list.add(map);
|
|
|
- }else {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("ID", null);
|
|
|
map.put("Date", null);
|
|
@@ -568,7 +530,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
map.put("HourActualWaterWithdrawals", null);
|
|
|
map.put("HourActualWaterSupply ", null);
|
|
|
list.add(map);
|
|
|
- }
|
|
|
responseRes.setResdata(list);
|
|
|
responseRes.setRescode(ResponseCode.RESULT_NORMAL.toStrCode());
|
|
|
responseRes.setResmsg(ResponseCode.RESULT_NORMAL.toStrMsg());
|
|
@@ -718,22 +679,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
entity.setPumpId(null);
|
|
|
entity.setSubType(subType);
|
|
|
List<Map<String, Object>> defaultRes = new ArrayList<>();
|
|
|
- if("water_volume_prediction_jiangjin2".equals(databaseName)){
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", null);
|
|
|
- map.put("date", null);
|
|
|
- map.put("hour", null);
|
|
|
- map.put("pump_id", null);
|
|
|
- map.put("pump_status", null);
|
|
|
- map.put("hour_forecast_water_withdrawals", null);
|
|
|
- map.put("pump_water", null);
|
|
|
- map.put("real_pump_status", null);
|
|
|
- map.put("pump_energy", null);
|
|
|
- map.put("real_pump_energy", null);
|
|
|
- map.put("last_modify_time", null);
|
|
|
- map.put("zone_id", null);
|
|
|
- defaultRes.add(map);
|
|
|
- }else {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("ID", null);
|
|
|
map.put("Date", null);
|
|
@@ -748,7 +693,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
map.put("LastModifyTime", null);
|
|
|
map.put("orgId", null);
|
|
|
defaultRes.add(map);
|
|
|
- }
|
|
|
defaultModels.add(entity);
|
|
|
responseRes.setResdata(defaultModels);
|
|
|
responseRes.setRescode(ResponseCode.RESULT_NORMAL.toStrCode());
|
|
@@ -810,22 +754,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
entity.setPumpId(null);
|
|
|
entity.setSubType(subType);
|
|
|
List<Map<String, Object>> defaultRes = new ArrayList<>();
|
|
|
- if("water_volume_prediction_jiangjin2".equals(databaseName)){
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", null);
|
|
|
- map.put("date", null);
|
|
|
- map.put("hour", null);
|
|
|
- map.put("pump_id", null);
|
|
|
- map.put("pump_status", null);
|
|
|
- map.put("hour_forecast_actual_water_supply", null);
|
|
|
- map.put("pump_water", null);
|
|
|
- map.put("real_pump_status", null);
|
|
|
- map.put("pump_energy", null);
|
|
|
- map.put("real_pump_energy", null);
|
|
|
- map.put("last_modify_time", null);
|
|
|
- map.put("zone_id", null);
|
|
|
- defaultRes.add(map);
|
|
|
- }else {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("ID", null);
|
|
|
map.put("Date", null);
|
|
@@ -840,7 +768,6 @@ public class KprAimWaterCollecationBizFun {
|
|
|
map.put("LastModifyTime", null);
|
|
|
map.put("orgId", null);
|
|
|
defaultRes.add(map);
|
|
|
- }
|
|
|
defaultModels.add(entity);
|
|
|
responseRes.setResdata(defaultModels);
|
|
|
responseRes.setRescode(ResponseCode.RESULT_NORMAL.toStrCode());
|
|
@@ -852,7 +779,7 @@ public class KprAimWaterCollecationBizFun {
|
|
|
if("water_volume_prediction_jiangjin2".equals(databaseName)){
|
|
|
//TODO 按水厂分组
|
|
|
Map<Object, List<Map<String, Object>>> groupedData =
|
|
|
- resList.stream().collect(Collectors.groupingBy(item -> item.get("zone_id")));
|
|
|
+ resList.stream().collect(Collectors.groupingBy(item -> item.get("orgId")));
|
|
|
//TODO 查询水厂的取水泵,然后将数据拼接
|
|
|
List<InPumpModel> inPumpModels = new ArrayList<>();
|
|
|
for (Object key : groupedData.keySet()) {
|
|
@@ -867,12 +794,12 @@ public class KprAimWaterCollecationBizFun {
|
|
|
//TODO 将年月日时作为分组条件
|
|
|
Map<String, List<Map<String, Object>>> dataMap = dataList.stream()
|
|
|
.collect(Collectors.groupingBy(emp ->
|
|
|
- emp.get("date") + " " + emp.get("hour") // 创建复合键
|
|
|
+ emp.get("Date") + " " + emp.get("Hour") // 创建复合键
|
|
|
));
|
|
|
model.setDataList(dataMap);
|
|
|
//TODO 查询相应方案数据
|
|
|
List<Map<String, Object>> drawalsList = getWaterTapWaterApi().getTbMWatersupplypump(false,
|
|
|
- 20, 0, " AND \"zone_id\" = '" + key.toString() + "'");
|
|
|
+ 20, 0, " AND \"orgId\" = '" + key.toString() + "'");
|
|
|
model.setDrawalsList(drawalsList);
|
|
|
inPumpModels.add(model);
|
|
|
}
|