فهرست منبع

土佐无人机事件

Memory_LG 1 ماه پیش
والد
کامیت
cfe11f1008

+ 8 - 12
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/AlarmEventServiceImpl.java

@@ -711,13 +711,13 @@ public class AlarmEventServiceImpl implements AlarmEventService {
 
     @Override
     public int insertDroneEvent(List<DroneVO> alarmData) {
-        Map<Object, Object> eventType = new HashMap<>();
-        eventType.put("Sheep","222");
-        eventType.put("Car","218");
+//        Map<Object, Object> eventType = new HashMap<>();
+//        eventType.put("Sheep","222");
+//        eventType.put("Car","218");
 
-        Map<Object, Object> eventLabel = new HashMap<>();
-        eventLabel.put("Sheep","区域入侵");
-        eventLabel.put("Car","工程车检测");
+//        Map<Object, Object> eventLabel = new HashMap<>();
+//        eventLabel.put("Sheep","区域入侵");
+//        eventLabel.put("Car","工程车检测");
 
         // 将告警图片转换为本地图片
         alarmData.parallelStream().forEach(item -> {
@@ -733,16 +733,12 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         // 通过无人机id, 获取无人机信息和绑定的指挥中心
         alarmData.forEach(alarm->{
             CentermonitorTUav data = SpringUtils.getBean(RemoteMonitorService.class).selectUavByUavId(alarm.getCopterId()).getData();
-            /**
-             * 牛羊 Sheep:222
-             * 车辆 Car: 218
-             */
 
-            String eventName = data.getUavName()+"上报"+MapUtils.getString(eventLabel, alarm.getAlarmType())+"事件";
+            String eventName = data.getUavName()+"上报火情事件事件";
             String eventDescription = "基站:"+data.getBaseStationName()+",无人机:"+data.getUavName()+",经度:"+alarm.getLongitude()+",纬度:"+alarm.getLatitude()+",海拔:"+alarm.getAltitude();
 
             //创建事件主体, 写入事件表.
-            CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue("2", MapUtils.getString(eventType, alarm.getAlarmType()), eventName, eventDescription, alarm.getLongitude(), alarm.getLatitude(), data.getUavName(), alarm.getCreationTime(), "");
+            CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue("1",null, eventName, eventDescription, alarm.getLongitude(), alarm.getLatitude(), data.getUavName(), alarm.getCreationTime(), "");
             centereventTEventcatalogue.setLongitude(alarm.getLongitude());
             centereventTEventcatalogue.setLatitude(alarm.getLatitude());
             centereventTEventcatalogue.setReportSource(REPORTING_SOURCE_6);

+ 1 - 1
src/main/resources/mapper/centereventteventcatalogue/AlarmEventMapper.xml

@@ -8,7 +8,7 @@
         <result column="time_stamp" jdbcType="VARCHAR" property="timeStamp"/>
         <result column="altitude" jdbcType="VARCHAR" property="altitude"/>
         <result column="alarm_type" jdbcType="VARCHAR" property="alarmType"/>
-        <result column="create_time" jdbcType="VARCHAR" property="createTime"/>
+        <result column="create_time" jdbcType="VARCHAR" property="creationTime"/>
         <result column="photo_path" jdbcType="VARCHAR" property="photoPath"/>
         <result column="latitude" jdbcType="VARCHAR" property="latitude"/>
         <result column="longitude" jdbcType="VARCHAR" property="longitude"/>