Browse Source

解决国标平台通道数统计的错误

pull/87/head
panlinlin 4 years ago
parent
commit
1f07f4ab4c
  1. 9
      src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java
  2. 4
      web_src/src/components/ParentPlatformList.vue
  3. 2
      web_src/src/components/dialog/chooseChannel.vue

9
src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java

@ -46,7 +46,14 @@ public interface ParentPlatformMapper {
@Delete("DELETE FROM parent_platform WHERE serverGBId=#{serverGBId}")
int delParentPlatform(ParentPlatform parentPlatform);
@Select("SELECT *,( SELECT count(0) FROM platform_gb_channel pc WHERE pc.platformId = pp.serverGBId) as channelCount FROM parent_platform pp ")
@Select("SELECT *,(" +
"select sum(sum1) from ( " +
"SELECT count(0) as sum1 FROM platform_gb_channel pc WHERE pc.platformId = pp.serverGBId " +
"union all " +
"SELECT count(0) as sum1 FROM platform_gb_stream pgs WHERE pgs.platformId = pp.serverGBId " +
") " +
") as channelCount " +
"FROM parent_platform pp ")
List<ParentPlatform> getParentPlatformList();
@Select("SELECT * FROM parent_platform WHERE enable=#{enable}")

4
web_src/src/components/ParentPlatformList.vue

@ -138,9 +138,7 @@ export default {
});
},
chooseChannel: function(platform) {
this.$refs.chooseChannelDialog.openDialog(platform.serverGBId, ()=>{
this.initData()
})
this.$refs.chooseChannelDialog.openDialog(platform.serverGBId, this.initData)
},
initData: function() {
this.getPlatformList();

2
web_src/src/components/dialog/chooseChannel.vue

@ -62,7 +62,7 @@ export default {
this.closeCallback = closeCallback
},
close: function() {
this.closeCallback()
},
search: function() {

Loading…
Cancel
Save