Memory_LG 1 mês atrás
pai
commit
ebb50e93df
68 arquivos alterados com 1358 adições e 506 exclusões
  1. 1 1
      event-ui/package.json
  2. BIN
      event-ui/public/favicon.ico
  3. BIN
      event-ui/src/assets/logo/logo.png
  4. 3 3
      event-ui/src/views/event/eventcatalogue/index.vue
  5. 28 3
      event-ui/src/views/event/eventhandling/index.vue
  6. 1 2
      event-ui/src/views/event/eventtypemonitor/index.vue
  7. 3 3
      event-ui/src/views/integrated/bigdata/bigdata.vue
  8. 2 2
      event-ui/src/views/integrated/index.vue
  9. 1 1
      event-ui/src/views/integrated/visual/center_monitor/monitor.vue
  10. 1 1
      event-ui/src/views/integrated/visual/forest/fire-forest.vue
  11. 12 12
      event-ui/src/views/integrated/visual/forest/forest.vue
  12. 7 7
      event-ui/src/views/integrated/visual/index.vue
  13. 22 22
      event-ui/src/views/integrated/visual/v-header.vue
  14. 1 3
      event-ui/vue.config.js
  15. 1 4
      src/main/java/com/sooka/sponest/event/SookaEventApplication.java
  16. 2 1
      src/main/java/com/sooka/sponest/event/centereventtdutysystem/controller/CentereventTDutySystemController.java
  17. 36 1
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/AlarmEventController.java
  18. 122 106
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CenterEventReportController.java
  19. 8 1
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CenterEventViewController.java
  20. 3 5
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CentereventTEventcatalogueController.java
  21. 10 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/FireIncidentController.java
  22. 10 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/CentereventTEventcatalogue.java
  23. 1 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestCloudMapEventListBO.java
  24. 7 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestEventTodayEventListBO.java
  25. 69 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/dahua/BayonetInfoVO.java
  26. 15 1
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/dahua/DaHuaFireEventVO.java
  27. 80 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/tower/TowerEventVo.java
  28. 0 2
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/vo/AppEventSalVO.java
  29. 17 3
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/vo/VisuForestCloudMapVO.java
  30. 12 7
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/mapper/CenterEventReportMapper.java
  31. 7 4
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/mapper/CenterEventViewMapper.java
  32. 7 0
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/AlarmEventService.java
  33. 12 7
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/ICenterEventReportService.java
  34. 7 4
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/ICenterEventViewService.java
  35. 231 15
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/AlarmEventServiceImpl.java
  36. 0 1
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventAppServiceImpl.java
  37. 33 42
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventReportServiceImpl.java
  38. 8 15
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventViewServiceImpl.java
  39. 4 3
      src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CentereventTEventcatalogueServiceImpl.java
  40. 26 3
      src/main/java/com/sooka/sponest/event/centereventteventtype/controller/CentereventTEventtypeController.java
  41. 11 3
      src/main/java/com/sooka/sponest/event/centereventteventtype/mapper/CentereventTEventtypeMapper.java
  42. 10 1
      src/main/java/com/sooka/sponest/event/centereventteventtype/service/ICentereventTEventtypeService.java
  43. 13 26
      src/main/java/com/sooka/sponest/event/centereventteventtype/service/impl/CentereventTEventtypeServiceImpl.java
  44. 1 1
      src/main/java/com/sooka/sponest/event/centereventteventtypemapdept/controller/CentereventTEventtypemapdeptController.java
  45. 8 21
      src/main/java/com/sooka/sponest/event/centereventtforestfireloss/controller/CentereventTForestFireLossController.java
  46. 1 3
      src/main/java/com/sooka/sponest/event/centereventtforestfireloss/domain/VisuForestFireLossVO.java
  47. 0 4
      src/main/java/com/sooka/sponest/event/centereventtforestfireloss/mapper/CentereventTForestFireLossMapper.java
  48. 0 3
      src/main/java/com/sooka/sponest/event/centereventtforestfireloss/service/ICentereventTForestFireLossService.java
  49. 0 9
      src/main/java/com/sooka/sponest/event/centereventtforestfireloss/service/impl/CentereventTForestFireLossServiceImpl.java
  50. 2 2
      src/main/java/com/sooka/sponest/event/centereventtregionalflag/mapper/CentereventTRegionalFlagMapper.java
  51. 1 1
      src/main/java/com/sooka/sponest/event/centereventtregionalflag/service/ICentereventTRegionalFlagService.java
  52. 2 2
      src/main/java/com/sooka/sponest/event/centereventtregionalflag/service/impl/CentereventTRegionalFlagServiceImpl.java
  53. 5 21
      src/main/java/com/sooka/sponest/event/index/controller/IndexController.java
  54. 7 7
      src/main/java/com/sooka/sponest/event/test/ScheduleTask.java
  55. 5 2
      src/main/java/com/sooka/sponest/event/test/TestController.java
  56. 1 1
      src/main/java/com/sooka/sponest/event/urge/EventSocketAdapter.java
  57. 2 0
      src/main/java/com/sooka/sponest/event/utils/EventConstants.java
  58. 191 0
      src/main/java/com/sooka/sponest/event/utils/GWHttpUtilsTest65.java
  59. 3 0
      src/main/java/com/sooka/sponest/event/utils/RemoteApiUtil.java
  60. 1 5
      src/main/java/com/sooka/sponest/event/utils/ScheduleTaskUtil.java
  61. 1 3
      src/main/resources/bootstrap.yml
  62. 1 13
      src/main/resources/mapper/centereventteventcatalogue/CenterEventAppMapper.xml
  63. 198 38
      src/main/resources/mapper/centereventteventcatalogue/CenterEventReportMapper.xml
  64. 60 38
      src/main/resources/mapper/centereventteventcatalogue/CenterEventViewMapper.xml
  65. 3 1
      src/main/resources/mapper/centereventteventcatalogue/CentereventTEventcatalogueMapper.xml
  66. 5 0
      src/main/resources/mapper/centereventteventtype/CentereventTEventtypeMapper.xml
  67. 2 12
      src/main/resources/mapper/centereventtforestfireloss/CentereventTForestFireLossMapper.xml
  68. 14 4
      src/main/resources/mapper/centereventtregionalflag/CentereventTRegionalFlagMapper.xml

+ 1 - 1
event-ui/package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.4.0",
-  "description": "态势感知平台",
+  "description": "全域视联态势感知平台",
   "author": "若依",
   "license": "MIT",
   "scripts": {

BIN
event-ui/public/favicon.ico


BIN
event-ui/src/assets/logo/logo.png


+ 3 - 3
event-ui/src/views/event/eventcatalogue/index.vue

@@ -56,7 +56,7 @@
       </el-col>
       <el-col :span="1.5">
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleDownload"
-                   :disabled="single" v-hasPermi="['eventcatalogue:eventcatalogue:export']">下载录像
+                   :disabled="single" v-hasPermi="['eventcatalogue:eventcatalogue:add']">下载录像
         </el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -80,10 +80,10 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)"
-                     v-hasPermi="['eventcatalogue:eventcatalogue:edit']">详情
+                     v-hasPermi="['eventcatalogue:eventcatalogue:query']">详情
           </el-button>
           <el-button size="mini" type="text" icon="el-icon-document" @click="handleEventLog(scope.row)"
-                     v-hasPermi="['eventcatalogue:eventcatalogue:edit']">事件日志
+                     v-hasPermi="['eventcatalogue:eventcatalogue:query']">事件日志
           </el-button>
         </template>
       </el-table-column>

+ 28 - 3
event-ui/src/views/event/eventhandling/index.vue

@@ -16,6 +16,13 @@
         <el-date-picker v-model="queryParams.day" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
         </el-date-picker>
       </el-form-item>
+      <el-form-item label="事件分类" prop="eventTypeXls">
+        <el-select v-model="queryParams.eventTypeXls" placeholder="请选择事件分类" clearable filterable
+                   multiple @keyup.enter.native="handleQuery">
+          <el-option v-for="item in defaultTypeXl" :key="item.id" :label="item.eventTypeName"
+                     :value="item.typeXlId"/>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -25,6 +32,7 @@
       <el-table-column type="selection" align="center" width="50"/>
       <!--<el-table-column label="事件编号" align="center" prop="eventCode" width="150"/>-->
       <el-table-column label="事件名称" align="center" prop="eventName"/>
+      <el-table-column label="事件分类" align="center" prop="eventTypeName"/>
       <el-table-column label="事件状态" align="center" prop="eventStatus"/>
       <el-table-column label="事件图片" align="center" prop="picturePathList">
         <template slot-scope="scope">
@@ -161,6 +169,9 @@ import {
 } from "@/api/event/eventcatalogue/eventcatalogue";
 import Cookies from 'js-cookie';
 import TcPlayer from '@/components/TcPlayer'; // 视频预览
+import {listByParentId} from "@/api/event/eventtypemonitor/eventtypemonitor";
+
+import {getConfigKey} from "@/api/system/config";
 export default {
   name: "Eventcatalogue",
   components: {TcPlayer},
@@ -202,6 +213,7 @@ export default {
       activities: [],
       showTcPlayer: false,//视频预览弹窗
       playVideo: '',//视频预览地址
+      defaultTypeXl: [],
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -209,6 +221,7 @@ export default {
         eventName: undefined,
         eventStatusValue: null,
         day: this.getNowTime(),
+
       },
       // 表单校验
       rules: {
@@ -222,9 +235,21 @@ export default {
     };
   },
   created() {
-  },
-  mounted() {
-    this.getList();
+    listByParentId({parentId: this.$route.query.pid}).then(response => {
+      let obj = {};
+      let reduce = response.data.reduce((curr, next) => {
+        /*判断对象中是否已经有该属性  没有的话 push 到 curr数组*/
+        obj[next.eventTypeName] ? '' : obj[next.eventTypeName] = curr.push(next);
+        return curr;
+      }, []);// 去重
+      this.defaultTypeXl = reduce.filter(item => {
+        return item.parentId != 0;
+      });
+      this.queryParams.defaultTypeXl = this.defaultTypeXl.map(item => {
+        return item.typeXlId;
+      })
+      this.getList();
+    });
   },
   methods: {
     getUrl(url) {

+ 1 - 2
event-ui/src/views/event/eventtypemonitor/index.vue

@@ -100,9 +100,8 @@
           <el-input v-model="form.eventTypeName" placeholder="请输入事件类型名称"  :disabled="findView"/>
         </el-form-item>
         <el-form-item label="序号" prop="serialNumber">
-          <el-input v-model="form.serialNumber" placeholder="请输入序号" />
+          <el-input-number v-model="form.serialNumber" controls-position="right" :min="0" :max="9999" />
         </el-form-item>
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>

+ 3 - 3
event-ui/src/views/integrated/bigdata/bigdata.vue

@@ -5,7 +5,7 @@
 		<div class="header">
 			<!-- title -->
 			<router-link class="header-left"  to="/integrated/index"  exact><img class="logo" src="@/assets/images/integrated/logo-small.png" />
-				<h3 class="title">数字四平态势感知监管平台</h3></router-link>
+				<h3 class="title">态势感知监管平台</h3></router-link>
 			<div class="bignav">
 				<img src="@/assets/images/integrated/bigdata-header-nav-left.png" />
 				<router-link v-for="(navbar,index) in navbar " :key="index" :to="navbar.path" class="bignav-list" exact>
@@ -188,8 +188,8 @@
 	import chartFoam from './chart-foam.vue' //14 泡沫液
 	import chartWaterIntake from './chart-waterintake' //15 取水口
 	import chartCamera from './chart-camera' //16 摄像头
-	import chartDetector from './chart-detector' //17 探测器	
-	import chartFireControl from './chart-firecontrol' //18 消防力量	
+	import chartDetector from './chart-detector' //17 探测器
+	import chartFireControl from './chart-firecontrol' //18 消防力量
 
 
 	export default {

+ 2 - 2
event-ui/src/views/integrated/index.vue

@@ -3,7 +3,7 @@
 	<div class="sj-container">
 		<div class="integrated-con">
 			<div class="in-header">
-				<h3 class="title">数字四平态势感知监管平台</h3>
+				<h3 class="title">态势感知监管平台</h3>
 				<router-link  to="/integrated/bigdata" class="header-right" exact><img src="../../assets/images/integrated/logo-small.png"  />四平市一体化平台</router-link>
 			</div>
 			<div class="map-con"></div>
@@ -99,7 +99,7 @@
 						icon:'sj-icon-pczx'
 					}
 				]
-	
+
 			}
 		}
 	}

+ 1 - 1
event-ui/src/views/integrated/visual/center_monitor/monitor.vue

@@ -18,7 +18,7 @@
 			<!--中间LOGO -->
 			<router-link class="title" to="/integrated/index" exact><img
 					src="@/assets/images/integrated/bigdata-header-nav-left2.png" />
-				<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />数字四平态势感知监管平台 监控中心
+				<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />态势感知监管平台 监控中心
 				</h3><img src="@/assets/images/integrated/bigdata-header-nav-right2.png" />
 			</router-link>
 			<!--中间导航-->

+ 1 - 1
event-ui/src/views/integrated/visual/forest/fire-forest.vue

@@ -18,7 +18,7 @@
 			<!--中间LOGO -->
 			<router-link class="title" to="/integrated/index" exact><img
 					src="@/assets/images/integrated/bigdata-header-nav-left2.png" />
-				<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />数字四平态势感知监管平台 森林防火
+				<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />态势感知监管平台 森林防火
 				</h3><img src="@/assets/images/integrated/bigdata-header-nav-right2.png" />
 			</router-link>
 			<!--中间导航-->

+ 12 - 12
event-ui/src/views/integrated/visual/forest/forest.vue

@@ -18,7 +18,7 @@
 			<!--中间LOGO -->
 			<router-link class="title" to="/integrated/index" exact><img
 					src="@/assets/images/integrated/bigdata-header-nav-left2.png" />
-				<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />数字四平态势感知监管平台 林业云图
+				<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />态势感知监管平台 林业云图
 				</h3><img src="@/assets/images/integrated/bigdata-header-nav-right2.png" />
 			</router-link>
 			<!--中间导航-->
@@ -243,7 +243,7 @@
 								</el-image>
 								<el-image :src="url" :preview-src-list="srcList" class="img-company">
 								</el-image>
-		
+
 							</div>
 							<div class="e-right">
 								<div class="forthis h-67">
@@ -255,11 +255,11 @@
 											<div class="z-begin">党校监控点位 2022-02-12 14:39 上报火情
 											</div>
 											<div class="z-info-list">
-		
+
 												<el-image :src="require('@/assets/images/visual/user-img.png')"
 													style="width: 3rem; height: 3rem;margin:2px;">
 												</el-image>
-		
+
 												<div class="z-info-list-con">
 													<div class="user-and-time">
 														<span>中心管理员</span><span> 2022-02-12 14:39</span>
@@ -274,7 +274,7 @@
 																v-for="(item,index) in 4">
 															</el-image>
 														</div>
-		
+
 													</div>
 												</div>
 											</div>
@@ -290,7 +290,7 @@
 									<el-radio v-model="radio" label="2">确认火情</el-radio>
 									<el-button type="success" @click="">确定</el-button>
 								</el-form-item>
-		
+
 							</el-form>
 						</div>
 					</el-tab-pane>
@@ -382,13 +382,13 @@
 						id: ''
 					},
 				],
-				
+
 				//弹出层 基本信息
 				information: [{
 						name: '标题',
 						id: '',
 						content: '某某某某某发现疑似火情'
-				
+
 					},
 					{
 						name: '时间',
@@ -426,7 +426,7 @@
 						name: '沈洋镇',
 						id: '',
 						state: 0
-				
+
 					},
 					{
 						name: '小宽镇',
@@ -437,16 +437,16 @@
 						name: '四棵树',
 						id: '',
 						state: 1
-				
+
 					},
-				
+
 				],
 				url: require('@/assets/images/visual/img-sample.png'),
 				srcList: [
 					require('@/assets/images/visual/img-sample.png'),
 					require('@/assets/images/visual/img-sample2.png'),
 				],
-				
+
 				// 右上时钟
 				today: aDate.getFullYear() + "." + month + "." + date,
 				weekE: weekEn[day].toUpperCase(),

+ 7 - 7
event-ui/src/views/integrated/visual/index.vue

@@ -4,7 +4,7 @@
 		<!--头部-->
 		<div class="header">
 			<div class="header-left"><img class="logo" src="@/assets/images/integrated/logo-small.png" />
-				<h3 class="title">四平市城乡一体化态势感知系统</h3>
+				<h3 class="title">城乡一体化态势感知系统</h3>
 			</div>
 		</div>
 	</div>
@@ -27,7 +27,7 @@
 			height: 5vh;
 			display: flex;
 			align-items: center;
-			
+
 			.header-left {
 				position: fixed;
 				left: 10px;
@@ -36,7 +36,7 @@
 				align-items: center;
 				color: $inBlue;
 				font-family: $fontFk;
-			
+
 				.title {
 					margin: 0 auto;
 					line-height: 4vh;
@@ -48,10 +48,10 @@
 					font-size: 28px;
 				}
 			}
-			
+
 		}
-		
+
 	}
-	
-	
+
+
 </style>

+ 22 - 22
event-ui/src/views/integrated/visual/v-header.vue

@@ -15,7 +15,7 @@
 		<!--中间LOGO -->
 		<router-link class="title" to="/integrated/index" exact><img
 				src="@/assets/images/integrated/bigdata-header-nav-left2.png" />
-			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />数字四平态势感知监管平台 监控中心
+			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />态势感知监管平台 监控中心
 			</h3><img src="@/assets/images/integrated/bigdata-header-nav-right2.png" />
 		</router-link>
 		<!--中间导航-->
@@ -87,10 +87,10 @@
 						name: '数字消防',
 						path: '/',
 					},
-				
+
 				],
-			
-				
+
+
 				// 右上时钟
 				today: aDate.getFullYear() + "." + month + "." + date,
 				weekE: weekEn[day].toUpperCase(),
@@ -145,13 +145,13 @@
 		z-index: 10000000;
 		position: absolute;
 		top: 0;
-	
+
 		.title {
 			display: flex;
 			position: fixed;
 			left: 50%;
 			transform: translateX(-50%);
-	
+
 			h3 {
 				display: flex;
 				align-items: center;
@@ -160,13 +160,13 @@
 				font-size: 1.8rem;
 				font-family: $fontFk;
 				background: url(../../../assets/images/integrated/bigdata-header-nav-re2.png) repeat-x center;
-	
+
 				img {
 					margin-right: .5rem;
 				}
 			}
 		}
-	
+
 		.bignav {
 			height: 40px;
 			position: fixed;
@@ -178,7 +178,7 @@
 			display: flex;
 			justify-content: cetner;
 			align-items: center;
-	
+
 			.bignav-list {
 				background: url(../../../assets/images/integrated/bigdata-header-nav-re2.png) repeat-x center;
 				float: left;
@@ -194,7 +194,7 @@
 				transform: translateY(0);
 				transition: all 0.3s ease-in-out;
 			}
-	
+
 			.router-link-active,
 			.bignav-list:hover {
 				filter: brightness(2.3);
@@ -203,10 +203,10 @@
 				color: $inBlueHover;
 				border-bottom: 1px solid $inBlueHover;
 				transition: all 0.3s ease-in-out;
-	
+
 			}
 		}
