diff --git a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMapper.java b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMapper.java
index 42d8ea0..0ce735d 100644
--- a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMapper.java
+++ b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMapper.java
@@ -59,7 +59,7 @@ public interface EnergyMapper {
"on " +
" cpm.device_ledger_id = dl.id " +
" and dl.device_type in ('5', '6') and cpm.grade = 40 " +
-// " and cpm.terminal_device_type = '15' " +
+ " and cpm.terminal_device_type = '15' " +
"" +
" and cpm.system_type = #{systemType} " +
"" +
@@ -111,7 +111,7 @@ public interface EnergyMapper {
"on " +
" cpm.device_ledger_id = dl.id " +
" and dl.device_type in ('5', '6') and cpm.grade = 40 " +
-// " and cpm.terminal_device_type = '15' " +
+ " and cpm.terminal_device_type = '15' " +
"" +
" and cpm.system_type = #{systemType} " +
"" +
@@ -181,7 +181,7 @@ public interface EnergyMapper {
"on " +
" cpm.device_ledger_id = dl.id " +
" and dl.device_type in ('5', '6') and cpm.grade = 40 " +
-// " and cpm.terminal_device_type = '15' " +
+ " and cpm.terminal_device_type = '15' " +
"" +
" and cpm.system_type = #{systemType} " +
"" +
diff --git a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyQueryMapper.java b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyQueryMapper.java
index 130fad4..25d8117 100644
--- a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyQueryMapper.java
+++ b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyQueryMapper.java
@@ -57,6 +57,7 @@ public interface EnergyQueryMapper {
"on " +
" cpm.device_ledger_id = dl.id " +
" and dl.device_type in ('5', '6') " +
+ " and cpm.terminal_device_type = '15' " +
" " +
" and cpm.system_type = #{systemType} " +
"" +
@@ -108,6 +109,7 @@ public interface EnergyQueryMapper {
"on " +
" cpm.device_ledger_id = dl.id " +
" and dl.device_type in ('5', '6') " +
+ " and cpm.terminal_device_type = '15' " +
" " +
" and cpm.system_type = #{systemType} " +
"" +
@@ -178,6 +180,7 @@ public interface EnergyQueryMapper {
"on " +
" cpm.device_ledger_id = dl.id " +
" and dl.device_type in ('5', '6') " +
+ " and cpm.terminal_device_type = '15' " +
" " +
" and cpm.system_type = #{systemType} " +
"" +
diff --git a/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyAnalyzeServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyAnalyzeServiceImpl.java
index d8392a7..5459ef9 100644
--- a/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyAnalyzeServiceImpl.java
+++ b/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyAnalyzeServiceImpl.java
@@ -85,6 +85,7 @@ public class EnergyAnalyzeServiceImpl implements EnergyAnalyzeService {
HashMap result = deviceTypeEnergyEntities.stream()
// 过滤叼总表的数据(deviceType=15)
.filter(deviceTypeEnergyEntity -> !deviceTypeEnergyEntity.getDeviceType().equals("15"))
+ .filter(deviceTypeEnergyEntity -> !deviceTypeEnergyEntity.getDeviceType().equals("99"))
.collect(Collectors.groupingBy(DeviceTypeEnergy::getDeviceTypeRange))
.entrySet().stream().collect(Collectors.toMap(
Map.Entry>::getKey,
diff --git a/mh-system/src/main/java/com/mh/system/service/operation/impl/OperationDeviceServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/operation/impl/OperationDeviceServiceImpl.java
index 9b503af..18208cb 100644
--- a/mh-system/src/main/java/com/mh/system/service/operation/impl/OperationDeviceServiceImpl.java
+++ b/mh-system/src/main/java/com/mh/system/service/operation/impl/OperationDeviceServiceImpl.java
@@ -100,7 +100,7 @@ public class OperationDeviceServiceImpl implements IOperationDeviceService {
}
}
}
- return false;
+ return true;
}
@Override
diff --git a/mh-system/src/main/resources/mapper/system/EnergyMapper.xml b/mh-system/src/main/resources/mapper/system/EnergyMapper.xml
index 571c962..6054008 100644
--- a/mh-system/src/main/resources/mapper/system/EnergyMapper.xml
+++ b/mh-system/src/main/resources/mapper/system/EnergyMapper.xml
@@ -105,7 +105,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
@@ -143,7 +143,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
@@ -180,7 +180,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
@@ -217,7 +217,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY device_type, TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
@@ -260,8 +260,7 @@
and cpm.system_type = #{systemType}
- and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.grade = 40 and cpm.terminal_device_type = '15'
)
GROUP BY
device_type,
@@ -291,8 +290,7 @@
and cpm.system_type = #{systemType}
- and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.grade = 40 and cpm.terminal_device_type = '15'
)
GROUP BY
device_type,
@@ -324,7 +322,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY
device_type,
@@ -355,7 +353,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY
device_type,
@@ -408,7 +406,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY TO_CHAR(cur_time, 'YYYY-MM-DD HH24:MI:SS'), EXTRACT(YEAR FROM cur_time)
@@ -448,7 +446,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
GROUP BY EXTRACT(YEAR FROM cur_time)
@@ -511,7 +509,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
group by
@@ -553,7 +551,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
group by
@@ -606,7 +604,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
group by
substring(to_char(cur_time, 'YYYY-MM-DD HH24:MI:SS') from 1 for ${len}),
@@ -637,7 +635,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
group by
substring(to_char(cur_time, 'YYYY-MM-DD HH24:MI:SS') from 1 for ${len}),
@@ -669,7 +667,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
group by
extract(year from cur_time)
@@ -698,7 +696,7 @@
and cpm.system_type = #{systemType}
and cpm.grade = 40
--- and cpm.terminal_device_type = '15'
+ and cpm.terminal_device_type = '15'
)
group by
extract(year from cur_time)
@@ -1031,7 +1029,7 @@
order by timeStr
-
-
+ = #{startTime}::timestamp
- and dm.cur_time <= #{endTime}::timestamp
+ and dm.cur_time <= #{endTime}::timestamp
and dm.device_num in (
select
cpm.mt_num
@@ -1123,7 +1122,7 @@
${lastTable} dm
where
dm.cur_time >= #{startTime}::timestamp
- and dm.cur_time <= #{endTime}::timestamp
+ and dm.cur_time <= #{endTime}::timestamp
and dm.device_num in (
select
cpm.mt_num
@@ -1134,6 +1133,7 @@
cpm.device_ledger_id = dl.id
and dl.device_type = '6'
and cpm.grade = 140 and cpm.terminal_device_type = '15'
+ and cpm.param_type = '17'
)
group by
device_type,
@@ -1149,7 +1149,7 @@
${curTable} dm
where
dm.cur_time >= #{startTime}::timestamp
- and dm.cur_time <= #{endTime}::timestamp
+ and dm.cur_time <= #{endTime}::timestamp
and dm.device_num in (
select
cpm.mt_num
@@ -1175,7 +1175,7 @@
${curTable} dm
where
dm.cur_time >= #{startTime}::timestamp
- and dm.cur_time <= #{endTime}::timestamp
+ and dm.cur_time <= #{endTime}::timestamp
and dm.device_num in (
select
cpm.mt_num
@@ -1185,13 +1185,13 @@
on
cpm.device_ledger_id = dl.id
and dl.device_type = '6'
- and cpm.grade = 140 and cpm.terminal_device_type = '15'
+ and cpm.grade = 140 and cpm.terminal_device_type = '15' and cpm.param_type = '17'
)
group by
device_type,
TO_CHAR(dm.cur_time,
'YYYY-MM-DD HH24:MI')
-
+ ]]>