-	
+
 		.header-left {
 			height: 5vh;
 			position: absolute;
@@ -215,34 +215,34 @@
 			font-size: 1rem;
 			align-items: center;
 			color: $inBlue;
-	
+
 			.date {
 				flex: 1;
 				display: flex;
 				align-items: center;
-	
+
 				.day {
 					display: flex;
 					flex-direction: column;
 					font-size: 14px;
 				}
-	
+
 				.day span:nth-child(2) {
 					font-size: 10px;
 					text-align: right;
 				}
-	
+
 				.week {
 					font-size: 13px;
 					writing-mode: tb-rl;
-	
+
 				}
-	
+
 				.time {
 					font-size: 2rem;
-	
+
 				}
-	
+
 				.line {
 					width: 1px;
 					height: 1.5rem;
@@ -250,8 +250,8 @@
 					margin: 0 .4rem;
 				}
 			}
-	
+
 		}
 	}
-	
+
 </style>

+ 1 - 3
event-ui/vue.config.js

@@ -7,7 +7,7 @@ function resolve(dir) {
 
 const CompressionPlugin = require('compression-webpack-plugin')
 
-const name = process.env.VUE_APP_TITLE || '态势感知平台' // 网页标题
+const name = process.env.VUE_APP_TITLE || '全域视联态势感知平台' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 
@@ -40,8 +40,6 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://117.78.49.164:3031`,
-        // target: `http://10.0.0.14:3031`,
         target: `http://127.0.0.1:3031`,
         changeOrigin: true,
         pathRewrite: {

+ 1 - 4
src/main/java/com/sooka/sponest/event/SookaEventApplication.java

@@ -4,15 +4,12 @@ import com.ruoyi.common.security.annotation.EnableCustomConfig;
 import com.ruoyi.common.security.annotation.EnableRyFeignClients;
 import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 
 @EnableCustomConfig
 @EnableCustomSwagger2
 @EnableRyFeignClients
-@SpringBootApplication(scanBasePackages = "com.sooka")
-@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
+@SpringBootApplication(scanBasePackages = {"com.sooka", "com.ruoyi"})
 public class SookaEventApplication {
 
     public static void main(String[] args) {

+ 2 - 1
src/main/java/com/sooka/sponest/event/centereventtdutysystem/controller/CentereventTDutySystemController.java

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -147,7 +148,7 @@ public class CentereventTDutySystemController extends BaseController {
             // 提取电话号
             Set<String> phones = dutySystems.stream().map(CentereventTDutySystem::getTelphone).collect(Collectors.toSet());
             // 提取userId
-            Set<Long> userIds = dutySystems.stream().filter(userId -> null != userId).map(CentereventTDutySystem::getUserId).collect(Collectors.toSet());
+            Set<Long> userIds = dutySystems.stream().filter(Objects::nonNull).map(CentereventTDutySystem::getUserId).collect(Collectors.toSet());
             // 推送
             RemoteApiUtil.getInstance().sendMessageAndJg(phones, userIds, message, centereventTDutySystemVo.getEventCode(), centereventTDutySystemVo.getEventName());
         }

+ 36 - 1
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/AlarmEventController.java

@@ -6,11 +6,13 @@ import com.ruoyi.common.core.utils.StringUtils;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.DaHuaFireEventVO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.DaHuaOtherEventVO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.haikang.HaiKangEventVo;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.tower.TowerEventVo;
 import com.sooka.sponest.event.centereventteventcatalogue.service.AlarmEventService;
 import com.sooka.sponest.event.centereventtreportmessage.domain.CentereventTReportmessage;
 import com.sooka.sponest.event.centereventtreportmessage.service.ICentereventTReportmessageService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.collections4.MapUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -100,7 +102,8 @@ public class AlarmEventController {
         try {
             CentereventTReportmessage tReportMessage = new CentereventTReportmessage();
             tReportMessage.setId(eventCode);
-            tReportMessage.setSource("大华摄像头-" + daHuaFireEventVO.getInfo().getAlarmTypeName());
+            String alarmName = StringUtils.isBlank(MapUtils.getString(daHuaFireEventVO.getInfo(), "alarmTypeName")) ? MapUtils.getString(daHuaFireEventVO.getInfo(), "alarmType") : MapUtils.getString(daHuaFireEventVO.getInfo(), "alarmTypeName");
+            tReportMessage.setSource("大华摄像头-" + alarmName);
             tReportMessage.setContext(jsonStr);
             centereventTReportmessageService.insertCentereventTReportmessage(tReportMessage);
         } catch (Exception e) {
@@ -168,4 +171,36 @@ public class AlarmEventController {
         }
         return R.ok(i);// 3951
     }
+
+    /**
+     * 铁塔事件上报
+     *
+     * @param jsonStr
+     * @return R
+     */
+    @PostMapping("/insertTowerEvent")
+    public R insertTowerEvent(@RequestBody String jsonStr) {
+        String eventCode = null;
+        TowerEventVo towerEventVo = new TowerEventVo();
+        try {
+            JSONObject jsonObject = JSONObject.parseObject(jsonStr);
+            towerEventVo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), TowerEventVo.class);
+            eventCode = alarmEventService.insertTowerEvent(towerEventVo);
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+        if (StringUtils.isBlank(eventCode)) {
+            eventCode = String.valueOf(System.currentTimeMillis());
+        }
+        try {
+            CentereventTReportmessage tReportMessage = new CentereventTReportmessage();
+            tReportMessage.setId(eventCode);
+            tReportMessage.setSource("铁塔-" + towerEventVo.getAlarmType());
+            tReportMessage.setContext(jsonStr);
+            centereventTReportmessageService.insertCentereventTReportmessage(tReportMessage);
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+        return R.ok();
+    }
 }

+ 122 - 106
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CenterEventReportController.java

@@ -1,27 +1,36 @@
 package com.sooka.sponest.event.centereventteventcatalogue.controller;
 
 import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.utils.DataConvertUtil;
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudCalendarBO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudEventTypeBO;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.utils.DeptLevelUtil;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 import com.sooka.sponest.event.centereventteventcatalogue.service.ICenterEventReportService;
 import com.sooka.sponest.event.centereventteventtype.domain.CentereventTEventtype;
 import com.sooka.sponest.event.centereventteventtype.service.ICentereventTEventtypeService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.util.MultiValueMap;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.*;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
+import static com.ruoyi.common.core.utils.DataConvertUtil.*;
+import static com.ruoyi.common.core.utils.DateUtils.YYYY_MM_DD;
+
 /**
  * @program: sooka
  * @description: 事件中心-大数据控制器
@@ -45,10 +54,24 @@ public class CenterEventReportController extends BaseController {
         return R.ok(centerEventReportService.getEventTotal(visuForestCloudMapVO));
     }
 
+    @ApiOperation("查询事件总数")
+    @PostMapping("/getTotalMore")
+    public R getTotalMore(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
+        Map<String, Object> resultMap = new HashMap<>();
+        resultMap.put("total", centerEventReportService.getEventTotal(visuForestCloudMapVO));
+        visuForestCloudMapVO.setDiff(0L);// 当日
+        resultMap.put("day", centerEventReportService.getEventTotal(visuForestCloudMapVO));
+        LocalDate currentDate = LocalDate.now();
+        int dayOfMonth = currentDate.getDayOfMonth() - 1;
+        visuForestCloudMapVO.setDiff(Long.valueOf(dayOfMonth));// 当月
+        resultMap.put("month", centerEventReportService.getEventTotal(visuForestCloudMapVO));
+        return R.ok(resultMap);
+    }
+
     @ApiOperation("事件来源、类型统计")
     @PostMapping("/getEventSourceAndTypeStatistics")
     public R getEventSourceAndTypeStatistics(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        Map<String, List> resultMap = new HashMap<>();
+        Map<String, List<Map<String, Object>>> resultMap = new HashMap<>();
         resultMap.put("source", centerEventReportService.getEventCountGroupByReportSource(visuForestCloudMapVO));
         resultMap.put("type", centerEventReportService.getEventCountGroupByEventTypeXl(visuForestCloudMapVO));
         return R.ok(resultMap);
@@ -64,28 +87,13 @@ public class CenterEventReportController extends BaseController {
     @PostMapping("/getEventTypeRadar")
     public R getEventTypeRadar(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
         List<Map<String, Object>> result = centerEventReportService.getEventTypeRadar(visuForestCloudMapVO);
-        List<Long> numList = new ArrayList<>();
-        for (Map<String, Object> map : result) {
-            numList.add(MapUtils.getLong(map, "value"));
-        }
-        Map<String, List> resultMap = new HashMap<>();
-        resultMap.put("eventtype", result);
-        resultMap.put("num", numList);
-        return R.ok(resultMap);
+        return R.ok(convertToMap(result, Arrays.asList("name", "value")));
     }
 
     @ApiOperation("起火原因统计")
     @PostMapping("/getEventCountGroupByFireSource")
     public R getEventCountGroupByFireSource(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        List<Map<String, Object>> result = centerEventReportService.getEventCountGroupByFireSource(visuForestCloudMapVO);
-        List<Long> numList = new ArrayList<>();
-        for (Map<String, Object> map : result) {
-            numList.add(MapUtils.getLong(map, "value"));
-        }
-        Map<String, List> resultMap = new HashMap<>();
-        resultMap.put("firesource", result);
-        resultMap.put("num", numList);
-        return R.ok(resultMap);
+        return R.ok(centerEventReportService.getEventCountGroupByFireSource(visuForestCloudMapVO));
     }
 
     @ApiOperation("火灾等级统计")
@@ -94,6 +102,12 @@ public class CenterEventReportController extends BaseController {
         return R.ok(centerEventReportService.getEventCountGroupByFireRisk(visuForestCloudMapVO));
     }
 
+    @ApiOperation("火险等级统计")
+    @PostMapping("/getEventCountGroupByFireInsurance")
+    public R getEventCountGroupByFireInsurance(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
+        return R.ok(centerEventReportService.getEventCountGroupByFireInsurance(visuForestCloudMapVO));
+    }
+
     @ApiOperation("火灾种类统计")
     @PostMapping("/getEventCountGroupByFireType")
     public R getEventCountGroupByFireType(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
@@ -109,107 +123,71 @@ public class CenterEventReportController extends BaseController {
     @ApiOperation("设备上报事件数量")
     @PostMapping("/getAIEventNum")
     public R getAIEventNum(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        List<VisuForestCloudEventTypeBO> result = centerEventReportService.getAIEventCountGroupByReportor(visuForestCloudMapVO);
-        Map<String, List<String>> resultMap = new HashMap<>();
-        resultMap.put("reportor", result.stream().map(VisuForestCloudEventTypeBO::getName).collect(Collectors.toList()));
-        resultMap.put("num", result.stream().map(VisuForestCloudEventTypeBO::getValue).collect(Collectors.toList()));
-        return R.ok(resultMap);
+        return R.ok(centerEventReportService.getAIEventCountGroupByReportor(visuForestCloudMapVO));
     }
 
     @ApiOperation("事件趋势")
     @PostMapping("/getEventTrend")
     public R getEventTrend(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        List<VisuForestCloudCalendarBO> result = centerEventReportService.getEventCountGroupByYearMonth(visuForestCloudMapVO);
-        Map<String, List> resultMap = new HashMap<>();
-        resultMap.put("month", result.stream().map(VisuForestCloudCalendarBO::getDay).collect(Collectors.toList()));
-        resultMap.put("num", result.stream().map(VisuForestCloudCalendarBO::getDaycount).collect(Collectors.toList()));
-        return R.ok(resultMap);
+        String format = "%Y-%m";
+        LocalDate localDate = LocalDate.now();
+        if (visuForestCloudMapVO.getYearMonth().contains(String.valueOf(localDate.getYear()))) {
+            format = "%Y";
+        } else if (visuForestCloudMapVO.getYearMonth().contains(localDate.format(DateTimeFormatter.ofPattern(YYYY_MM_DD)))) {
+            format = "%Y-%m-%d";
+        }
+        visuForestCloudMapVO.setDay(format);
+        List<Map<String, Object>> result = centerEventReportService.getEventCountGroupByYearMonth(visuForestCloudMapVO);
+        return R.ok(completionDate(result, visuForestCloudMapVO.getYearMonth(), "day", "daycount"));
     }
 
     @ApiOperation("事件类型年度统计")
     @PostMapping("/getEventTypeYearStatistics")
     public R getEventTypeYearStatistics(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        List<Map<String, Object>> list = centerEventReportService.getEventTypeCountGroupByYearMonth(visuForestCloudMapVO);
-        // 数据转换
-        List<String> month = new ArrayList<>();
-        MultiValueMap<String, Object> countMap = new LinkedMultiValueMap<>();
+        if (StringUtils.isEmpty(visuForestCloudMapVO.getYearMonth())) {
+            visuForestCloudMapVO.setYearMonth(DateUtils.getLast30Days());
+        }
+        String format = "%Y-%m";
+        LocalDate localDate = LocalDate.now();
+        if (visuForestCloudMapVO.getYearMonth().contains(String.valueOf(localDate.getYear()))) {
+            format = "%Y";
+        } else if (visuForestCloudMapVO.getYearMonth().contains(localDate.format(DateTimeFormatter.ofPattern(YYYY_MM_DD)))) {
+            format = "%Y-%m-%d";
+        }
+        visuForestCloudMapVO.setDay(format);
+        List<Map<String, Object>> result = centerEventReportService.getEventTypeCountGroupByYearMonth(visuForestCloudMapVO);
+        // 补全日期
+        result = completionDate(result, visuForestCloudMapVO.getYearMonth(), "day", Arrays.asList(visuForestCloudMapVO.getEventTypeId()));
+        // key->label
         Map<String, String> eventTypeMap = centereventTEventtypeService.selectCentereventTEventtypeList(new CentereventTEventtype()).stream().collect(
                 Collectors.toMap(CentereventTEventtype::getId, CentereventTEventtype::getEventTypeName));
-        list.forEach(item -> {
-            month.add(MapUtils.getString(item, "day"));
-
-            Iterator<Map.Entry<String, Object>> iterator = item.entrySet().iterator();
-            while (iterator.hasNext()) {
-                Map.Entry<String, Object> entry = iterator.next();
-                if (!"day".equals(entry.getKey())) {
-                    countMap.add(eventTypeMap.get(entry.getKey()), entry.getValue());
-                }
-                iterator.remove();
-            }
-        });
-        // 返回值
-        Map<String, Object> resultMap = new HashMap<>();
-        resultMap.put("month", month);
-        List<Map<String, Object>> series = new ArrayList<>();
-        Map<String, Object> map = null;
-        Iterator<Map.Entry<String, List<Object>>> iterator = countMap.entrySet().iterator();
-        while (iterator.hasNext()) {
-            Map.Entry<String, List<Object>> entry = iterator.next();
-            map = new HashMap<>();
-            map.put("name", entry.getKey());
-            map.put("type", "bar");
-            map.put("data", entry.getValue());
-            series.add(map);
-        }
-        resultMap.put("series", series);
-        return R.ok(resultMap);
+        return R.ok(DataConvertUtil.convertKeyToLabel(result, eventTypeMap));
     }
 
+    @ApiOperation("事件部门统计")
+    @PostMapping("/getEventDeptStatistics")
+    public R getEventDeptStatistics(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
+        // 默认数据权限,传deptId查询本部门及以下
+        List<Map<String, Object>> resultList = centerEventReportService.getEventCountGroupByEventDept(visuForestCloudMapVO);
+        // DeptLevelUtil.getDeptLevel中deptIdu要求非空
+        if (StringUtils.isBlank(visuForestCloudMapVO.getDeptId())) {
+            visuForestCloudMapVO.setDeptId(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getDeptId()));
+        }
+        return R.ok(SpringUtils.getBean(DeptLevelUtil.class).getDeptLevel(visuForestCloudMapVO.getDeptId(), resultList, "value"));
+    }
 
     @ApiOperation("事件部门年度统计")
     @PostMapping("/getEventDeptYearStatistics")
     public R getEventDeptYearStatistics(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        List<Map<String, Object>> list = centerEventReportService.getEventDeptCountGroupByYearMonth(visuForestCloudMapVO);
-        List<List<Map<String, Object>>> dataList = new ArrayList<>();// 返回的数据
-        for (int i = 0; i < 12; i++) {
-            dataList.add(new ArrayList<>());
-        }
-        List<Map<String, Object>> series = null;
-        Map<String, Object> maps = null;
-        int dataLists = 1;
-        for (dataLists = 1; dataLists < 13; dataLists++) {
-            series = new ArrayList<>();
-
-            for (Map<String, Object> map : list) {
-                String day = MapUtils.getString(map, "day").split("-")[1];
-                Integer yue = Integer.parseInt(day);
-                if (dataLists == yue) {
-                    maps = new HashMap<>();
-                    maps.put("num", MapUtils.getString(map, "num"));
-                    maps.put("name", MapUtils.getString(map, "name"));
-                    maps.put("type", "bar");
-                    series.add(map);
-                }
-            }
-            dataList.set(dataLists - 1, series);
-        }
-        return R.ok(dataList);
+        List<Map<String, Object>> result = centerEventReportService.getEventDeptCountGroupByYearMonth(visuForestCloudMapVO);
+        return R.ok(convert2DArray(result, Arrays.asList("day", "num", "name")));
     }
 
     @ApiOperation("事件分布热力图")
     @PostMapping("/getHeatMap")
     public R getHeatMap(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        List<Map<String, Object>> latLngs = centerEventReportService.getEventLatLng(visuForestCloudMapVO);
-        List<List<String>> result = new ArrayList<>();
-        List<String> latLng = null;
-        for (Map<String, Object> map : latLngs) {
-            latLng = new ArrayList<>();
-            latLng.add(MapUtils.getString(map, "latitude"));
-            latLng.add(MapUtils.getString(map, "longitude"));
-            latLng.add("1");
-            result.add(latLng);
-        }
-        return R.ok(result);
+        List<Map<String, Object>> result = centerEventReportService.getEventLatLng(visuForestCloudMapVO);
+        return R.ok(convert2DArray(result, Arrays.asList("latitude", "longitude", "num")));
     }
 
     @ApiOperation("事件状态统计")
@@ -218,9 +196,47 @@ public class CenterEventReportController extends BaseController {
         return R.ok(centerEventReportService.getEventCountGroupByEventStatus(visuForestCloudMapVO));
     }
 
-    @ApiOperation("事件部门统计")
-    @PostMapping("/getEventDeptStatistics")
-    public R getEventDeptStatistics(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
-        return R.ok(centerEventReportService.getEventCountGroupByEventDept(visuForestCloudMapVO));
+    @ApiOperation("事件来源统计")
+    @PostMapping("/getEventSourceStatistics")
+    public R getEventSourceStatistics(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
+        return R.ok(centerEventReportService.getEventCountGroupByReportSource(visuForestCloudMapVO));
+    }
+
+    @ApiOperation("事件告警情况统计")
+    @PostMapping("/getEventGjnums")
+    public R getEventGjnumsMap(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
+        // 查询当月的事件数量  累计告警数
+        Map<String, Object> params = new HashMap<>();
+        params.put("eventCode", "eventCode");
+        params.put("noteventStatus", Arrays.asList("forest_event_status_3", "forest_event_status_4"));
+        visuForestCloudMapVO.setParamsHashmap(params);
+        int num2 = centerEventReportService.getEventGjnumsMap(visuForestCloudMapVO);
+        // 查询当日的事件数量  今日告警数
+        params.put("day", "day");
+        visuForestCloudMapVO.setParamsHashmap(params);
+        int num1 = centerEventReportService.getEventGjnumsMap(visuForestCloudMapVO);
+        // 查询当月的事件涉及的部门的个数  涉及部门
+        params.clear();
+        params.put("eventdept", "eventdept");
+        visuForestCloudMapVO.setParamsHashmap(params);
+        int num3 = centerEventReportService.getEventGjnumsMap(visuForestCloudMapVO);
+        // 查询当月的告事件涉及的事件小类的类型数量  告警种类数
+        params.clear();
+        params.put("eventTypeXl", "eventTypeXl");
+        visuForestCloudMapVO.setParamsHashmap(params);
+        int num4 = centerEventReportService.getEventGjnumsMap(visuForestCloudMapVO);
+        // 返回参数
+        Map<String, Integer> resultMap = new HashMap<>();
+        resultMap.put("num1", num1);
+        resultMap.put("num2", num2);
+        resultMap.put("num3", num3);
+        resultMap.put("num4", num4);
+        return R.ok(resultMap);
+    }
+
+    @ApiOperation("事件列表")
+    @PostMapping("/selectEventList")
+    public R selectEventList(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
+        return R.ok(centerEventReportService.selectEventList(visuForestCloudMapVO));
     }
 }

+ 8 - 1
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CenterEventViewController.java

@@ -17,6 +17,12 @@ import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import static com.ruoyi.common.core.utils.DataConvertUtil.completionDate;
+
 /**
  * @program: sooka
  * @description: 事件中心-可视化控制器
@@ -65,7 +71,8 @@ public class CenterEventViewController extends BaseController {
     @PostMapping("/selectEventByCalendar")
     public R selectEventByCalendar(@RequestBody VisuForestCloudMapVO visuForestCloudMapVO) {
         getParam(visuForestCloudMapVO);
-        return R.ok(centerEventViewService.selectEventByCalendar(visuForestCloudMapVO));
+        List<Map<String, Object>> result = centerEventViewService.selectEventByCalendar(visuForestCloudMapVO);
+        return R.ok(completionDate(result, Arrays.asList(), "day", "daycount"));
     }
 
     @ApiOperation("查询曝光台列表")

+ 3 - 5
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CentereventTEventcatalogueController.java

@@ -35,8 +35,6 @@ import com.sooka.sponest.monitor.api.domain.CenterdataTAidevicedept;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -74,9 +72,9 @@ public class CentereventTEventcatalogueController extends BaseController {
     @Autowired
     private ICentereventTDownloadsService centereventTDownloadsService;
 
-    @Autowired
-    @Qualifier("asyncTaskExecutor")
-    private ThreadPoolTaskExecutor asyncTaskExecutor;
+//    @Autowired
+//    @Qualifier("asyncTaskExecutor")
+//    private ThreadPoolTaskExecutor asyncTaskExecutor;
 
     /**
      * 查询事件目录列表

+ 10 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/FireIncidentController.java

@@ -6,8 +6,11 @@ import com.dahuatech.icc.exception.ClientException;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.DaHuaEventBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.sensor.SensorEventVo;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.tower.TowerEventVo;
 import com.sooka.sponest.event.centereventteventcatalogue.service.AlarmEventService;
 import com.sooka.sponest.event.centereventtreportmessage.domain.CentereventTReportmessage;
 import com.sooka.sponest.event.centereventtreportmessage.service.ICentereventTReportmessageService;
@@ -40,6 +43,7 @@ public class FireIncidentController {
      * @param sensorEventVo
      * @return R
      */
+    @Log(title = "事件上报", businessType = BusinessType.INSERT)
     @PostMapping("/insertSensorEvent")
     public R insertSensorEvent(@RequestBody SensorEventVo sensorEventVo) {
         String eventCode = null;
@@ -82,6 +86,12 @@ public class FireIncidentController {
         if (StringUtils.isNull(centereventTReportmessage)) {
             return AjaxResult.success("参数异常");
         }
+        if (centereventTReportmessage.getSource().contains("铁塔")) {
+            // 解析报文
+            JSONObject jsonObject = JSONObject.parseObject(centereventTReportmessage.getContext());
+            TowerEventVo towerEventVo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), TowerEventVo.class);
+            return AjaxResult.success(alarmEventService.updateFireEventImage(towerEventVo, eventBO.getLogId()));
+        }
         // 解析报文
         JSONObject context = JSONObject.parseObject(centereventTReportmessage.getContext()).getJSONObject("info");
         eventBO.setAlarmCode(context.getString("alarmCode"));

+ 10 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/CentereventTEventcatalogue.java

@@ -192,6 +192,8 @@ public class CentereventTEventcatalogue extends BaseBusinessEntity {
 
     private String isExamine;// 是否审核
 
+    private String isPush;// 是否推送
+
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date gdTime;// 归档时间
 
@@ -425,6 +427,14 @@ public class CentereventTEventcatalogue extends BaseBusinessEntity {
         this.isExamine = isExamine;
     }
 
+    public String getIsPush() {
+        return isPush;
+    }
+
+    public void setIsPush(String isPush) {
+        this.isPush = isPush;
+    }
+
     public void setStatusFlag(String statusFlag) {
         this.statusFlag = statusFlag;
     }

+ 1 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestCloudMapEventListBO.java

@@ -46,4 +46,5 @@ public class VisuForestCloudMapEventListBO {
     private String cameraCode;
 
     private String isExamine;
+    private String eventTypeName;
 }

+ 7 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestEventTodayEventListBO.java

@@ -32,5 +32,12 @@ public class VisuForestEventTodayEventListBO {
     String pictureSource;
 
     String pictureType;
+
     String eventTypeXl;
+
+    String eventTypeXlLabel;
+
+    String address;
+
+    String cameraCode;
 }

+ 69 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/dahua/BayonetInfoVO.java

@@ -0,0 +1,69 @@
+package com.sooka.sponest.event.centereventteventcatalogue.domain.dahua;
+
+import com.sooka.sponest.monitor.api.domain.CenterdataTCamera;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Map;
+
+@Data
+public class BayonetInfoVO {
+
+    private String chnId;
+
+    private String orgName;
+
+    private String alarmPictureSize;
+
+    private String nodeCode;
+
+    private String deviceCode;
+
+    private String alarmCode;
+
+    private String alarmPicture;
+
+    private Long nodeType;
+
+    private Long alarmDate;
+
+    private String deviceName;
+
+    private Long alarmGrade;
+
+    private Boolean isSave;
+
+    private Map<String, Object> extend;
+
+    private Long unitSeq;
+
+    private Long unitType;
+
+    private String alarmType;
+
+    private Long channelSeq;
+
+    private String orgCode;
+
+    private String channelName;
+
+    private Long alarmStat;
+
+    private Boolean event;
+
+    private Boolean isEvent;
+
+    public String toString(CenterdataTCamera centerdataTCamera) {
+        String toString = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE)
+//                .append("行政区:", centerdataTCamera.getCameraName())
+                .append("瞭望塔:", getChannelName())
+//                .append("方向:", getDirection())
+//                .append("距离:", getDistance())
+//                .append("高程:", getHeight())
+                .append("经度:", centerdataTCamera.getLongitude())
+                .append("纬度:", centerdataTCamera.getLatitude())
+                .toString().replaceAll("=", "");
+        return toString.substring(1, toString.length() - 1);
+    }
+}

+ 15 - 1
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/dahua/DaHuaFireEventVO.java

@@ -3,6 +3,8 @@ package com.sooka.sponest.event.centereventteventcatalogue.domain.dahua;
 import lombok.Data;
 
 import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 @Data
 public class DaHuaFireEventVO {
@@ -25,18 +27,30 @@ public class DaHuaFireEventVO {
     /**
      * 报文内容
      */
-    private InfoVO info;
+    private Map<String, Object> info;
 
     /**
      * 子系统名称
      */
     private String subsystem;
 
+    private List<Long> userIds;
+
+    private String sid;
+
     /**
      * 域ID-级联消息下级发给mac时需要带上
      */
     private String domainId;
 
+    private String infoArray;
+
+    private String protocol;
+
+    private String supplementFlag;
+
+    private String uuid;
+
     /**
      * 创建时间
      */

+ 80 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/tower/TowerEventVo.java

@@ -0,0 +1,80 @@
+package com.sooka.sponest.event.centereventteventcatalogue.domain.tower;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+@Data
+public class TowerEventVo {
+
+    private String alarmBody;
+
+    private String eventLatitude;
+
+    private String frontAlarmPicUrl;
+
+    private String regionName;
+
+    private String warningOrderId;
+
+    private String tilt;
+
+    private String alarmCode;
+
+    private String deviceName;
+
+    private String deviceLatitude;
+
+    private String regionCode;
+
+    private String originalPictureUrl;
+
+    private String alarmPictureUrl;
+
+    private String pan;
+
+    private String channelCode;
+
+    private String eventLongitude;
+
+    private String address;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date alarmTime;
+
+    private String frontAlarmVedioUrl;
+
+    private String zoom;
+
+    private String deviceCode;
+
+    private String alarmType;
+
+    private String alarmVideoUrl;
+
+    private String presetName;
+
+    private String channelName;
+
+    private String location;
+
+    private String deviceLongitude;
+
+    private String presetId;
+
+    public String toString() {
+        String toString = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE)
+                .append("行政区:", getRegionName())
+                .append("瞭望塔:", getChannelName())
+//                .append("方向:", getDirection(getAngle()))
+//                .append("距离:", getStr(getDistance()))
+//                .append("高程:", getStr(getElevation()))
+                .append("经度:", getEventLongitude())
+                .append("纬度:", getEventLatitude())
+                .toString().replaceAll("=", "");
+        return toString.substring(1, toString.length() - 1);
+    }
+}

+ 0 - 2
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/vo/AppEventSalVO.java

@@ -12,8 +12,6 @@ public class AppEventSalVO extends BaseBusinessEntity {
 
     private String endTime;
 
-    private String pid;
-
     private String eventType;
 
     private String eventStatusValue;

+ 17 - 3
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/vo/VisuForestCloudMapVO.java

@@ -3,7 +3,9 @@ package com.sooka.sponest.event.centereventteventcatalogue.domain.vo;
 import com.ruoyi.common.datascope.base.domain.BaseBusinessEntity;
 import lombok.Data;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @Data
 public class VisuForestCloudMapVO extends BaseBusinessEntity {
@@ -11,6 +13,8 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
     // 通用参数
     private String day;// 日期,yyyy-mm-dd
 
+    private Long diff;// 日期差
+
     private String[] eventTypeIdDl;// 事件大类
 
     private String[] eventTypeId;// 事件小类101
@@ -20,10 +24,9 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
     private String isHgj;// 是否行管局
 
 
-    // 日历
+    // 日历-月
     private List<String> yearMonth;
 
-
     // 事件列表
     private String eventName;
 
@@ -42,7 +45,7 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
 
     // APP 事件列表
     private String eventStatusValue;
-
+    private String isExamine;// 是否审核
     // APP 事件详情
     private String eventCode;
 
@@ -50,4 +53,15 @@ public class VisuForestCloudMapVO extends BaseBusinessEntity {
     private List<String> eventStatus;
 
     private String templateType;
+    /**
+     * 请求参数
+     */
+    Map<String, Object> paramsHashmap = new HashMap();
+    /**
+     * 上报来源
+     */
+    private String reportSource;
+
+    private List<String> eventTypeXls;
+
 }

+ 12 - 7
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/mapper/CenterEventReportMapper.java

@@ -1,7 +1,6 @@
 package com.sooka.sponest.event.centereventteventcatalogue.mapper;
 
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudCalendarBO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudEventTypeBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudMapEventListBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 
 import java.util.List;
@@ -15,9 +14,9 @@ import java.util.Map;
  */
 public interface CenterEventReportMapper {
 
-    List<Map<String, Object>> getEventTotal(VisuForestCloudMapVO visuForestCloudMapVO);
+    int getEventTotal(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudEventTypeBO> getEventCountGroupByReportSource(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getEventCountGroupByReportSource(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventCountGroupByEventTypeXl(VisuForestCloudMapVO visuForestCloudMapVO);
 
@@ -27,21 +26,27 @@ public interface CenterEventReportMapper {
 
     List<Map<String, Object>> getEventCountGroupByFireRisk(VisuForestCloudMapVO visuForestCloudMapVO);
 
+    List<Map<String, Object>> getEventCountGroupByFireInsurance(VisuForestCloudMapVO visuForestCloudMapVO);
+
     List<Map<String, Object>> getEventCountGroupByFireType(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventInfoList(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudEventTypeBO> getAIEventCountGroupByReportor(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getAIEventCountGroupByReportor(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudCalendarBO> getEventCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getEventCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventTypeCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
 
+    List<Map<String, Object>> getEventCountGroupByEventDept(VisuForestCloudMapVO visuForestCloudMapVO);
+
     List<Map<String, Object>> getEventDeptCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventLatLng(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventCountGroupByEventStatus(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<Map<String, Object>> getEventCountGroupByEventDept(VisuForestCloudMapVO visuForestCloudMapVO);
+    int getEventGjnumsMap(VisuForestCloudMapVO visuForestCloudMapVO);
+
+    List<VisuForestCloudMapEventListBO> selectEventList(VisuForestCloudMapVO visuForestCloudMapVO);
 }

+ 7 - 4
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/mapper/CenterEventViewMapper.java

@@ -1,6 +1,9 @@
 package com.sooka.sponest.event.centereventteventcatalogue.mapper;
 
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.*;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudExposureStageBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudMapEventListBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudTodayEventsBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestEventTodayEventListBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 
 import java.util.List;
@@ -16,19 +19,19 @@ public interface CenterEventViewMapper {
 
     List<VisuForestCloudTodayEventsBO> selectTodayEvents(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudMapDeptEventCountBO> selectDeptEventCount(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> selectDeptEventCount(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestCloudMapEventListBO> selectEventList(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestCloudMapEventListBO> getEventFile(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudCalendarBO> selectEventByCalendar(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> selectEventByCalendar(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestCloudExposureStageBO> selectExposureStage(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventByEventType(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudEventTypeBO> getEventByReportorOrder(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getEventByReportorOrder(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestEventTodayEventListBO> getNearEvent(VisuForestCloudMapVO visuForestCloudMapVO);
 

+ 7 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/AlarmEventService.java

@@ -7,6 +7,7 @@ import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.DaHuaOthe
 import com.sooka.sponest.event.centereventteventcatalogue.domain.haikang.EventsVo;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.haikang.HaiKangEventVo;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.sensor.SensorEventVo;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.tower.TowerEventVo;
 
 public interface AlarmEventService {
 
@@ -26,6 +27,12 @@ public interface AlarmEventService {
     // 大华5300事件
     String insertDaHuaOtherEvent(DaHuaOtherEventVO daHuaOtherEventVO);
 
+    // 铁塔事件
+    String insertTowerEvent(TowerEventVo towerEventVo);
+
+    // 铁塔事件-图片回查
+    String updateFireEventImage(TowerEventVo towerEventVo, String logId);
+
 
     // 传感器事件
     String insertSensorEvent(SensorEventVo sensorEventVo);

+ 12 - 7
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/ICenterEventReportService.java

@@ -1,7 +1,6 @@
 package com.sooka.sponest.event.centereventteventcatalogue.service;
 
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudCalendarBO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudEventTypeBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudMapEventListBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 
 import java.util.List;
@@ -15,9 +14,9 @@ import java.util.Map;
  */
 public interface ICenterEventReportService {
 
-    List<Map<String, Object>> getEventTotal(VisuForestCloudMapVO visuForestCloudMapVO);
+    int getEventTotal(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudEventTypeBO> getEventCountGroupByReportSource(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getEventCountGroupByReportSource(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventCountGroupByEventTypeXl(VisuForestCloudMapVO visuForestCloudMapVO);
 
@@ -27,21 +26,27 @@ public interface ICenterEventReportService {
 
     List<Map<String, Object>> getEventCountGroupByFireRisk(VisuForestCloudMapVO visuForestCloudMapVO);
 
+    List<Map<String, Object>> getEventCountGroupByFireInsurance(VisuForestCloudMapVO visuForestCloudMapVO);
+
     List<Map<String, Object>> getEventCountGroupByFireType(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventInfoList(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudEventTypeBO> getAIEventCountGroupByReportor(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getAIEventCountGroupByReportor(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudCalendarBO> getEventCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getEventCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventTypeCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
 
+    List<Map<String, Object>> getEventCountGroupByEventDept(VisuForestCloudMapVO visuForestCloudMapVO);
+
     List<Map<String, Object>> getEventDeptCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventLatLng(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventCountGroupByEventStatus(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<Map<String, Object>> getEventCountGroupByEventDept(VisuForestCloudMapVO visuForestCloudMapVO);
+    int getEventGjnumsMap(VisuForestCloudMapVO visuForestCloudMapVO);
+
+    List<VisuForestCloudMapEventListBO> selectEventList(VisuForestCloudMapVO visuForestCloudMapVO);
 }

+ 7 - 4
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/ICenterEventViewService.java

@@ -1,6 +1,9 @@
 package com.sooka.sponest.event.centereventteventcatalogue.service;
 
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.*;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudExposureStageBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudMapEventListBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudTodayEventsBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestEventTodayEventListBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 
 import java.util.List;
@@ -16,19 +19,19 @@ public interface ICenterEventViewService {
 
     VisuForestCloudTodayEventsBO selectTodayEvents(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudMapDeptEventCountBO> selectDeptEventCount(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> selectDeptEventCount(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestCloudMapEventListBO> selectEventList(VisuForestCloudMapVO visuForestCloudMapVO);
 
     Map<String, Object> getEventDetail(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudCalendarBO> selectEventByCalendar(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> selectEventByCalendar(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestCloudExposureStageBO> selectExposureStage(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<Map<String, Object>> getEventByEventType(VisuForestCloudMapVO visuForestCloudMapVO);
 
-    List<VisuForestCloudEventTypeBO> getEventByReportorOrder(VisuForestCloudMapVO visuForestCloudMapVO);
+    List<Map<String, Object>> getEventByReportorOrder(VisuForestCloudMapVO visuForestCloudMapVO);
 
     List<VisuForestEventTodayEventListBO> getNearEvent(VisuForestCloudMapVO visuForestCloudMapVO);
 

+ 231 - 15
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/AlarmEventServiceImpl.java

@@ -14,12 +14,11 @@ import com.sooka.sponest.event.centereventtdeptevent.domain.CentereventDeptEvent
 import com.sooka.sponest.event.centereventtdeptevent.service.ICentereventDeptEventService;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.CentereventTEventcatalogue;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.DaHuaEventBO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.DaHuaFireEventVO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.DaHuaOtherEventVO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.PictureVO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.*;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.haikang.EventsVo;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.haikang.HaiKangEventVo;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.sensor.SensorEventVo;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.tower.TowerEventVo;
 import com.sooka.sponest.event.centereventteventcatalogue.service.AlarmEventService;
 import com.sooka.sponest.event.centereventteventcatalogue.service.ICentereventTEventcatalogueService;
 import com.sooka.sponest.event.centereventteventtype.domain.CentereventTEventtype;
@@ -28,16 +27,22 @@ import com.sooka.sponest.event.centereventtfirelog.domain.CentereventTFireLog;
 import com.sooka.sponest.event.centereventtfirelog.service.ICentereventTFireLogService;
 import com.sooka.sponest.event.remoteapi.RemoteDataService;
 import com.sooka.sponest.event.remoteapi.domain.CenterdataTAttach;
+import com.sooka.sponest.event.utils.GWHttpUtilsTest65;
 import com.sooka.sponest.event.utils.RemoteApiUtil;
 import com.sooka.sponest.monitor.api.RemoteMonitorService;
 import com.sooka.sponest.monitor.api.domain.CenterdataTAidevicedept;
 import com.sooka.sponest.monitor.api.domain.CenterdataTCamera;
+import org.apache.commons.collections4.MapUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.client.RestTemplate;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -69,6 +74,9 @@ public class AlarmEventServiceImpl implements AlarmEventService {
     @Value("${sooka.dahuaservice.detail}")
     private String detailUrl;
 
+    @Value("${sooka.supermap.datasetUrl}")
+    private String datasetUrl;
+
     static final String ERROR_MSG_CHANNEL = "无法匹配相关设备!通道编号为:{}";
 
     static final String ERROR_MSG_DEPT = "无法匹配相关部门!摄像头编号为:{}";
@@ -186,6 +194,10 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         centereventTEventcatalogue.setIsUrged(SYS_ISURGE_2);//sys_isurge_2
         centereventTEventcatalogue.setEventStatus("上报");
         centereventTEventcatalogue.setEventStatusValue(FOREST_EVENT_STATUS_1);//forest_event_status_1
+        // 自动研判误报,218工程车、222区域入侵、237违章建筑
+        if ("218".equals(centereventTEventcatalogue.getEventTypeXl()) || "222".equals(centereventTEventcatalogue.getEventTypeXl()) || "237".equals(centereventTEventcatalogue.getEventTypeXl())) {
+            test(centereventTEventcatalogue);
+        }
         centereventTEventcatalogue.setCreateBy(centerdataTCamera.getId());
         centereventTEventcatalogue.setCreateName(centerdataTCamera.getCameraName());
         centereventTEventcatalogue.setCreateTime(null == createTime ? DateUtils.getNowDate() : createTime);
@@ -193,6 +205,41 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         return centereventTEventcatalogue;
     }
 
+    private void test(CentereventTEventcatalogue centereventTEventcatalogue) {
+        try {
+            HttpHeaders headers = new HttpHeaders();
+            headers.setContentType(MediaType.APPLICATION_JSON);
+            for (String url : datasetUrl.split(";")) {
+                JSONObject requestBody = JSONObject.parseObject("{" +
+                        "\"getFeatureMode\": \"SPATIAL\"," +
+                        "\"datasetNames\": " + url.split("&datasetNames=")[1] + "," +
+                        "\"geometry\": {" +
+                        "\"id\": 0," +
+                        "\"style\": null," +
+                        "\"parts\": [1]," +
+                        "\"points\": [{" +
+                        "\"y\": " + Double.parseDouble(centereventTEventcatalogue.getLatitude()) + "," +
+                        "\"x\": " + Double.parseDouble(centereventTEventcatalogue.getLongitude()) +
+                        "}]," +
+                        "\"type\": \"POINT\"}," +
+                        "\"spatialQueryMode\": \"INTERSECT\"" +
+                        "}");
+                HttpEntity<JSONObject> entity = new HttpEntity<>(requestBody, headers);
+                RestTemplate restTemplate = new RestTemplate();
+                JSONObject result = restTemplate.postForEntity(url.split("&datasetNames=")[0], entity, JSONObject.class).getBody();
+                logger.info(result.toJSONString());
+                // {"features":[],"featureUriList":[],"datasetInfos":[],"totalCount":0,"featureCount":0}
+                if (result.getLong("totalCount") != 0 && result.getLong("featureCount") != 0) {
+                    centereventTEventcatalogue.setEventStatus("误报");
+                    centereventTEventcatalogue.setEventStatusValue("forest_event_status_3");
+                    break;
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
+
     // 事件部门
     private void insertEventDept(CentereventTEventcatalogue centereventTEventcatalogue, List<CenterdataTAidevicedept> listDept) {
         listDept.forEach(item -> {
@@ -229,19 +276,23 @@ public class AlarmEventServiceImpl implements AlarmEventService {
     @Transactional
     @Override
     public String insertDaHuaEvent(DaHuaFireEventVO daHuaFireEventVO) {
-        Long type = daHuaFireEventVO.getInfo().getAlarmType();
+        Long type = MapUtils.getLong(daHuaFireEventVO.getInfo(), "alarmType");
         // 313:烟雾,5122:热感
         if (type == 313 || type == 5122) {
             return insertFireEvent(daHuaFireEventVO);
+        } else if (type == 302 || type == 303 || type == 962 || type == 963 || type == 964 || type == 965) {
+            // 302:绊线入侵,303:区域入侵 ,962:人穿越警戒线,963:机动车穿越警戒线,964:人穿越区域,965:机动车穿越区域
+            return insertBayonetEvent(daHuaFireEventVO);
         }
         return "";
     }
 
     public String insertFireEvent(DaHuaFireEventVO daHuaFireEventVO) {
+        InfoVO infoVO = JSONObject.parseObject(JSON.toJSONString(daHuaFireEventVO.getInfo()), InfoVO.class);
         // 验证是否配置摄像头通道
-        CenterdataTCamera centerdataTCamera = SpringUtils.getBean(RemoteMonitorService.class).getInfoByChannelCode(daHuaFireEventVO.getInfo().getChannelSn()).getData();
+        CenterdataTCamera centerdataTCamera = SpringUtils.getBean(RemoteMonitorService.class).getInfoByChannelCode(infoVO.getChannelSn()).getData();
         if (StringUtils.isNull(centerdataTCamera)) {
-            logger.info(ERROR_MSG_CHANNEL, daHuaFireEventVO.getInfo().getChannelSn());
+            logger.info(ERROR_MSG_CHANNEL, infoVO.getChannelSn());
             return "";
         }
         // 验证是否配置指挥中心
@@ -251,12 +302,13 @@ public class AlarmEventServiceImpl implements AlarmEventService {
             return "";
         }
         // 事件目录
-        String eventName = daHuaFireEventVO.getInfo().getChannelName() + daHuaFireEventVO.getInfo().getAlarmDateStr() + daHuaFireEventVO.getInfo().getAlarmTypeName();
-        String eventDescription = daHuaFireEventVO.getInfo().toString(centerdataTCamera);
-        String longitude = StringUtils.isEmpty(daHuaFireEventVO.getInfo().getFirePoint()) ? centerdataTCamera.getLongitude() : daHuaFireEventVO.getInfo().getFirePoint()[0].getGpsX();
-        String latitude = StringUtils.isEmpty(daHuaFireEventVO.getInfo().getFirePoint()) ? centerdataTCamera.getLatitude() : daHuaFireEventVO.getInfo().getFirePoint()[0].getGpsY();
-        String reportor = daHuaFireEventVO.getInfo().getDeviceName();
-        Date reportTime = DateUtils.timestampToTime(daHuaFireEventVO.getInfo().getAlarmDate());
+        //四平市双辽市卧虎镇贺家村热感应 + 2024-01-05 10:32:54 + 火情报警
+        String eventName = infoVO.getChannelName() + infoVO.getAlarmDateStr() + infoVO.getAlarmTypeName();
+        String eventDescription = infoVO.toString(centerdataTCamera);
+        String longitude = StringUtils.isEmpty(infoVO.getFirePoint()) ? centerdataTCamera.getLongitude() : infoVO.getFirePoint()[0].getGpsX();
+        String latitude = StringUtils.isEmpty(infoVO.getFirePoint()) ? centerdataTCamera.getLatitude() : infoVO.getFirePoint()[0].getGpsY();
+        String reportor = infoVO.getDeviceName();
+        Date reportTime = DateUtils.timestampToTime(infoVO.getAlarmDate());
         String address = centerdataTCamera.getCameraRegion();
         CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue("1", null, eventName, eventDescription, longitude, latitude, reportor, reportTime, address);
         centereventTEventcatalogue = this.insertEventCatalogue(centereventTEventcatalogue, centerdataTCamera, daHuaFireEventVO.getCreateTime());
@@ -264,8 +316,8 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         this.insertEventDept(centereventTEventcatalogue, listDept);
         // 事件日志
         String logId = this.insertEventLog(centereventTEventcatalogue);
-        if (StringUtils.isNotBlank(daHuaFireEventVO.getInfo().getPicture())) {
-            String[] pictures = daHuaFireEventVO.getInfo().getPicture().split(",");
+        if (StringUtils.isNotBlank(infoVO.getPicture())) {
+            String[] pictures = infoVO.getPicture().split(",");
             for (String picture : pictures) {
                 CenterdataTAttach tAttach = new CenterdataTAttach();
                 tAttach.setBusId(logId);
@@ -279,6 +331,55 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         return centereventTEventcatalogue.getEventCode();
     }
 
+    private String insertBayonetEvent(DaHuaFireEventVO daHuaFireEventVO) {
+        BayonetInfoVO infoVO = JSONObject.parseObject(JSON.toJSONString(daHuaFireEventVO.getInfo()), BayonetInfoVO.class);
+        // 验证是否配置摄像头
+        List<CenterdataTCamera> centerdataTCameras = SpringUtils.getBean(RemoteMonitorService.class).selectCameraByDepIdGong(new CenterdataTCamera(null, infoVO.getDeviceName())).getData();
+        if (StringUtils.isEmpty(centerdataTCameras) || 1 != centerdataTCameras.size()) {
+            logger.info("无法匹配相关设备!摄像头为:{}", infoVO.getDeviceName());
+            return "";
+        }
+        // 验证是否配置指挥中心
+        CenterdataTCamera centerdataTCamera = centerdataTCameras.get(0);
+        List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).listForCommandCenter(centerdataTCamera.getId(), "1", "1").getData();
+        if (StringUtils.isEmpty(listDept)) {
+            logger.info(ERROR_MSG_DEPT, centerdataTCamera.getCameraCode());
+            return "";
+        }
+        // 验证事件类型是否配置对应报文码值--只能从数据库配
+        CentereventTEventtype centereventTEventtype = centereventTEventtypeService.selectCentereventTEventtypeByCode(infoVO.getAlarmType());
+        if (StringUtils.isNull(centereventTEventtype)) {
+            logger.info("无法匹配相关事件!报文码值为:{}", infoVO.getAlarmType());
+            return "";
+        }
+        // 事件目录
+        String eventType = centereventTEventtype.getParentId();
+        String eventTypeXl = centereventTEventtype.getId();
+        String eventName = infoVO.getChannelName() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, new Date(infoVO.getAlarmDate() * 1000)) + centereventTEventtype.getEventTypeName();
+        String eventDescription = infoVO.toString(centerdataTCamera);
+        String longitude = centerdataTCamera.getLongitude();
+        String latitude = centerdataTCamera.getLatitude();
+        String reportor = centerdataTCamera.getCameraName();
+        Date reportTime = DateUtils.timestampToTime(infoVO.getAlarmDate() * 1000);
+        String address = centerdataTCamera.getCameraRegion();
+        CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue(eventType, eventTypeXl, eventName, eventDescription, longitude, latitude, reportor, reportTime, address);
+        centereventTEventcatalogue = this.insertEventCatalogue(centereventTEventcatalogue, centerdataTCamera, daHuaFireEventVO.getCreateTime());
+        // 事件部门
+        this.insertEventDept(centereventTEventcatalogue, listDept);
+        // 事件日志
+        String logId = this.insertEventLog(centereventTEventcatalogue);
+        if (StringUtils.isNotBlank(infoVO.getAlarmPicture())) {
+            CenterdataTAttach tAttach = new CenterdataTAttach();
+            tAttach.setBusId(logId);
+            tAttach.setAttachPath(infoVO.getAlarmPicture());
+            tAttach.setBusIndx(BUS_INDEX_2);
+            tAttach.setBusSource("DH_1");
+            tAttach.setFileType(FILE_TYPE_1);
+            remoteDataService.insertAttach(tAttach);
+        }
+        return centereventTEventcatalogue.getEventCode();
+    }
+
     @Override
     public String updateFireEventImage(DaHuaEventBO eventBO) throws ClientException {
         // 通过eventCode查询详情
@@ -322,6 +423,7 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         return "请刷新后重试";
     }
 
+    @Transactional
     @Override
     public String insertDaHuaOtherEvent(DaHuaOtherEventVO daHuaOtherEventVO) {
         // 验证是否配置摄像头通道
@@ -345,7 +447,7 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         // 事件目录
         String eventType = centereventTEventtype.getParentId();
         String eventTypeXl = centereventTEventtype.getId();
-        String eventName = centerdataTCamera.getCameraName() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, DateUtils.timestampToTime(daHuaOtherEventVO.getOccurrenceTime())) + daHuaOtherEventVO.getAlarmName();
+        String eventName = centerdataTCamera.getCameraName() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, DateUtils.timestampToTime(daHuaOtherEventVO.getOccurrenceTime())) + centereventTEventtype.getEventTypeName();
         String eventDescription = daHuaOtherEventVO.toString();
         String longitude = daHuaOtherEventVO.getLongitude();
         String latitude = daHuaOtherEventVO.getLatitude();
@@ -375,6 +477,120 @@ public class AlarmEventServiceImpl implements AlarmEventService {
 
     @Transactional
     @Override
+    public String insertTowerEvent(TowerEventVo towerEventVo) {
+        // 验证是否配置摄像头
+        CenterdataTCamera centerdataTCamera = SpringUtils.getBean(RemoteMonitorService.class).getCameraByChinaTowerDeviceCode(towerEventVo.getDeviceCode());
+        if (StringUtils.isNull(centerdataTCamera)) {
+            logger.info("无法匹配相关设备!铁塔摄像头为:{}", towerEventVo.getDeviceCode());
+            return "";
+        }
+        // 验证是否配置指挥中心
+        List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).listForCommandCenter(centerdataTCamera.getId(), "1", "1").getData();
+        if (StringUtils.isEmpty(listDept)) {
+            logger.info(ERROR_MSG_DEPT, towerEventVo.getDeviceCode());
+            return "";
+        }
+        // 验证事件类型是否配置对应报文码值--只能从数据库配
+        CentereventTEventtype centereventTEventtype = centereventTEventtypeService.selectCentereventTEventtypeByCodeTower(towerEventVo.getAlarmType());
+        if (StringUtils.isNull(centereventTEventtype)) {
+            logger.info("无法匹配相关事件!报文码值为:{}", towerEventVo.getAlarmType());
+            return "";
+        }
+        // 事件目录
+        String eventType = centereventTEventtype.getParentId();
+        String eventTypeXl = centereventTEventtype.getId();
+        String eventName = towerEventVo.getDeviceName() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, towerEventVo.getAlarmTime()) + centereventTEventtype.getEventTypeName();
+        String eventDescription = towerEventVo.toString();
+        String longitude = towerEventVo.getEventLongitude();
+        String latitude = towerEventVo.getEventLatitude();
+        String reportor = towerEventVo.getDeviceName();
+        Date reportTime = towerEventVo.getAlarmTime();
+        String address = towerEventVo.getAddress();
+        CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue(eventType, eventTypeXl, eventName, eventDescription, longitude, latitude, reportor, reportTime, address);
+        centereventTEventcatalogue = this.insertEventCatalogue(centereventTEventcatalogue, centerdataTCamera, null);
+        // 事件部门
+        this.insertEventDept(centereventTEventcatalogue, listDept);
+        // 事件日志
+        String logId = this.insertEventLog(centereventTEventcatalogue);
+        String orderCode = SpringUtils.getBean(RemoteMonitorService.class).getOrderCodeByChinaTowerDeviceCode(towerEventVo.getDeviceCode());
+        if (StringUtils.isNotBlank(towerEventVo.getOriginalPictureUrl())) {
+            String[] pictures = towerEventVo.getOriginalPictureUrl().split(",");
+            for (String picture : pictures) {
+                CenterdataTAttach tAttach = new CenterdataTAttach();
+                tAttach.setBusId(logId);
+                tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(picture, orderCode));
+                tAttach.setBusIndx(BUS_INDEX_2);
+                tAttach.setBusSource("TT_1");
+                tAttach.setFileType(FILE_TYPE_1);
+                remoteDataService.insertAttach(tAttach);
+            }
+        }
+        if (StringUtils.isNotBlank(towerEventVo.getAlarmPictureUrl())) {
+            String[] pictures = towerEventVo.getAlarmPictureUrl().split(",");
+            for (String picture : pictures) {
+                CenterdataTAttach tAttach = new CenterdataTAttach();
+                tAttach.setBusId(logId);
+                tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(picture, orderCode));
+                tAttach.setBusIndx(BUS_INDEX_2);
+                tAttach.setBusSource("TT_1");
+                tAttach.setFileType(FILE_TYPE_1);
+                remoteDataService.insertAttach(tAttach);
+            }
+        }
+        if (StringUtils.isNotBlank(towerEventVo.getAlarmVideoUrl())) {
+            CenterdataTAttach tAttach = new CenterdataTAttach();
+            tAttach.setBusId(logId);
+            tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(towerEventVo.getAlarmVideoUrl(), orderCode));
+            tAttach.setBusIndx(BUS_INDEX_2);
+            tAttach.setBusSource("TT_1");
+            tAttach.setFileType(FILE_TYPE_2);
+            remoteDataService.insertAttach(tAttach);
+        }
+        return centereventTEventcatalogue.getEventCode();
+    }
+
+    @Override
+    public String updateFireEventImage(TowerEventVo towerEventVo, String logId) {
+        List<CenterdataTAttach> attachList = new ArrayList<>();
+        String orderCode = SpringUtils.getBean(RemoteMonitorService.class).getOrderCodeByChinaTowerDeviceCode(towerEventVo.getDeviceCode());
+        if (StringUtils.isNotBlank(towerEventVo.getOriginalPictureUrl())) {
+            String[] pictures = towerEventVo.getOriginalPictureUrl().split(",");
+            for (String picture : pictures) {
+                CenterdataTAttach tAttach = new CenterdataTAttach();
+                tAttach.setBusId(logId);
+                tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(picture, orderCode));
+                tAttach.setBusIndx(BUS_INDEX_2);
+                tAttach.setBusSource("TT_1");
+                tAttach.setFileType(FILE_TYPE_1);
+                attachList.add(tAttach);
+            }
+        }
+        if (StringUtils.isNotBlank(towerEventVo.getAlarmPictureUrl())) {
+            String[] pictures = towerEventVo.getAlarmPictureUrl().split(",");
+            for (String picture : pictures) {
+                CenterdataTAttach tAttach = new CenterdataTAttach();
+                tAttach.setBusId(logId);
+                tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(picture, orderCode));
+                tAttach.setBusIndx(BUS_INDEX_2);
+                tAttach.setBusSource("TT_1");
+                tAttach.setFileType(FILE_TYPE_1);
+                attachList.add(tAttach);
+            }
+        }
+        if (StringUtils.isNotBlank(towerEventVo.getAlarmVideoUrl())) {
+            CenterdataTAttach tAttach = new CenterdataTAttach();
+            tAttach.setBusId(logId);
+            tAttach.setAttachPath(GWHttpUtilsTest65.encrypt(towerEventVo.getAlarmVideoUrl(), orderCode));
+            tAttach.setBusIndx(BUS_INDEX_2);
+            tAttach.setBusSource("TT_1");
+            tAttach.setFileType(FILE_TYPE_2);
+            attachList.add(tAttach);
+        }
+        return remoteDataService.delAndInsertBatch(JSON.toJSONString(attachList)).getMsg();
+    }
+
+    @Transactional
+    @Override
     public String insertSensorEvent(SensorEventVo sensorEventVo) {
         // 验证是否配置指挥中心
         List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).listForCommandCenter(sensorEventVo.getSensorId(), "1", "1").getData();

+ 0 - 1
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventAppServiceImpl.java

@@ -97,7 +97,6 @@ public class CenterEventAppServiceImpl extends BaseService implements ICenterEve
         sal.setEventCode(appEventSalBO.getEventCode());
         Map<String, Object> asl = centereventTFireEventService.getYuAnByEventCode(sal);
         if (StringUtils.isNotNull(asl) && StringUtils.isNotBlank(MapUtils.getString(asl, FILE_PREFIX_LOCAL))) {
-//            asl.put(FILE_PREFIX_LOCAL, keyMap.get(FILE_PREFIX_APP) + MapUtils.getString(asl, FILE_PREFIX_LOCAL));
             StringBuilder newDiles = new StringBuilder();
             String url = MapUtils.getString(asl, FILE_PREFIX_LOCAL);
             String name = MapUtils.getString(asl, "fileName");

+ 33 - 42
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventReportServiceImpl.java

@@ -2,17 +2,16 @@ package com.sooka.sponest.event.centereventteventcatalogue.service.impl;
 
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.datascope.base.service.BaseService;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudCalendarBO;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudEventTypeBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudMapEventListBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 import com.sooka.sponest.event.centereventteventcatalogue.mapper.CenterEventReportMapper;
 import com.sooka.sponest.event.centereventteventcatalogue.service.ICenterEventReportService;
-import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.*;
-import java.util.stream.Collectors;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 事件中心-大数据Service业务层处理
@@ -28,14 +27,14 @@ public class CenterEventReportServiceImpl extends BaseService implements ICenter
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<Map<String, Object>> getEventTotal(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public int getEventTotal(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
         return centerEventReportMapper.getEventTotal(visuForestCloudMapVO);
     }
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<VisuForestCloudEventTypeBO> getEventCountGroupByReportSource(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public List<Map<String, Object>> getEventCountGroupByReportSource(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
         return centerEventReportMapper.getEventCountGroupByReportSource(visuForestCloudMapVO);
     }
@@ -70,6 +69,13 @@ public class CenterEventReportServiceImpl extends BaseService implements ICenter
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
+    public List<Map<String, Object>> getEventCountGroupByFireInsurance(VisuForestCloudMapVO visuForestCloudMapVO) {
+        setSookaDataBase(visuForestCloudMapVO);
+        return centerEventReportMapper.getEventCountGroupByFireInsurance(visuForestCloudMapVO);
+    }
+
+    @DataScopeMutiDept(deptAlias = "c")
+    @Override
     public List<Map<String, Object>> getEventCountGroupByFireType(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
         return centerEventReportMapper.getEventCountGroupByFireType(visuForestCloudMapVO);
@@ -91,52 +97,30 @@ public class CenterEventReportServiceImpl extends BaseService implements ICenter
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<VisuForestCloudEventTypeBO> getAIEventCountGroupByReportor(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public List<Map<String, Object>> getAIEventCountGroupByReportor(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
         return centerEventReportMapper.getAIEventCountGroupByReportor(visuForestCloudMapVO);
     }
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<VisuForestCloudCalendarBO> getEventCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public List<Map<String, Object>> getEventCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
-        List<VisuForestCloudCalendarBO> result = centerEventReportMapper.getEventCountGroupByYearMonth(visuForestCloudMapVO);
-        // 提取已存在的年-月
-        List<String> originDate = result.stream().map(VisuForestCloudCalendarBO::getDay).collect(Collectors.toList());
-        // 获取不存在的年-月
-        List<String> newDate = visuForestCloudMapVO.getYearMonth().stream().filter(o -> !originDate.contains(o)).collect(Collectors.toList());
-        newDate.forEach(date -> {
-            VisuForestCloudCalendarBO visuForestCloudCalendarBO = new VisuForestCloudCalendarBO();
-            visuForestCloudCalendarBO.setDay(date);
-            visuForestCloudCalendarBO.setDaycount(0L);
-            result.add(visuForestCloudCalendarBO);
-        });
-        // 排序
-        Collections.sort(result, (o1, o2) -> o1.getDay().compareTo(o2.getDay()));
-        return result;
+        return centerEventReportMapper.getEventCountGroupByYearMonth(visuForestCloudMapVO);
     }
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
     public List<Map<String, Object>> getEventTypeCountGroupByYearMonth(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
-        List<Map<String, Object>> result = centerEventReportMapper.getEventTypeCountGroupByYearMonth(visuForestCloudMapVO);
-        // 提取已存在的年-月
-        List<String> originDate = new ArrayList<>();
-        result.forEach(item -> originDate.add(MapUtils.getString(item, "day")));
-        // 获取不存在的年-月
-        List<String> newDate = visuForestCloudMapVO.getYearMonth().stream().filter(o -> !originDate.contains(o)).collect(Collectors.toList());
-        newDate.forEach(date -> {
-            Map<String, Object> map = new HashMap<>();
-            map.put("day", date);
-            for (String eventType : visuForestCloudMapVO.getEventTypeId()) {
-                map.put(eventType, 0);
-            }
-            result.add(map);
-        });
-        // 排序
-        Collections.sort(result, (o1, o2) -> MapUtils.getString(o1, "day").compareTo(MapUtils.getString(o2, "day")));
-        return result;
+        return centerEventReportMapper.getEventTypeCountGroupByYearMonth(visuForestCloudMapVO);
+    }
+
+    @DataScopeMutiDept(deptAlias = "c")
+    @Override
+    public List<Map<String, Object>> getEventCountGroupByEventDept(VisuForestCloudMapVO visuForestCloudMapVO) {
+        setSookaDataBase(visuForestCloudMapVO);
+        return centerEventReportMapper.getEventCountGroupByEventDept(visuForestCloudMapVO);
     }
 
     @DataScopeMutiDept(deptAlias = "c")
@@ -162,8 +146,15 @@ public class CenterEventReportServiceImpl extends BaseService implements ICenter
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<Map<String, Object>> getEventCountGroupByEventDept(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public int getEventGjnumsMap(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
-        return centerEventReportMapper.getEventCountGroupByEventDept(visuForestCloudMapVO);
+        return centerEventReportMapper.getEventGjnumsMap(visuForestCloudMapVO);
+    }
+
+    @DataScopeMutiDept(deptAlias = "c")
+    @Override
+    public List<VisuForestCloudMapEventListBO> selectEventList(VisuForestCloudMapVO visuForestCloudMapVO) {
+        setSookaDataBase(visuForestCloudMapVO);
+        return centerEventReportMapper.selectEventList(visuForestCloudMapVO);
     }
 }

+ 8 - 15
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventViewServiceImpl.java

@@ -7,7 +7,10 @@ import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.datascope.base.service.BaseService;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.CentereventTEventcatalogue;
-import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.*;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudExposureStageBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudMapEventListBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudTodayEventsBO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestEventTodayEventListBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.vo.VisuForestCloudMapVO;
 import com.sooka.sponest.event.centereventteventcatalogue.mapper.CenterEventViewMapper;
 import com.sooka.sponest.event.centereventteventcatalogue.service.ICenterEventViewService;
@@ -88,7 +91,7 @@ public class CenterEventViewServiceImpl extends BaseService implements ICenterEv
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<VisuForestCloudMapDeptEventCountBO> selectDeptEventCount(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public List<Map<String, Object>> selectDeptEventCount(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
         return centerEventViewMapper.selectDeptEventCount(visuForestCloudMapVO);
     }
@@ -186,19 +189,9 @@ public class CenterEventViewServiceImpl extends BaseService implements ICenterEv
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<VisuForestCloudCalendarBO> selectEventByCalendar(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public List<Map<String, Object>> selectEventByCalendar(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
-        List<VisuForestCloudCalendarBO> result = centerEventViewMapper.selectEventByCalendar(visuForestCloudMapVO);
-        List<String> originDate = result.stream().map(VisuForestCloudCalendarBO::getDay).collect(Collectors.toList());
-        List<String> newDate = visuForestCloudMapVO.getYearMonth().stream().filter(o -> !originDate.contains(o)).collect(Collectors.toList());
-        VisuForestCloudCalendarBO visuForestCloudCalendarBO = null;
-        for (String date : newDate) {
-            visuForestCloudCalendarBO = new VisuForestCloudCalendarBO();
-            visuForestCloudCalendarBO.setDay(date);
-            visuForestCloudCalendarBO.setDaycount(0L);
-            result.add(visuForestCloudCalendarBO);
-        }
-        return result;
+        return centerEventViewMapper.selectEventByCalendar(visuForestCloudMapVO);
     }
 
     @DataScopeMutiDept(deptAlias = "c")
@@ -217,7 +210,7 @@ public class CenterEventViewServiceImpl extends BaseService implements ICenterEv
 
     @DataScopeMutiDept(deptAlias = "c")
     @Override
-    public List<VisuForestCloudEventTypeBO> getEventByReportorOrder(VisuForestCloudMapVO visuForestCloudMapVO) {
+    public List<Map<String, Object>> getEventByReportorOrder(VisuForestCloudMapVO visuForestCloudMapVO) {
         setSookaDataBase(visuForestCloudMapVO);
         return centerEventViewMapper.getEventByReportorOrder(visuForestCloudMapVO);
     }

+ 4 - 3
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CentereventTEventcatalogueServiceImpl.java

@@ -168,14 +168,14 @@ public class CentereventTEventcatalogueServiceImpl extends BaseService implement
     public int addCentereventTEventcatalogue(CentereventTEventcatalogue centereventTEventcatalogue) {
         String eventCode = IdUtils.fastSimpleUUID();
         CentereventTFireLog centereventTFireLog = new CentereventTFireLog();
-        centereventTEventcatalogue.setId(IdUtils.fastSimpleUUID());
+        centereventTEventcatalogue.setId(eventCode);
         centereventTEventcatalogue.setEventCode(eventCode);
         if (StringUtils.isEmpty(centereventTEventcatalogue.getReportSource())) {
             centereventTEventcatalogue.setReportSource("reporting_source_2");
             centereventTFireLog.setOperationType(LOG_OPER_TYPE_1);
         } else {
             //APP上报图片
-            centereventTFireLog.setOperationType("log_oper_type_2");
+            centereventTFireLog.setOperationType(LOG_OPER_TYPE_2);
         }
         centereventTEventcatalogue.setReportor(SecurityUtils.getLoginUser().getSysUser().getNickName());
         centereventTEventcatalogue.setReportTime(new Date());
@@ -232,6 +232,7 @@ public class CentereventTEventcatalogueServiceImpl extends BaseService implement
         centereventDeptEvent.setDeptHandleType("dept_handleType_2");
         centereventDeptEvent.setCreateBy(SecurityUtils.getUserId().toString());
         centereventDeptEvent.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+        centereventDeptEvent.setCreateTime(centereventTEventcatalogue.getCreateTime());
         centereventDeptEventService.insertCentereventTDeptEvent(centereventDeptEvent);
 //        if (StringUtils.isNotEmpty(centereventTEventcatalogue.getHgjDeptId())) {
 //            centereventDeptEvent.setId(IdUtils.fastSimpleUUID());
@@ -559,7 +560,7 @@ public class CentereventTEventcatalogueServiceImpl extends BaseService implement
         centereventTLog.setLatitude(centereventTEventcatalogue.getLatitude());
         centereventTLog.setLongitude(centereventTEventcatalogue.getLongitude());
         if ("APP".equals(centereventtDeptEventBO.getCzlx())) {
-            centereventTLog.setOperationType("log_oper_type_2");
+            centereventTLog.setOperationType(LOG_OPER_TYPE_2);
         } else {
             centereventTLog.setOperationType(LOG_OPER_TYPE_1);
         }

+ 26 - 3
src/main/java/com/sooka/sponest/event/centereventteventtype/controller/CentereventTEventtypeController.java

@@ -40,9 +40,30 @@ public class CentereventTEventtypeController extends BaseController {
     public TableDataInfo list(CentereventTEventtype centereventTEventtype) {
         startPage();
         List<CentereventTEventtype> list = centereventTEventtypeService.selectCentereventTEventtypeList(centereventTEventtype);
+        for (CentereventTEventtype type : list) {
+            dateChange(type);
+        }
         return getDataTable(list);
     }
 
+    private void dateChange(CentereventTEventtype type) {
+        long reminderTimeDay = Long.parseLong(type.getReminderTime()) / 1440;
+        long reminderTimeHour = (Long.parseLong(type.getReminderTime()) % 1440) / 60;
+        long reminderTimeMinute = (Long.parseLong(type.getReminderTime()) % 1440) % 60;
+        type.setReminderTimeDay(String.valueOf(reminderTimeDay));
+        type.setReminderTimeHour(String.valueOf(reminderTimeHour));
+        type.setReminderTimeMinute(String.valueOf(reminderTimeMinute));
+        String reminderTime;
+        if (reminderTimeDay != 0) {
+            reminderTime = reminderTimeDay + "天" + reminderTimeHour + "时" + reminderTimeMinute + "分";
+        } else if (reminderTimeHour != 0) {
+            reminderTime = reminderTimeHour + "时" + reminderTimeMinute + "分";
+        } else {
+            reminderTime = reminderTimeMinute + "分";
+        }
+        type.setReminderTime(reminderTime);
+    }
+
     /**
      * 查询事件类型列表
      */
@@ -70,7 +91,9 @@ public class CentereventTEventtypeController extends BaseController {
     @RequiresPermissions("eventtype:eventtype:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return AjaxResult.success(centereventTEventtypeService.selectCentereventTEventtypeById(id));
+        CentereventTEventtype type = centereventTEventtypeService.selectCentereventTEventtypeById(id);
+        dateChange(type);
+        return AjaxResult.success(type);
     }
 
     /**
@@ -81,7 +104,7 @@ public class CentereventTEventtypeController extends BaseController {
     @PostMapping
     public AjaxResult add(@RequestBody CentereventTEventtype centereventTEventtype) {
         int num = centereventTEventtypeService.insertCentereventTEventtype(centereventTEventtype);
-        if (num == 0){
+        if (num == 0) {
             return AjaxResult.error("催办时间不能为0!");
         }
         return AjaxResult.success();
@@ -95,7 +118,7 @@ public class CentereventTEventtypeController extends BaseController {
     @PutMapping
     public AjaxResult edit(@RequestBody CentereventTEventtype centereventTEventtype) {
         int num = centereventTEventtypeService.updateCentereventTEventtype(centereventTEventtype);
-        if (num == 0){
+        if (num == 0) {
             return AjaxResult.error("催办时间不能为0!");
         }
         return AjaxResult.success();

+ 11 - 3
src/main/java/com/sooka/sponest/event/centereventteventtype/mapper/CentereventTEventtypeMapper.java

@@ -39,6 +39,14 @@ public interface CentereventTEventtypeMapper {
     CentereventTEventtype selectCentereventTEventtypeByCode(String code);
 
     /**
+     * 查询事件类型
+     *
+     * @param code 事件类型编码
+     * @return 事件类型
+     */
+    CentereventTEventtype selectCentereventTEventtypeByCodeTower(String code);
+
+    /**
      * 新增事件类型
      *
      * @param centereventTEventtype 事件类型
@@ -63,14 +71,14 @@ public interface CentereventTEventtypeMapper {
     int deleteCentereventTEventtypeByIds(String[] ids);
 
     /**
-     *查询事件类型树结构
+     * 查询事件类型树结构
      *
      * @author hanfucheng
      * @date 2023/4/10 10:53
      */
-    List<Map<String,Object>> getCentereventTEventtypeTree();
-    List<Map<String,Object>> getCentereventTEventtypeTreeLx(CentereventTEventtype centereventTEventtype);
+    List<Map<String, Object>> getCentereventTEventtypeTree();
 
+    List<Map<String, Object>> getCentereventTEventtypeTreeLx(CentereventTEventtype centereventTEventtype);
 
 
     long getReminderTimeById(CentereventTEventcatalogue centereventTEventcatalogue);

+ 10 - 1
src/main/java/com/sooka/sponest/event/centereventteventtype/service/ICentereventTEventtypeService.java

@@ -33,12 +33,20 @@ public interface ICentereventTEventtypeService {
     /**
      * 查询事件类型
      *
-     * @param id 事件类型主键
+     * @param code 事件类型主键
      * @return 事件类型
      */
     CentereventTEventtype selectCentereventTEventtypeByCode(String code);
 
     /**
+     * 查询事件类型
+     *
+     * @param code 事件类型主键
+     * @return 事件类型
+     */
+    CentereventTEventtype selectCentereventTEventtypeByCodeTower(String code);
+
+    /**
      * 新增事件类型
      *
      * @param centereventTEventtype 事件类型
@@ -69,6 +77,7 @@ public interface ICentereventTEventtypeService {
      * @date 2023/4/10 10:53
      */
     List<Map<String, Object>> getCentereventTEventtypeTree();
+
     List<Map<String, Object>> getCentereventTEventtypeTreeLx(CentereventTEventtype centereventTEventtype);
 
     long getReminderTimeById(CentereventTEventcatalogue centereventTEventcatalogue);

+ 13 - 26
src/main/java/com/sooka/sponest/event/centereventteventtype/service/impl/CentereventTEventtypeServiceImpl.java

@@ -38,29 +38,7 @@ public class CentereventTEventtypeServiceImpl implements ICentereventTEventtypeS
      */
     @Override
     public List<CentereventTEventtype> selectCentereventTEventtypeList(CentereventTEventtype centereventTEventtype) {
-        List<CentereventTEventtype> list = centereventTEventtypeMapper.selectCentereventTEventtypeList(centereventTEventtype);
-        for (CentereventTEventtype type : list) {
-            dateChange(type);
-        }
-        return list;
-    }
-
-    private void dateChange(CentereventTEventtype type) {
-        long reminderTimeDay = Long.parseLong(type.getReminderTime()) / 1440;
-        long reminderTimeHour = (Long.parseLong(type.getReminderTime()) % 1440) / 60;
-        long reminderTimeMinute = (Long.parseLong(type.getReminderTime()) % 1440) % 60;
-        type.setReminderTimeDay(String.valueOf(reminderTimeDay));
-        type.setReminderTimeHour(String.valueOf(reminderTimeHour));
-        type.setReminderTimeMinute(String.valueOf(reminderTimeMinute));
-        String reminderTime;
-        if (reminderTimeDay != 0) {
-            reminderTime = reminderTimeDay + "天" + reminderTimeHour + "时" + reminderTimeMinute + "分";
-        } else if (reminderTimeHour != 0) {
-            reminderTime = reminderTimeHour + "时" + reminderTimeMinute + "分";
-        } else {
-            reminderTime = reminderTimeMinute + "分";
-        }
-        type.setReminderTime(reminderTime);
+        return centereventTEventtypeMapper.selectCentereventTEventtypeList(centereventTEventtype);
     }
 
     /**
@@ -71,9 +49,7 @@ public class CentereventTEventtypeServiceImpl implements ICentereventTEventtypeS
      */
     @Override
     public CentereventTEventtype selectCentereventTEventtypeById(String id) {
-        CentereventTEventtype type = centereventTEventtypeMapper.selectCentereventTEventtypeById(id);
-        dateChange(type);
-        return type;
+        return centereventTEventtypeMapper.selectCentereventTEventtypeById(id);
     }
 
     /**
@@ -88,6 +64,17 @@ public class CentereventTEventtypeServiceImpl implements ICentereventTEventtypeS
     }
 
     /**
+     * 查询事件类型
+     *
+     * @param code 事件类型编码
+     * @return 事件类型
+     */
+    @Override
+    public CentereventTEventtype selectCentereventTEventtypeByCodeTower(String code) {
+        return centereventTEventtypeMapper.selectCentereventTEventtypeByCodeTower(code);
+    }
+
+    /**
      * 新增事件类型
      *
      * @param centereventTEventtype 事件类型

+ 1 - 1
src/main/java/com/sooka/sponest/event/centereventteventtypemapdept/controller/CentereventTEventtypemapdeptController.java

@@ -35,7 +35,7 @@ public class CentereventTEventtypemapdeptController extends BaseController {
     @Autowired
     private ICentereventTEventtypemapdeptService centereventTEventtypemapdeptService;
 
-    private final static Map<Long, String> deptTypeMap = new HashMap();
+    private static final Map<Long, String> deptTypeMap = new HashMap();
 
     static {
         deptTypeMap.put(367L, "sys_dept_type_16");// 市林业局

+ 8 - 21
src/main/java/com/sooka/sponest/event/centereventtforestfireloss/controller/CentereventTForestFireLossController.java

@@ -1,7 +1,6 @@
 package com.sooka.sponest.event.centereventtforestfireloss.controller;
 
 import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.event.centereventtfireinformation.domain.FireInformation;
@@ -11,15 +10,10 @@ import com.sooka.sponest.event.centereventtforestfireloss.service.ICentereventTF
 import com.sooka.sponest.event.centereventtregionalflag.service.ICentereventTRegionalFlagService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -46,20 +40,8 @@ public class CentereventTForestFireLossController extends BaseController {
     @PostMapping("/getFireLoss")
     public R getFireLoss(@RequestBody VisuForestFireLossVO visuForestFireLossVO) {
         Map<String, Object> resultMap = new HashMap<>();
-        if (StringUtils.isBlank(visuForestFireLossVO.getId())) {
-            resultMap.put("visuForestFireLossBO", centereventTForestFireLossService.getFireLoss(visuForestFireLossVO));
-            List<Map<String, Object>> list = centereventTForestFireLossService.getFireList(visuForestFireLossVO);
-            resultMap.put("visuForestFireLossTimeBOList", list);
-            if (StringUtils.isNotEmpty(list)) {
-                visuForestFireLossVO.setYear(null);
-                visuForestFireLossVO.setId(MapUtils.getString(list.get(0), "id"));
-                resultMap.put("visuForestFireLossBOFirst", centereventTForestFireLossService.getFireLoss(visuForestFireLossVO));
-                resultMap.put("regionalFlagBOList", centereventTRegionalFlagService.getFireLocation(MapUtils.getString(list.get(0), "eventId")));
-            }
-        } else {
-            resultMap.put("visuForestFireLossBO", centereventTForestFireLossService.getFireLoss(visuForestFireLossVO));
-            resultMap.put("regionalFlagBOList", centereventTRegionalFlagService.getFireLocation(visuForestFireLossVO.getEventId()));
-        }
+        resultMap.put("visuForestFireLossBO", centereventTForestFireLossService.getFireLoss(visuForestFireLossVO));
+        resultMap.put("regionalFlagBOList", centereventTRegionalFlagService.getFireRegion(visuForestFireLossVO.getFireType(), visuForestFireLossVO.getYear()));
         return R.ok(resultMap);
     }
 
@@ -68,4 +50,9 @@ public class CentereventTForestFireLossController extends BaseController {
     public AjaxResult addFireInformationFeign(@RequestBody FireInformation fireInformation) {
         return toAjax(centereventTFireInformationService.addFireInformation(fireInformation));
     }
+
+    @GetMapping("/getFireRegion")
+    public R getFireRegion(String fireType, String year) {
+        return R.ok(centereventTRegionalFlagService.getFireRegion(fireType, year));
+    }
 }

+ 1 - 3
src/main/java/com/sooka/sponest/event/centereventtforestfireloss/domain/VisuForestFireLossVO.java

@@ -8,7 +8,5 @@ public class VisuForestFireLossVO extends BaseBusinessEntity {
 
     private String year;
 
-    private String id;
-
-    private String eventId;
+    private String fireType;
 }

+ 0 - 4
src/main/java/com/sooka/sponest/event/centereventtforestfireloss/mapper/CentereventTForestFireLossMapper.java

@@ -3,7 +3,6 @@ package com.sooka.sponest.event.centereventtforestfireloss.mapper;
 import com.sooka.sponest.event.centereventtforestfireloss.domain.ForestFireLoss;
 import com.sooka.sponest.event.centereventtforestfireloss.domain.VisuForestFireLossVO;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -17,8 +16,5 @@ public interface CentereventTForestFireLossMapper {
     // 新增火险报告(森林火灾损失)
     int addForestFireLoss(ForestFireLoss forestFireLoss);
 
-
     Map<String, Object> getFireLoss(VisuForestFireLossVO visuForestFireLossVO);
-
-    List<Map<String, Object>> getFireList(VisuForestFireLossVO visuForestFireLossVO);
 }

+ 0 - 3
src/main/java/com/sooka/sponest/event/centereventtforestfireloss/service/ICentereventTForestFireLossService.java

@@ -3,7 +3,6 @@ package com.sooka.sponest.event.centereventtforestfireloss.service;
 import com.sooka.sponest.event.centereventtforestfireloss.domain.ForestFireLoss;
 import com.sooka.sponest.event.centereventtforestfireloss.domain.VisuForestFireLossVO;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -19,6 +18,4 @@ public interface ICentereventTForestFireLossService {
 
 
     Map<String, Object> getFireLoss(VisuForestFireLossVO visuForestFireLossVO);
-
-    List<Map<String, Object>> getFireList(VisuForestFireLossVO visuForestFireLossVO);
 }

+ 0 - 9
src/main/java/com/sooka/sponest/event/centereventtforestfireloss/service/impl/CentereventTForestFireLossServiceImpl.java

@@ -10,7 +10,6 @@ import com.sooka.sponest.event.centereventtforestfireloss.service.ICentereventTF
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -32,18 +31,10 @@ public class CentereventTForestFireLossServiceImpl extends BaseService implement
         return centereventTForestFireLossMapper.addForestFireLoss(forestFireLoss);
     }
 
-
     @DataScopeMutiDept(deptAlias = "d")
     @Override
     public Map<String, Object> getFireLoss(VisuForestFireLossVO visuForestFireLossVO) {
         setSookaDataBase(visuForestFireLossVO);
         return centereventTForestFireLossMapper.getFireLoss(visuForestFireLossVO);
     }
-
-    @DataScopeMutiDept(deptAlias = "d")
-    @Override
-    public List<Map<String, Object>> getFireList(VisuForestFireLossVO visuForestFireLossVO) {
-        setSookaDataBase(visuForestFireLossVO);
-        return centereventTForestFireLossMapper.getFireList(visuForestFireLossVO);
-    }
 }

+ 2 - 2
src/main/java/com/sooka/sponest/event/centereventtregionalflag/mapper/CentereventTRegionalFlagMapper.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.event.centereventtregionalflag.mapper;
 
 import com.sooka.sponest.event.centereventtregionalflag.domain.RegionalFlag;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -16,6 +17,5 @@ public interface CentereventTRegionalFlagMapper {
     // 新增区域标记
     int addRegionalFlag(RegionalFlag regionalFlag);
 
-
-    List<Map<String, Object>> getFireLocation(String eventId);
+    List<Map<String, Object>> getFireRegion(@Param("fireType") String fireType, @Param("year") String year);
 }

+ 1 - 1
src/main/java/com/sooka/sponest/event/centereventtregionalflag/service/ICentereventTRegionalFlagService.java

@@ -11,5 +11,5 @@ import java.util.Map;
  */
 public interface ICentereventTRegionalFlagService {
 
-    List<Map<String, Object>> getFireLocation(String eventId);
+    List<Map<String, Object>> getFireRegion(String fireType, String year);
 }

+ 2 - 2
src/main/java/com/sooka/sponest/event/centereventtregionalflag/service/impl/CentereventTRegionalFlagServiceImpl.java

@@ -21,7 +21,7 @@ public class CentereventTRegionalFlagServiceImpl implements ICentereventTRegiona
     private CentereventTRegionalFlagMapper centereventTRegionalFlagMapper;
 
     @Override
-    public List<Map<String, Object>> getFireLocation(String eventId) {
-        return centereventTRegionalFlagMapper.getFireLocation(eventId);
+    public List<Map<String, Object>> getFireRegion(String fireType, String year) {
+        return centereventTRegionalFlagMapper.getFireRegion(fireType, year);
     }
 }

+ 5 - 21
src/main/java/com/sooka/sponest/event/index/controller/IndexController.java

@@ -14,8 +14,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.time.LocalDate;
-import java.util.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Api(tags = "首页事件统计")
 @RestController
@@ -54,27 +55,10 @@ public class IndexController extends BaseController {
     }
 
     /**
-     * 系统运行报告-事件统计
-     */
-    @GetMapping("/runReport")
-    public R runReport(@RequestParam(value = "timeArr", required = false) List<String> timeArr) {
-        Map<String, Object> resultMap = eventReport(timeArr).getData();
-        LocalDate today = LocalDate.now();
-        String start = today.withMonth(1).withDayOfMonth(1).toString();
-        Map<String, Object> tempMap = eventReport(Arrays.asList(start, today.toString())).getData();
-        Iterator<Map.Entry<String, Object>> iterator = tempMap.entrySet().iterator();
-        while (iterator.hasNext()) {
-            Map.Entry<String, Object> entry = iterator.next();
-            resultMap.put(entry.getKey() + "Year", entry.getValue());
-        }
-        return R.ok(resultMap);
-    }
-
-    /**
-     * 使用情况报告-事件统计
+     * 系统报告-事件统计
      */
     @GetMapping("/eventReport")
-    public R<Map<String, Object>> eventReport(@RequestParam(value = "timeArr", required = false) List<String> timeArr) {
+    public R eventReport(@RequestParam(value = "timeArr", required = false) List<String> timeArr) {
         Map<String, Object> resultMap = new HashMap<>();
         Long countqr = 0L;
         Long countcl = 0L;

+ 7 - 7
src/main/java/com/sooka/sponest/event/test/ScheduleTask.java

@@ -1,6 +1,6 @@
 package com.sooka.sponest.event.test;
 
-import com.ruoyi.common.core.utils.DateUtils;
+/*import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
@@ -12,11 +12,11 @@ import com.sooka.sponest.event.centereventteventcatalogue.service.ICentereventTE
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Autowired;*/
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
-import java.security.SecureRandom;
+/*import java.security.SecureRandom;*/
 
 /**
  * @author lyq
@@ -26,7 +26,7 @@ import java.security.SecureRandom;
 @EnableScheduling
 public class ScheduleTask {
 
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+    /*private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
     @Autowired
     private ICentereventTEventcatalogueService centereventTEventcatalogueService;
@@ -34,9 +34,9 @@ public class ScheduleTask {
     @Autowired
     private ICentereventDeptEventService centereventDeptEventService;
 
-    /**
+    *//**
      * 定时任务 MQ-ES数据同步测试
-     */
+     *//*
 //    @Scheduled(fixedRate = 200)
     private void mqtest() {
         // 读取缓存
@@ -108,5 +108,5 @@ public class ScheduleTask {
             }
             logger.info("---新增{},修改{}---", insertNo, updateNo);
         }
-    }
+    }*/
 }

+ 5 - 2
src/main/java/com/sooka/sponest/event/test/TestController.java

@@ -1,10 +1,12 @@
 package com.sooka.sponest.event.test;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.DaHuaFireEventVO;
+import com.sooka.sponest.event.centereventteventcatalogue.domain.dahua.InfoVO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -25,8 +27,9 @@ public class TestController extends BaseController {
         long start = System.currentTimeMillis();
         try {
             DaHuaFireEventVO daHuaFireEventVO = JSONObject.parseObject(jsonStr, DaHuaFireEventVO.class);
-            String eventName = daHuaFireEventVO.getInfo().getChannelName() + daHuaFireEventVO.getInfo().getAlarmDateStr() + daHuaFireEventVO.getInfo().getAlarmTypeName();
-            Date reportTime = DateUtils.timestampToTime(daHuaFireEventVO.getInfo().getAlarmDate());
+            InfoVO infoVO = JSONObject.parseObject(JSON.toJSONString(daHuaFireEventVO.getInfo()), InfoVO.class);
+            String eventName = infoVO.getChannelName() + infoVO.getAlarmDateStr() + infoVO.getAlarmTypeName();
+            Date reportTime = DateUtils.timestampToTime(infoVO.getAlarmDate());
             double diff = (DateUtils.timestampToTime(start).getTime() - reportTime.getTime()) / 1000;// 计算时间差,单位为秒
             if (180 < diff) {
                 logger.info("===事件名称:" + eventName + ",===超时推送:" + diff);

+ 1 - 1
src/main/java/com/sooka/sponest/event/urge/EventSocketAdapter.java

@@ -18,7 +18,7 @@ public class EventSocketAdapter extends MessageListenerAdapter {
 
     @Override
     public void onMessage(Message message, byte[] pattern) {
-        logger.info(String.format("redis Message Received on channel {0} message :: {1}", new String(message.getChannel()), message.toString()));
+        logger.info(String.format("redis Message Received on channel %s message :: %s", new String(message.getChannel()), message.toString()));
         // 转换消息为对象
         CentereventTEventcatalogue eventcatalogue = JSONObject.parseObject(message.toString(), CentereventTEventcatalogue.class);
         // 开始循环当前服务的用户集合

+ 2 - 0
src/main/java/com/sooka/sponest/event/utils/EventConstants.java

@@ -34,6 +34,7 @@ public class EventConstants {
 
     // 日志操作类型
     public static final String LOG_OPER_TYPE_1 = "log_oper_type_1";
+    public static final String LOG_OPER_TYPE_2 = "log_oper_type_2";
     public static final String LOG_OPER_TYPE_3 = "log_oper_type_3";// AI反馈
 
     // 附件索引
@@ -43,6 +44,7 @@ public class EventConstants {
 
     // 文件类型
     public static final String FILE_TYPE_1 = "image";
+    public static final String FILE_TYPE_2 = "video";
 
     // 文件前缀
     public static final String FILE_PREFIX_LOCAL = "fileUrl";

+ 191 - 0
src/main/java/com/sooka/sponest/event/utils/GWHttpUtilsTest65.java

@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.sooka.sponest.event.utils;
+
+import cn.hutool.core.util.HexUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @Description: demo.
+ * @Author: newland
+ * 发生订购鉴权失败时请先仔细阅读一下内容:
+ * 首先可以让运管这边推送订购关系,由你们提供接收接口,运管可以进行订购关系推送
+ * 然后由于新接入的平台,没有订单关系,所以目前运管这边采取的是推送其他平台的订单
+ * 在这样的情况下,AK,SK,仍然是使用你们自己的,但是 appCode 则需要使用该订单本身的 appCode,不然网关这边鉴权过不去
+ */
+@Slf4j
+public class GWHttpUtilsTest65 {
+
+    /**
+     * 新网关
+     */
+    static String HOST_IP = "https://sl-neimenggu.chinatowercom.cn:9997";
+
+    /**
+     * AK 由运管这边提供
+     */
+    static String AK = "012626d75ab147858ff7fdf9ea44b74d";
+
+    /**
+     * SK 由运管这边提供
+     */
+    static String SK = "dce85f55cad140498936e7832e6528ad";
+
+    /**
+     * 行业编码 由运管这边提供
+     * 当发送订购鉴权失败时,请阅读最上面的解释,然后可以向运管那边提供订单号获得该订单正确的 appCode
+     * 当调试完成后,即可换成自己的 appCode
+     */
+    static String appCode = "700002";
+
+    /**
+     * 订购客户编码,用于订购鉴权,需要一一对应
+     */
+    static String customer = "124012301";
+
+    /**
+     * 订单号,用于订购鉴权,需要一一对应
+     */
+//    static String orderCode = "PO124012301202504047918802915328";
+//    static String orderCode = "PO124012301202503303260509147136";
+
+    /**
+     * 用户编码,暂可以填随意值
+     */
+    static String userCode = "0a97fb806ab24ca8bc788dc6ace3d4c2";
+
+    /**
+     * 访问方法路径
+     * /devices/{deviceCode}/channels/{channelCode}/getVideoRealtimeUrl
+     * 注: 这个路径在下面要参与到 sign加密,路径前面不要加服务名,比如 boot-out
+     * 例子:路径中的{deviceCode}、{channelCode},用于订购鉴权,需要一一对应
+     */
+    static String servicePath = "/file/obsFiles/getObsEncryptUrls";
+
+
+    public static String encrypt(String path, String orderCode) {
+        // 请求参数
+        JSONObject json = new JSONObject();
+        json.put("fileUrls", path.split(","));
+        return callServer(json.toJSONString(), orderCode);
+    }
+
+    /**
+     * 服务调用
+     */
+    public static String callServer(String json, String orderCode) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        // 这里的 url是发送请求拼接url
+        String url = HOST_IP + servicePath;
+        String msgId = UUID.randomUUID().toString().replace("-", "");
+        String requestTime = dateFormat.format(new Date());
+        // 下面两步是通过 AK,SK,servicePath 等参数生产 sign
+        // 注:加密方式尽量参考本例中的加密
+        // 大部分报错 signature value is error! 都是加密失败造成的,请仔细检查 AK, SK, path 是否正确
+        String signContext = getSignContext(servicePath, AK, msgId, requestTime, customer, userCode);
+        String sign = getGenerateSign(SK, signContext);
+
+        // ********模拟请求头参数,以下参数为通用必填参数************
+        Map<String, String> headerMap = new HashMap<>();
+        headerMap.put("X-AppKey", AK);
+        headerMap.put("X-Signature", sign);
+        headerMap.put("X-MsgId", msgId);
+        headerMap.put("X-RequestTime", requestTime);
+        headerMap.put("X-CustomerCode", customer);
+        headerMap.put("X-UserCode", userCode);
+        headerMap.put("X-AppCode", appCode);
+        headerMap.put("X-OrderCode", orderCode);
+        HttpResponse response = postObject(url, json, headerMap);
+        JSONObject jsonObject = JSONObject.parseObject(response.body());
+        return jsonObject.getJSONArray("data").getJSONObject(0).getString("encryptUrl");
+    }
+
+    /**
+     * 组装 post调用的header和请求体 .
+     *
+     * @param appAddress 发送地址 .
+     * @param params     参数 .
+     * @return postObject.
+     */
+    public static HttpResponse postObject(String appAddress, String params, Map<String, String> headerMap) {
+        HttpResponse result = null;
+        try {
+            result = HttpRequest.post(appAddress)
+                    .headerMap(headerMap, true)
+                    .body(params)
+                    .timeout(30000)
+                    .execute();
+            log.info("\n请求地址{},\n返回状态:{},\n返回信息{}", appAddress, result.getStatus(), result.body());
+        } catch (Exception e) {
+            log.error("地址{},参数{},发送异常:{}", appAddress, params, e.getMessage());
+        }
+        return result;
+    }
+
+    /**
+     * 签名
+     *
+     * @param secret
+     * @param signContext
+     * @return
+     */
+    public static String getGenerateSign(final String secret, final String signContext) {
+        String sign = null;
+        try {
+            Mac hmacSha256 = Mac.getInstance("HmacSHA1");
+            byte[] keyBytes = secret.getBytes();
+            hmacSha256.init(new SecretKeySpec(keyBytes, 0, keyBytes.length, "HmacSHA1"));
+            sign = HexUtil.encodeHexStr(hmacSha256.doFinal(signContext.getBytes()));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return sign;
+    }
+
+    /**
+     * 签名字符串生成规则.
+     *
+     * @param appkey .
+     * @return 待签名字符串
+     */
+    private static String getSignContext(String path, String appkey, String msgId, String requestTime,
+                                         String customerCode, String userCode) {
+        StringBuilder append = new StringBuilder(path)
+                .append(appkey)
+                .append(msgId)
+                .append(requestTime);
+        if (customerCode != null) {
+            append.append(customerCode);
+        }
+        if (userCode != null) {
+            append.append(userCode);
+        }
+        System.out.println(append);
+        return append.toString().toUpperCase();
+    }
+}

+ 3 - 0
src/main/java/com/sooka/sponest/event/utils/RemoteApiUtil.java

@@ -152,6 +152,7 @@ public class RemoteApiUtil {
                 future.get();
             } catch (InterruptedException e) {
                 logger.error(e.getMessage());
+                Thread.currentThread().interrupt();
             } catch (ExecutionException e) {
                 logger.error(e.getMessage());
             }
@@ -178,6 +179,7 @@ public class RemoteApiUtil {
                 future.get();
             } catch (InterruptedException e) {
                 logger.error(e.getMessage());
+                Thread.currentThread().interrupt();
             } catch (ExecutionException e) {
                 logger.error(e.getMessage());
             }
@@ -231,6 +233,7 @@ public class RemoteApiUtil {
                 future.get();
             } catch (InterruptedException e) {
                 logger.error(e.getMessage());
+                Thread.currentThread().interrupt();
             } catch (ExecutionException e) {
                 logger.error(e.getMessage());
             }

+ 1 - 5
src/main/java/com/sooka/sponest/event/utils/ScheduleTaskUtil.java

@@ -1,7 +1,6 @@
 /*
 package com.sooka.sponest.event.utils;
 
-import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.redis.service.RedisService;
@@ -41,8 +40,7 @@ public class ScheduleTaskUtil {
 
     @Scheduled(cron = "0 10 0 * * ?")
     //@GetMapping("/down")
-    public void runTask() throws Exception {
-        logger.info("执行定时任务开始=>{}", DateUtils.dateTimeNow());
+    public void runTask() {
         long startMill = System.currentTimeMillis();
         // 读取缓存
         RedisService redis = SpringUtils.getBean(RedisService.class);
@@ -53,9 +51,7 @@ public class ScheduleTaskUtil {
             params.put("taskValue", "1");
             centereventTEventcatalogueService.downloadsCommon(params);
         }
-        //redis.deleteObject(DOWN_LOCK);
         redis.setCacheObject(DOWN_LOCK, (System.currentTimeMillis() - startMill), (long) 3600 * 12, TimeUnit.SECONDS);
-        logger.info("执行定时任务结束=====>{}", DateUtils.dateTimeNow());
     }
 }
 */

+ 1 - 3
src/main/resources/bootstrap.yml

@@ -3,8 +3,6 @@ server:
   port: 10003
 # Spring
 spring:
-  main:
-    allow-circular-references: true
   application:
     # 应用名称
     name: sooka-sponest-center-event
@@ -23,4 +21,4 @@ spring:
         file-extension: yml
         # 共享配置
         shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

+ 1 - 13
src/main/resources/mapper/centereventteventcatalogue/CenterEventAppMapper.xml

@@ -31,20 +31,8 @@
                     and DATEDIFF( NOW(), a.create_time ) = 0
                 </otherwise>
             </choose>
-            <if test="pid != null and pid != ''">
-                and (a.event_type_xl in (select type_xl_id from centerevent_t_eventtype_monitor where parent_id = #{pid})
-                or IF((SELECT count(1) FROM centerevent_t_eventtype_monitor WHERE parent_id = #{pid} and type_xl_id = 1) >= 1,
-                (a.event_type = 1 and a.event_status_value = 'forest_event_status_7'), 1=2))
-            </if>
             <if test="eventType != null and eventType != ''">
-                <choose>
-                    <when test="eventType == 1">
-                        and (a.event_type = #{eventType} and a.event_status_value = 'forest_event_status_7')
-                    </when>
-                    <otherwise>
-                        and a.event_type_xl = #{eventType}
-                    </otherwise>
-                </choose>
+                and a.event_type_xl = #{eventType}
             </if>
             <if test="eventName != null and eventName != ''">
                 and a.event_name like concat('%', #{eventName}, '%')

+ 198 - 38
src/main/resources/mapper/centereventteventcatalogue/CenterEventReportMapper.xml

@@ -4,9 +4,8 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sooka.sponest.event.centereventteventcatalogue.mapper.CenterEventReportMapper">
 
-    <select id="getEventTotal" parameterType="VisuForestCloudMapVO" resultType="map">
-        select '事件' name,count(*) value from (
-        select a.event_code
+    <select id="getEventTotal" parameterType="VisuForestCloudMapVO" resultType="int">
+        select count(distinct a.event_code)
         from centerevent_t_eventcatalogue a
         left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value !=
         'forest_event_status_3'
@@ -14,7 +13,10 @@
         where a.event_status_value in ('forest_event_status_2','forest_event_status_5','forest_event_status_6')
         and data_status = '0'
         <if test="day != null and day != ''">
-            and DATE_FORMAT(a.create_time,'%Y') = #{day}
+            and DATE_FORMAT(a.create_time,'%Y-%m-%d') = #{day}
+        </if>
+        <if test="diff != null">
+            and DATEDIFF( now(), a.create_time ) &lt;= #{diff}
         </if>
         <if test="eventTypeId != null and eventTypeId.length > 0">
             and event_type_xl in
@@ -22,12 +24,21 @@
                 #{eventTypeId}
             </foreach>
         </if>
-        ${params.dataScope}
-        group by a.event_code) t
+        <if test="reportSource != null and reportSource != ''">
+            and a.report_source = #{reportSource}
+        </if>
+        <choose>
+            <when test="deptId != null and deptId != ''">
+                and find_in_set( #{deptId}, concat(c.ancestors, ',', c.dept_id) )
+            </when>
+            <otherwise>
+                ${params.dataScope}
+            </otherwise>
+        </choose>
     </select>
 
     <select id="getEventCountGroupByReportSource" parameterType="VisuForestCloudMapVO"
-            resultType="VisuForestCloudEventTypeBO">
+            resultType="java.util.LinkedHashMap">
         select dict_label name,count(report_source) value
         from ${database_system}.sys_dict_data dict
         left join (
@@ -41,6 +52,9 @@
         <if test="day != null and day != ''">
             and DATE_FORMAT(a.create_time,'%Y') = #{day}
         </if>
+        <if test="diff != null">
+            and DATEDIFF( now(), a.create_time ) &lt;= #{diff}
+        </if>
         <if test="eventTypeId != null and eventTypeId.length > 0">
             and event_type_xl in
             <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
@@ -53,8 +67,9 @@
         group by dict_value
     </select>
 
-    <select id="getEventCountGroupByEventTypeXl" parameterType="VisuForestCloudMapVO" resultType="map">
-        select id,event_type_name name,count(event_type_xl) value,'列' unit
+    <select id="getEventCountGroupByEventTypeXl" parameterType="VisuForestCloudMapVO"
+            resultType="java.util.LinkedHashMap">
+        select event_type_name name,count(t.event_type_xl) value
         from centerevent_t_eventtype y
         left join (
         select event_type_xl
@@ -67,13 +82,26 @@
         <if test="day != null and day != ''">
             and DATE_FORMAT(a.create_time,'%Y') = #{day}
         </if>
+        <if test="diff != null">
+            and DATEDIFF( now(), a.create_time ) &lt;= #{diff}
+        </if>
         <if test="eventTypeId != null and eventTypeId.length > 0">
             and event_type_xl in
             <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
                 #{eventTypeId}
             </foreach>
         </if>
-        ${params.dataScope}
+        <if test="reportSource != null and reportSource != ''">
+            and a.report_source = #{reportSource}
+        </if>
+        <choose>
+            <when test="deptId != null and deptId != ''">
+                and find_in_set( #{deptId}, concat(c.ancestors, ',', c.dept_id) )
+            </when>
+            <otherwise>
+                ${params.dataScope}
+            </otherwise>
+        </choose>
         group by a.event_code) t on t.event_type_xl = y.id
         <where>
             <if test="eventTypeId != null and eventTypeId.length > 0">
@@ -87,8 +115,7 @@
     </select>
 
     <select id="getEventTypeRadar" parameterType="VisuForestCloudMapVO" resultType="map">
-        select tt.*,CEIL(MAX(value)/500)*500 max from (
-        select id,event_type_name name,count(event_type_xl) value,'列' unit
+        select event_type_name name,count(event_type_xl) value
         from centerevent_t_eventtype y
         left join (
         select event_type_xl
@@ -117,12 +144,11 @@
                 </foreach>
             </if>
         </where>
-        group by id) tt
-        group by name
+        group by id
     </select>
 
-    <select id="getEventCountGroupByFireSource" parameterType="VisuForestCloudMapVO" resultType="map">
-        select tt.*,CEIL(MAX(value)/500)*500 max from (
+    <select id="getEventCountGroupByFireSource" parameterType="VisuForestCloudMapVO"
+            resultType="java.util.LinkedHashMap">
         select fire_source name,count(*) value from (
         select fire_source from centerevent_t_fire_information a
         left join centerevent_t_eventcatalogue b on b.event_code = a.event_id
@@ -141,11 +167,10 @@
         </if>
         ${params.dataScope}
         group by a.event_id) t
-        group by fire_source) tt
-        group by name
+        group by fire_source
     </select>
 
-    <select id="getEventCountGroupByFireRisk" parameterType="VisuForestCloudMapVO" resultType="map">
+    <select id="getEventCountGroupByFireRisk" parameterType="VisuForestCloudMapVO" resultType="java.util.LinkedHashMap">
         select fire_level name,count(*) value from (
         select fire_level from centerevent_t_fire_information a
         left join centerevent_t_eventcatalogue b on b.event_code = a.event_id
@@ -167,7 +192,30 @@
         group by fire_level
     </select>
 
-    <select id="getEventCountGroupByFireType" parameterType="VisuForestCloudMapVO" resultType="map">
+    <select id="getEventCountGroupByFireInsurance" parameterType="VisuForestCloudMapVO"
+            resultType="java.util.LinkedHashMap">
+        select fire_insurance_level name,count(*) value from (
+        select fire_insurance_level from centerevent_t_fire_information a
+        left join centerevent_t_eventcatalogue b on b.event_code = a.event_id
+        left join centerevent_t_dept_event d on d.event_code = a.event_id and d.event_status_value !=
+        'forest_event_status_3'
+        left join ${database_system}.sys_dept c on c.dept_id = d.dept_id
+        where fire_insurance_level is not null
+        <if test="day != null and day != ''">
+            and DATE_FORMAT(b.create_time,'%Y') = #{day}
+        </if>
+        <if test="eventTypeId != null and eventTypeId.length > 0">
+            and event_type_xl in
+            <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
+                #{eventTypeId}
+            </foreach>
+        </if>
+        ${params.dataScope}
+        group by a.event_id) t
+        group by fire_insurance_level
+    </select>
+
+    <select id="getEventCountGroupByFireType" parameterType="VisuForestCloudMapVO" resultType="java.util.LinkedHashMap">
         select fire_type name,count(*) value from (
         select fire_type from centerevent_t_fire_information a
         left join centerevent_t_eventcatalogue b on b.event_code = a.event_id
@@ -210,10 +258,11 @@
             ${params.dataScope}
         </where>
         group by a.event_id
+        order by b.create_time desc
     </select>
 
     <select id="getAIEventCountGroupByReportor" parameterType="VisuForestCloudMapVO"
-            resultType="VisuForestCloudEventTypeBO">
+            resultType="java.util.LinkedHashMap">
         select reportor name,count(*) value from (
         select reportor
         from centerevent_t_eventcatalogue a
@@ -225,6 +274,9 @@
         <if test="day != null and day != ''">
             and DATE_FORMAT(a.create_time,'%Y') = #{day}
         </if>
+        <if test="diff != null">
+            and DATEDIFF( now(), a.create_time ) &lt;= #{diff}
+        </if>
         <if test="eventTypeId != null and eventTypeId.length > 0">
             and event_type_xl in
             <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
@@ -235,12 +287,13 @@
         group by a.event_code) t
         group by reportor
         order by value desc
+        limit 5
     </select>
 
     <select id="getEventCountGroupByYearMonth" parameterType="VisuForestCloudMapVO"
-            resultType="VisuForestCloudCalendarBO">
+            resultType="java.util.LinkedHashMap">
         select day,count(*) daycount from (
-        select DATE_FORMAT(a.create_time,'%Y-%m') day
+        select DATE_FORMAT(a.create_time,#{day}) day
         from centerevent_t_eventcatalogue a
         left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value !=
         'forest_event_status_3'
@@ -248,7 +301,7 @@
         where a.event_status_value in ('forest_event_status_2','forest_event_status_5','forest_event_status_6')
         and data_status = '0'
         <if test="yearMonth != null and yearMonth.size > 0">
-            and DATE_FORMAT(a.create_time,'%Y-%m') in
+            and DATE_FORMAT(a.create_time,#{day}) in
             <foreach item="item" collection="yearMonth" open="(" separator="," close=")">
                 #{item}
             </foreach>
@@ -264,13 +317,14 @@
         group by day
     </select>
 
-    <select id="getEventTypeCountGroupByYearMonth" parameterType="VisuForestCloudMapVO" resultType="map">
+    <select id="getEventTypeCountGroupByYearMonth" parameterType="VisuForestCloudMapVO"
+            resultType="java.util.LinkedHashMap">
         select day,
         <foreach item="eventTypeId" collection="eventTypeId" open="" separator="," close="">
             count(type = #{eventTypeId} or null) #{eventTypeId}
         </foreach>
         from (
-        select DATE_FORMAT(a.create_time,'%Y-%m') day,event_type_xl type
+        select DATE_FORMAT(a.create_time,#{day}) day,event_type_xl type
         from centerevent_t_eventcatalogue a
         left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value !=
         'forest_event_status_3'
@@ -278,7 +332,7 @@
         where a.event_status_value in ('forest_event_status_2','forest_event_status_5','forest_event_status_6')
         and data_status = '0'
         <if test="yearMonth != null and yearMonth.size > 0">
-            and DATE_FORMAT(a.create_time,'%Y-%m') in
+            and DATE_FORMAT(a.create_time,#{day}) in
             <foreach item="item" collection="yearMonth" open="(" separator="," close=")">
                 #{item}
             </foreach>
@@ -289,11 +343,58 @@
                 #{eventTypeId}
             </foreach>
         </if>
-        ${params.dataScope}
+        <if test="reportSource != null and reportSource != ''">
+            and a.report_source = #{reportSource}
+        </if>
+        <choose>
+            <when test="deptId != null and deptId != ''">
+                and find_in_set( #{deptId}, concat(c.ancestors, ',', c.dept_id) )
+            </when>
+            <otherwise>
+                ${params.dataScope}
+            </otherwise>
+        </choose>
         group by a.event_code) t
         group by day
     </select>
 
+    <select id="getEventCountGroupByEventDept" parameterType="VisuForestCloudMapVO" resultType="map">
+        select dept_id deptId,ancestors,count(t.dept_id) value from (
+        select a.dept_id,c.ancestors
+        from centerevent_t_eventcatalogue a
+        left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value !=
+        'forest_event_status_3'
+        left join ${database_system}.sys_dept c on c.dept_id = d.dept_id
+        where a.event_status_value in ('forest_event_status_2','forest_event_status_5','forest_event_status_6')
+        and data_status = '0'
+        <if test="day != null and day != ''">
+            and DATE_FORMAT(a.create_time,'%Y') = #{day}
+        </if>
+        <if test="diff != null">
+            and DATEDIFF( now(), a.create_time ) &lt;= #{diff}
+        </if>
+        <if test="eventTypeId != null and eventTypeId.length > 0">
+            and event_type_xl in
+            <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
+                #{eventTypeId}
+            </foreach>
+        </if>
+        <if test="reportSource != null and reportSource != ''">
+            and a.report_source = #{reportSource}
+        </if>
+        <choose>
+            <when test="deptId != null and deptId != ''">
+                and find_in_set( #{deptId}, concat(c.ancestors, ',', c.dept_id) )
+            </when>
+            <otherwise>
+                ${params.dataScope}
+            </otherwise>
+        </choose>
+        group by a.event_code) t
+        group by dept_id
+        order by value desc
+    </select>
+
     <select id="getEventDeptCountGroupByYearMonth" resultType="java.util.Map">
         select day,name,num from (
         select @gn:=case when @name=day then @gn+1 else 1 end rownum,name,num,@name:=day as day from (
@@ -351,7 +452,7 @@
     </select>
 
     <select id="getEventLatLng" parameterType="VisuForestCloudMapVO" resultType="map">
-        select longitude,latitude from centerevent_t_eventcatalogue a
+        select longitude,latitude,1 num from centerevent_t_eventcatalogue a
         left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value !=
         'forest_event_status_3'
         left join ${database_system}.sys_dept c on c.dept_id = d.dept_id
@@ -395,6 +496,9 @@
         <if test="day != null and day != ''">
             and DATE_FORMAT(a.create_time,'%Y') = #{day}
         </if>
+        <if test="diff != null">
+            and DATEDIFF( now(), a.create_time ) &lt;= #{diff}
+        </if>
         <if test="eventTypeId != null and eventTypeId.length > 0">
             and event_type_xl in
             <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
@@ -418,9 +522,57 @@
         group by dict_value
     </select>
 
-    <select id="getEventCountGroupByEventDept" parameterType="VisuForestCloudMapVO" resultType="map">
-        select dept_name name,count(*) value from (
-        select a.dept_id,a.dept_name
+    <select id="getEventGjnumsMap" parameterType="VisuForestCloudMapVO" resultType="int">
+        select
+        <if test="paramsHashmap.eventCode != null and paramsHashmap.eventCode != ''">
+            count(distinct a.event_code)
+        </if>
+        <if test="paramsHashmap.eventdept != null and paramsHashmap.eventdept != ''">
+            count(distinct d.dept_id)
+        </if>
+        <if test="paramsHashmap.eventTypeXl != null and paramsHashmap.eventTypeXl != ''">
+            count(distinct a.event_type_xl)
+        </if>
+        from centerevent_t_eventcatalogue a
+        left join centerevent_t_dept_event d on d.event_code = a.event_code
+        left join ${database_system}.sys_dept c on c.dept_id = d.dept_id
+        where data_status = '0'
+        <choose>
+            <when test="paramsHashmap.day != null and paramsHashmap.day != ''">
+                and date_format(a.create_time,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
+            </when>
+            <otherwise>
+                and date_format(a.create_time,'%Y-%m') = date_format(now(),'%Y-%m')
+            </otherwise>
+        </choose>
+        <choose>
+            <when test="paramsHashmap.noteventStatus != null and paramsHashmap.noteventStatus.size > 0">
+                and a.event_status_value not in
+                <foreach item="eventStatus" collection="paramsHashmap.noteventStatus" open="(" separator="," close=")">
+                    #{eventStatus}
+                </foreach>
+            </when>
+            <otherwise>
+                and a.event_status_value in ('forest_event_status_2','forest_event_status_5','forest_event_status_6')
+            </otherwise>
+        </choose>
+        <if test="reportSource != null and reportSource != ''">
+            and a.report_source = #{reportSource}
+        </if>
+        <choose>
+            <when test="deptId != null and deptId != ''">
+                and find_in_set( #{deptId}, concat(c.ancestors, ',', c.dept_id) )
+            </when>
+            <otherwise>
+                ${params.dataScope}
+            </otherwise>
+        </choose>
+    </select>
+
+    <select id="selectEventList" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudMapEventListBO">
+        select a.event_code eventCode,event_name eventName,longitude,latitude,reportor,a.event_status
+        eventStatus,a.event_status_value eventStatusValue,a.create_time createTime,urge_count urgeCount,
+        event_type_xl eventType,report_source reportSource
         from centerevent_t_eventcatalogue a
         left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value !=
         'forest_event_status_3'
@@ -428,7 +580,7 @@
         where a.event_status_value in ('forest_event_status_2','forest_event_status_5','forest_event_status_6')
         and data_status = '0'
         <if test="day != null and day != ''">
-            and DATE_FORMAT(a.create_time,'%Y') = #{day}
+            and DATE_FORMAT(a.create_time,'%Y-%m-%d') = #{day}
         </if>
         <if test="eventTypeId != null and eventTypeId.length > 0">
             and event_type_xl in
@@ -436,10 +588,18 @@
                 #{eventTypeId}
             </foreach>
         </if>
-        ${params.dataScope}
-        group by a.event_code) t
-        group by dept_id
-        order by value desc
-        limit 8
+        <if test="reportSource != null and reportSource != ''">
+            and a.report_source = #{reportSource}
+        </if>
+        <choose>
+            <when test="deptId != null and deptId != ''">
+                and find_in_set( #{deptId}, concat(c.ancestors, ',', c.dept_id) )
+            </when>
+            <otherwise>
+                ${params.dataScope}
+            </otherwise>
+        </choose>
+        group by a.event_code
+        order by a.event_status_value,a.create_time desc
     </select>
 </mapper>

+ 60 - 38
src/main/resources/mapper/centereventteventcatalogue/CenterEventViewMapper.xml

@@ -8,8 +8,7 @@
         select
         count( event_status_value in ('forest_event_status_1','forest_event_status_7') OR NULL ) newReport,
         count( event_status_value = 'forest_event_status_2' OR NULL) readySure,
-        count( event_status_value = 'forest_event_status_5' OR event_status_value = 'forest_event_status_6' OR NULL )
-        readyFinish,
+        count( event_status_value = 'forest_event_status_5' OR event_status_value = 'forest_event_status_6' OR NULL ) readyFinish,
         count( report_source in ('reporting_source_1','reporting_source_4') OR NULL ) aiTotal,
         count( report_source in ('reporting_source_2','reporting_source_3') OR NULL ) otherTotal
         from (select a.* from (
@@ -52,12 +51,9 @@
         group by a.event_code) t
     </select>
 
-    <select id="selectDeptEventCount" parameterType="VisuForestCloudMapVO"
-            resultType="VisuForestCloudMapDeptEventCountBO">
-        select t.deptId,replace( group_concat( dept_name order by find_in_set( d.dept_id, t.ancestors ) ), ',', '' )
-        deptName,t.eventCount from (
-        select a.dept_id deptId,count(*) eventCount,concat( replace( c.ancestors, '0,100', '' ), ',', c.dept_id )
-        ancestors from (
+    <select id="selectDeptEventCount" parameterType="VisuForestCloudMapVO" resultType="map">
+        select t.deptId,replace( group_concat( dept_name order by find_in_set( d.dept_id, t.ancestors ) ), ',', '' ) deptName,t.eventCount from (
+        select a.dept_id deptId,count(*) eventCount,concat( replace( c.ancestors, '0,100', '' ), ',', c.dept_id ) ancestors from (
         <if test="isHgj != null and isHgj == 'false'">
             select distinct e.event_code,de.dept_id from centerevent_t_eventcatalogue e
             left join centerevent_t_dept_event de on de.event_code = e.event_code
@@ -101,7 +97,7 @@
         <if test="isHgj != null and isHgj == 'false'">
             select event_code eventCode,event_name eventName,longitude,latitude,reportor,event_status
             eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count urgeCount,
-            event_type_xl eventType,report_source reportSource
+            event_type_xl eventType,report_source reportSource,create_by cameraCode
             from centerevent_t_eventcatalogue
             where event_status_value in ('forest_event_status_1','forest_event_status_7')
             <if test="day != null and day != ''">
@@ -116,11 +112,17 @@
             <if test="eventName != null and eventName != ''">
                 and event_name like concat('%', #{eventName},'%')
             </if>
+            <if test="eventStatusValue != null and eventStatusValue != ''">
+                and event_status_value = #{eventStatusValue}
+            </if>
+            <if test="isExamine != null and isExamine != ''">
+                and (is_examine = 1 and event_status_value = 'forest_event_status_5')
+            </if>
             union all
         </if>
         select event_code eventCode,event_name eventName,longitude,latitude,reportor,event_status
         eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count urgeCount,
-        event_type_xl eventType,report_source reportSource
+        event_type_xl eventType,report_source reportSource,create_by cameraCode
         from centerevent_t_eventcatalogue
         where event_status_value not in ('forest_event_status_3','forest_event_status_4'
         <if test="isHgj != null and isHgj == 'true'">,'forest_event_status_1','forest_event_status_7'</if>)
@@ -136,6 +138,12 @@
         <if test="eventName != null and eventName != ''">
             and event_name like concat('%', #{eventName},'%')
         </if>
+        <if test="eventStatusValue != null and eventStatusValue != ''">
+            and event_status_value = #{eventStatusValue}
+        </if>
+        <if test="isExamine != null and isExamine != ''">
+            and (is_examine = 1 and event_status_value = 'forest_event_status_5')
+        </if>
         ) t
         left join centerevent_t_dept_event d on d.event_code = t.eventCode and d.event_status_value !=
         'forest_event_status_3'
@@ -164,13 +172,13 @@
             </if>
         </where>
         group by event_code) l
-        left join ${database_data}.centerdata_t_attach f on f.bus_id = l.id
+        inner join ${database_data}.centerdata_t_attach f on f.bus_id = l.id
         <if test="templateType != 'true'">
             group by bus_id
         </if>
     </select>
 
-    <select id="selectEventByCalendar" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudCalendarBO">
+    <select id="selectEventByCalendar" parameterType="VisuForestCloudMapVO" resultType="map">
         select day,count(*) daycount from (
         select a.* from (
         <!--select event_code,DATE_FORMAT(create_time,'%Y-%m-%d') day from centerevent_t_eventcatalogue
@@ -291,7 +299,7 @@
         order by id
     </select>
 
-    <select id="getEventByReportorOrder" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudEventTypeBO">
+    <select id="getEventByReportorOrder" parameterType="VisuForestCloudMapVO" resultType="map">
         select reportor name,count(*) value from (
         select a.* from (
         <if test="isHgj != null and isHgj == 'false'">
@@ -339,7 +347,7 @@
                 distance,
             </if>
             reportor,event_status eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count
-            urgeCount,event_type_xl eventType,report_source reportSource
+            urgeCount,event_type_xl eventType,report_source reportSource,create_by cameraCode
             from centerevent_t_eventcatalogue
             where event_status_value in ('forest_event_status_1','forest_event_status_7')
             <choose>
@@ -356,6 +364,9 @@
                     #{eventTypeIdDl}
                 </foreach>
             </if>
+            <if test="eventName != null and eventName != ''">
+                and event_name like concat('%', #{eventName},'%')
+            </if>
             <if test="longitude != null and longitude!='' and latitude != null and latitude != '' and distance != null">
                 having distance &lt; #{distance}
             </if>
@@ -366,7 +377,7 @@
             round(st_distance_sphere(point(#{longitude}, #{latitude}), point(longitude, latitude))/1000, 2) distance,
         </if>
         reportor,event_status eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count
-        urgeCount,event_type_xl eventType,report_source reportSource
+        urgeCount,event_type_xl eventType,report_source reportSource,create_by cameraCode
         from centerevent_t_eventcatalogue
         where event_status_value not in ('forest_event_status_3','forest_event_status_4'
         <if test="isHgj != null and isHgj == 'true'">,'forest_event_status_1','forest_event_status_7'</if>)
@@ -384,6 +395,9 @@
                 #{eventTypeId}
             </foreach>
         </if>
+        <if test="eventName != null and eventName != ''">
+            and event_name like concat('%', #{eventName},'%')
+        </if>
         <if test="longitude != null and longitude!='' and latitude != null and latitude != '' and distance != null">
             having distance &lt; #{distance}
         </if>
@@ -407,18 +421,20 @@
     <select id="eventPush" parameterType="VisuForestCloudMapVO" resultType="VisuForestEventTodayEventListBO">
         select a.event_code eventCode,event_name eventName,longitude,latitude,reportor,a.event_status
         eventStatus,a.event_status_value eventStatusValue,a.create_time createTime,urge_count urgeCount,
-        event_type_xl eventType,report_source reportSource
+        event_type_xl eventTypeXl,y.event_type_name eventTypeXlLabel,report_source reportSource,address
         from centerevent_t_eventcatalogue a
         left join centerevent_t_dept_event d on d.event_code = a.event_code and d.event_status_value != 'forest_event_status_3'
         left join ${database_system}.sys_dept c on c.dept_id = d.dept_id
+        left join centerevent_t_eventtype y on y.id = a.event_type_xl
         where a.event_code = #{eventCode} ${params.dataScope}
         group by a.event_code
     </select>
 
     <select id="listAll" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudMapEventListBO">
-        select id eventId, event_code eventCode, event_name eventName, event_status_value eventStatusValue, event_status
-        eventStatus, is_examine isExamine, version, address, create_by cameraCode
-        from centerevent_t_eventcatalogue
+        select a.id eventId, a.event_code eventCode, a.event_name eventName, a.event_status_value eventStatusValue, a.event_status
+        eventStatus, a.is_examine isExamine, a.version, a.address, a.create_by cameraCode, e.event_type_name eventTypeName
+        from centerevent_t_eventcatalogue a
+        left join centerevent_t_eventtype e on a.event_type_xl = e.id
         where report_source = 'reporting_source_1' and event_status_value = 'forest_event_status_1'
         <if test="eventName != null and eventName != ''">
             and event_name like concat('%', #{eventName},'%')
@@ -429,31 +445,37 @@
         <if test="day != null and day != ''">
             and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
         </if>
+        <if test="eventTypeXls!= null and eventTypeXls.size > 0">
+            and event_type_xl in
+            <foreach item="eventTypeXl" collection="eventTypeXls" open="(" separator="," close=")">
+                #{eventTypeXl}
+            </foreach>
+        </if>
         order by create_time desc
     </select>
 
     <select id="getHousingConstructionEventCount" parameterType="VisuForestCloudMapVO" resultType="map">
         select label_1,IFNULL(label_2,0) label_2, IFNULL(label_3,0) label_3,IFNULL(label_4,0) label_4 from (
-            select count(*) label_1 from centerevent_t_eventcatalogue
-            where event_status_value in ('forest_event_status_7','forest_event_status_2','forest_event_status_5','forest_event_status_6' )
-            <if test="day != null and day != ''">
-                and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
-            </if>
-            <if test="createBy != null and createBy != ''">
-                and create_by in ( ${createBy} )
-            </if> and event_type = 1
+        select count(*) label_1 from centerevent_t_eventcatalogue
+        where event_status_value in ('forest_event_status_7','forest_event_status_2','forest_event_status_5','forest_event_status_6' )
+        <if test="day != null and day != ''">
+            and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
+        </if>
+        <if test="createBy != null and createBy != ''">
+            and create_by in ( ${createBy} )
+        </if> and event_type = 1
         ) a, (
-            select sum(event_type_xl in ( '1201','1202','1203','1204','1205' )) label_2, sum(event_type_xl = '1208' ) label_3, sum(event_type_xl in ( '1206','1207' )) label_4
-            from (
-                select event_type_xl from centerevent_t_eventcatalogue
-                where 1=1
-                <if test="day != null and day != ''">
-                    and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
-                </if>
-                <if test="deptId != null and deptId != ''">
-                    and create_by = #{deptId}
-                </if>
-                and event_type = 12) t
+        select sum(event_type_xl in ( '1201','1202','1203','1204','1205' )) label_2, sum(event_type_xl = '1208' ) label_3, sum(event_type_xl in ( '1206','1207' )) label_4
+        from (
+        select event_type_xl from centerevent_t_eventcatalogue
+        where 1=1
+        <if test="day != null and day != ''">
+            and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
+        </if>
+        <if test="deptId != null and deptId != ''">
+            and create_by = #{deptId}
+        </if>
+        and event_type = 12) t
         ) b
     </select>
 

+ 3 - 1
src/main/resources/mapper/centereventteventcatalogue/CentereventTEventcatalogueMapper.xml

@@ -35,10 +35,11 @@
         <result property="address" column="address"/>
         <result property="escalation" column="escalation"/>
         <result property="isExamine" column="is_examine"/>
+        <result property="isPush" column="is_push"/>
     </resultMap>
 
     <sql id="selectCentereventTEventcatalogueVo">
-        select id, event_code, event_type, event_type_xl, event_name, event_description, report_source, longitude, latitude, reportor,report_time, is_urged, event_status, event_status_value, create_by, create_name, create_time, update_by, update_name, update_time, data_status, dept_id, dept_name, IFNULL(version, 0) version, urge_count, address, escalation, is_examine from centerevent_t_eventcatalogue
+        select id, event_code, event_type, event_type_xl, event_name, event_description, report_source, longitude, latitude, reportor,report_time, is_urged, event_status, event_status_value, create_by, create_name, create_time, update_by, update_name, update_time, data_status, dept_id, dept_name, IFNULL(version, 0) version, urge_count, address, escalation, is_examine, is_push from centerevent_t_eventcatalogue
     </sql>
 
     <select id="selectCentereventTEventcatalogueListByPc" parameterType="CentereventTEventcatalogue"
@@ -266,6 +267,7 @@
             <if test="address != null ">address = #{address},</if>
             <if test="escalation != null ">escalation = #{escalation},</if>
             <if test="isExamine != null ">is_examine = #{isExamine},</if>
+            <if test="isPush != null ">is_push = #{isPush},</if>
             <if test="gdTime != null ">gd_time = #{gdTime},</if>
         </trim>
         where id = #{id}

+ 5 - 0
src/main/resources/mapper/centereventteventtype/CentereventTEventtypeMapper.xml

@@ -44,6 +44,11 @@
         from centerevent_t_eventtype where code = #{code}
     </select>
 
+    <select id="selectCentereventTEventtypeByCodeTower" parameterType="String" resultMap="CentereventTEventtypeResult">
+        <include refid="selectCentereventTEventtypeVo"/>
+        from centerevent_t_eventtype where code_tower = #{code}
+    </select>
+
     <insert id="insertCentereventTEventtype" parameterType="CentereventTEventtype">
         insert into centerevent_t_eventtype
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 2 - 12
src/main/resources/mapper/centereventtforestfireloss/CentereventTForestFireLossMapper.xml

@@ -104,7 +104,6 @@
         </trim>
     </insert>
 
-
     <select id="getFireLoss" parameterType="VisuForestFireLossVO" resultType="map">
         select
         sum(forest_fire_loss_total) forestFireLossTotal, sum(fire_loss_total) fireLossTotal,
@@ -123,21 +122,12 @@
         from centerevent_t_forest_fire_loss a
         left join centerevent_t_eventcatalogue b on b.event_code = a.event_id
         left join ${database_system}.sys_dept d on d.dept_id = b.dept_id
+        left join centerevent_t_fire_information i on i.event_id = a.event_id
         <where>
             <if test="id != null and id != ''">and a.id = #{id}</if>
             <if test="year != null and year != ''">and report_time_y = #{year}</if>
+            <if test="fireType != null and fireType != ''">and fire_type = #{fireType}</if>
             ${params.dataScope}
         </where>
     </select>
-
-    <select id="getFireList" parameterType="VisuForestFireLossVO" resultType="map">
-        select a.id,event_id eventId,CONCAT_WS("-",report_time_y,report_time_m,report_time_d) reportTime,
-        b.event_code eventCode,b.event_name eventName,b.longitude,b.latitude,b.reportor,b.event_status eventStatus,
-        b.event_status_value eventStatusValue,DATE_FORMAT(b.create_time,'%Y-%m-%d') createTime,b.urge_count urgeCount
-        from centerevent_t_forest_fire_loss a
-        left join centerevent_t_eventcatalogue b on b.event_code = a.event_id
-        left join ${database_system}.sys_dept d on d.dept_id = b.dept_id
-        where report_time_y = #{year} ${params.dataScope}
-        order by STR_TO_DATE( reportTime, '%Y-%m-%d' ) desc
-    </select>
 </mapper>

+ 14 - 4
src/main/resources/mapper/centereventtregionalflag/CentereventTRegionalFlagMapper.xml

@@ -30,9 +30,19 @@
         </trim>
     </insert>
 
-
-    <select id="getFireLocation" parameterType="String" resultType="map">
-        select id,event_id eventId,longitude,latitude,flag from centerevent_t_regional_flag
-        where event_id = #{eventId} order by flag
+    <select id="getFireRegion" parameterType="String" resultType="map">
+        select a.event_id eventId,GROUP_CONCAT( concat( longitude, ',', latitude ) ORDER BY flag SEPARATOR ';' )
+        regional
+        from centerevent_t_regional_flag a
+        left join centerevent_t_forest_fire_loss l on l.event_id = a.event_id
+        <where>
+            <if test="fireType != null and fireType != ''">
+                and a.event_id in (select event_id from centerevent_t_fire_information where fire_type = #{fireType})
+            </if>
+            <if test="year != null and year != ''">
+                and report_time_y = #{year}
+            </if>
+        </where>
+        group by a.event_id
     </select>
 </mapper>