Selaa lähdekoodia

【情报二期】数据域服务 - 预警数据消费逻辑调整

peifj 1 kuukausi sitten
vanhempi
sitoutus
f6a9c1c76e

+ 76 - 30
pom.xml

@@ -5,7 +5,7 @@
   <artifactId>QBEQSJY</artifactId>
 
   <packaging>jar</packaging>
-  <version>1.0-SNAPSHOT</version>
+  <version>1.0.0</version>
   <name>QBEQSJY</name>
   <url>http://maven.apache.org</url>
 
@@ -13,7 +13,6 @@
     <maven.compiler.source>8</maven.compiler.source>
     <maven.compiler.target>8</maven.compiler.target>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <java.version>1.8</java.version>
     <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
@@ -32,25 +31,6 @@
 
   <dependencies>
 
-    <!--<dependency>
-      <groupId>com.baomidou</groupId>
-      <artifactId>mybatis-plus-boot-starter</artifactId>
-      <version>3.5.1</version>
-    </dependency>-->
-
-    <!-- GaussDB JDBC Driver -->
-    <!--<dependency>
-      <groupId>com.huawei.gaussdb</groupId>
-      <artifactId>gaussdb-jdbc</artifactId>
-      <version>2.0.0</version>
-    </dependency>-->
-
-    <!--<dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-data-jpa</artifactId>
-      <version>2.5.15</version>
-    </dependency>-->
-
     <!-- JTS Topology Suite 处理二维几何图形的 Java 类库 -->
     <dependency>
       <groupId>org.locationtech.jts</groupId>
@@ -220,6 +200,12 @@
       <version>2.5.15</version>
       <scope>system</scope>
       <systemPath>${project.basedir}/lib/spring-boot-starter-web-2.5.15.jar</systemPath>
+      <exclusions>
+        <exclusion>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-starter-tomcat</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>
@@ -249,13 +235,6 @@
       <systemPath>${project.basedir}/lib/UserAgentUtils-1.21.jar</systemPath>
     </dependency>
 
-    <!-- pagehelper 分页插件 -->
-    <!--<dependency>
-      <groupId>com.github.pagehelper</groupId>
-      <artifactId>pagehelper-spring-boot-starter</artifactId>
-      <version>${pagehelper.boot.version}</version>
-    </dependency>-->
-
     <!-- 获取系统信息 -->
     <dependency>
       <groupId>com.github.oshi</groupId>
@@ -521,6 +500,12 @@
       <systemPath>${project.basedir}/lib/servlet-api-2.5.jar</systemPath>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-servlet-api</artifactId>
+      <version>8.0.36</version>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-api</artifactId>
@@ -635,17 +620,78 @@
 
   </dependencies>
 
+
   <build>
     <plugins>
       <plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
-        <version>3.4.4</version>
+        <version>2.5.15</version>
         <configuration>
-          <mainClass>com.hhwy.QBEQSJYApplication</mainClass>
+          <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>repackage</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>3.1.0</version>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+          <warName>${project.artifactId}</warName>
         </configuration>
       </plugin>
     </plugins>
+    <finalName>${project.artifactId}</finalName>
   </build>
 
+  <!--<build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>3.1.0</version>
+      </plugin>
+      &lt;!&ndash;<plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+          <encoding>${project.build.sourceEncoding}</encoding>
+        </configuration>
+      </plugin>&ndash;&gt;
+      &lt;!&ndash;<plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>3.1.2</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>com.hhwy.QBEQSJYApplication</mainClass>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>&ndash;&gt;
+
+      &lt;!&ndash; spring-boot-maven-plugin &ndash;&gt;
+      &lt;!&ndash;<plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+        <version>3.4.4</version>
+        <configuration>
+          <mainClass>com.hhwy.QBEQSJYApplication</mainClass>
+          <skip>false</skip>
+        </configuration>
+      </plugin>&ndash;&gt;
+    </plugins>
+  </build>-->
+
 </project>

+ 10 - 4
src/main/java/com/hhwy/QBEQSJYApplication.java

@@ -3,16 +3,22 @@ package com.hhwy;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 
 
-@EnableScheduling
 @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
-public class QBEQSJYApplication {
+public class QBEQSJYApplication /*extends SpringBootServletInitializer*/ {
+
+    /*@Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
+        // 指向原始启动类
+        return builder.sources(QBEQSJYApplication.class);
+    }*/
 
     public static void main(String[] args)
     {
-        // System.setProperty("spring.devtools.restart.enabled", "false");
+        System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(QBEQSJYApplication.class, args);
         System.out.println("(♥◠‿◠)ノ゙  启动成功   ლ(´ڡ`ლ)゙  \n" +
                 " .-------.       ____     __        \n" +

+ 2 - 0
src/main/java/com/hhwy/qbeqsjy/common/Constants.java

@@ -61,6 +61,8 @@ public class Constants {
     public static final String QYMC_TJZ = "天津站";
     // 预警区域名称:天津市
     public static final String QYMC_TJS = "天津市";
+    // 预警区域编号:天津市
+    public static final String QYBH_TJS = "TJS";
     public static final String MULTI_THREAD_ENABLED_FLAG = "true";
     // 一次请求的最大等待时间
     public static final int WAIT_TIME = 30000;

+ 6 - 0
src/main/java/com/hhwy/qbeqsjy/controller/CtrlController.java

@@ -29,6 +29,12 @@ public class CtrlController {
     private CtrlService ctrlService;
 
 
+    @GetMapping("/test")
+    public AjaxResult test(){
+        return AjaxResult.success("测试接口");
+    }
+
+
     /**
      * 下发布控任务,不支持批量操作,并记录布控任务对应的区域信息
      * @param ctrlDTO

+ 8 - 3
src/main/java/com/hhwy/qbeqsjy/dao/CtrlDao.java

@@ -242,7 +242,9 @@ public class CtrlDao {
     public Timestamp getStartQueryTimeBySysId(String sysId){
         String sql = "select start_query_time from t_ctrl_warning_query_info where sys_id = ?";
         try {
-            return (Timestamp) gaussdbJdbcTemplate.queryForMap(sql, sysId).get("start_query_time");
+            Timestamp startQueryTime = (Timestamp) gaussdbJdbcTemplate.queryForMap(sql, sysId).get("start_query_time");
+            log.info("【根据系统ID获取预警数据起始查询时间】 系统ID:{},起始查询时间:{}", sysId, startQueryTime);
+            return startQueryTime;
         } catch (Exception e){
             log.error("【根据系统ID获取预警数据查询记录表中对应的起始查询时间发生异常】 异常信息:", e);
         }
@@ -257,7 +259,9 @@ public class CtrlDao {
     public Timestamp getNewMaxCreateTime(Timestamp startQueryTime){
         String sql = "select max(cjsj) max_cjsj from t_ctrl_warning_info where cjsj > ?";
         try {
-            return (Timestamp) gaussdbJdbcTemplate.queryForMap(sql, startQueryTime).get("max_cjsj");
+            Timestamp newMaxCreateTime = (Timestamp) gaussdbJdbcTemplate.queryForMap(sql, startQueryTime).get("max_cjsj");
+            log.info("【计算当前预警数据表中的最大入库时间】 最大入库时间:{}", newMaxCreateTime);
+            return newMaxCreateTime;
         } catch (Exception e){
             log.error("【基于起始查询时间,计算当前预警数据表中的最大入库时间发生异常】 异常信息:", e);
         }
@@ -288,9 +292,10 @@ public class CtrlDao {
      * @return
      */
     public boolean updateStartQueryTimeBySysId(Timestamp newMaxCreateTime, String sysId){
-        String sql = "update t_ctrl_warning_query_info set start_query_time = ? where where sys_id = ?";
+        String sql = "update t_ctrl_warning_query_info set start_query_time = ? where sys_id = ?";
         try {
             int updateRows = gaussdbJdbcTemplate.update(sql, newMaxCreateTime, sysId);
+            log.info("【根据系统ID更新预警数据的起始查询时间】 起始查询时间:{}", newMaxCreateTime);
             return updateRows > 0;
         } catch (Exception e){
             log.error("【根据系统ID更新预警数据查询记录表中对应的起始查询时间发生异常】 异常信息:", e);

+ 305 - 213
src/main/java/com/hhwy/qbeqsjy/kafka/service/ConsumeService.java

@@ -138,7 +138,6 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                     // 每张布控资源表对应的命中数据JSON对象
                     JSONObject oriField = message.getJSONObject("ORIFIELD");
                     log.info(oriField.toJSONString());
-                    StringBuilder yjxxsm = new StringBuilder();
                     // 生成预警信息编号
                     String yjxxbh = String.valueOf(generator.nextId());
                     // 预警状态默认为0(未读)
@@ -196,20 +195,16 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                             Long captureTime = Long.valueOf(oriField.getString("CAPTURE_TIME"));
                             String captureTimeStr = TimeTool.timeStampToDateString(captureTime);
                             Date captureTimeDateObj = new Date(captureTime * 1000);
-                            yjxxsm.append(yjryXm);
-                            yjxxsm.append("于");
-                            yjxxsm.append(captureTimeStr);
-                            yjxxsm.append("出现在");
-                            yjxxsm.append(addressName);
                             // 将烽火的百度坐标系经纬度值转换为84坐标系经纬度值
                             double[] latAndLon84 = GpsCoordinateUtils.calBD09toWGS84(Double.valueOf(latBD), Double.valueOf(lonBD));
                             String lat84 = String.valueOf(latAndLon84[0]);
                             String lon84 = String.valueOf(latAndLon84[1]);
                             // 3. ========================= 如果存在布控区域,则过滤不在布控区域范围的数据
                             JSONArray areaInfoList = JSON.parseArray(bkqyxx);
-                            if(areaInfoList != null && areaInfoList.size() > 0){
+                            if(areaInfoList != null && !areaInfoList.isEmpty()){
                                 for (Object obj : areaInfoList) {
                                     JSONObject ctrlAreaInfo = (JSONObject) obj;
+                                    String areaCode = (String) ctrlAreaInfo.get("qybh");
                                     String areaName = (String) ctrlAreaInfo.get("qymc");
                                     Integer geoType = (Integer) ctrlAreaInfo.get("qyjhlx");
                                     JSONObject locationJSONObj = JSON.parseObject(String.valueOf(ctrlAreaInfo.get("qyfwjwdjhFh")));
@@ -221,10 +216,22 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         String centerLat84 = loc.getString("lat");
                                         String radius = loc.getString("radius");
                                         if(GeoUtils.isPointInCircle(Double.valueOf(lat84), Double.valueOf(lon84), Double.valueOf(centerLat84), Double.valueOf(centerLon84), Double.valueOf(radius)) && captureTimeDateObj.compareTo(bkkssj) >= 0 && captureTimeDateObj.compareTo(bkjssj) <= 0){
-                                            yjxxsm.append(",所在区域:");
-                                            yjxxsm.append(areaName);
+                                            StringBuilder yjxxsm = new StringBuilder();
+                                            if(Constants.QYBH_TJS.equals(areaCode)){
+                                                yjxxsm.append("进入本地预警 - ");
+                                            } else {
+                                                yjxxsm.append("进入敏感区域 - ");
+                                            }
+                                            yjxxsm.append(yjryXm);
+                                            yjxxsm.append("于");
+                                            yjxxsm.append(captureTimeStr);
+                                            yjxxsm.append("出现在");
+                                            yjxxsm.append(addressName);
+                                            if(!Constants.QYBH_TJS.equals(areaCode)){
+                                                yjxxsm.append(",命中区域:");
+                                                yjxxsm.append(areaName);
+                                            }
                                             warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, yjrySfzh, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, captureTimeDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, lon84, lat84, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                            yjxxsm.setLength(0);
                                             break;
                                         }
                                     } else {   // 布控区域是一般多边形
@@ -236,18 +243,36 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                             coordinates.add(new Coordinate(Double.valueOf(vertexLon84), Double.valueOf(vertexLat84)));
                                         }
                                         if(GeoUtils.isPointInPolygon(coordinates, new Coordinate(Double.valueOf(lon84), Double.valueOf(lat84)))  && captureTimeDateObj.compareTo(bkkssj) >= 0 && captureTimeDateObj.compareTo(bkjssj) <= 0){
-                                            yjxxsm.append(",所在区域:");
-                                            yjxxsm.append(areaName);
+                                            StringBuilder yjxxsm = new StringBuilder();
+                                            if(Constants.QYBH_TJS.equals(areaCode)){
+                                                yjxxsm.append("进入本地预警 - ");
+                                            } else {
+                                                yjxxsm.append("进入敏感区域 - ");
+                                            }
+                                            yjxxsm.append(yjryXm);
+                                            yjxxsm.append("于");
+                                            yjxxsm.append(captureTimeStr);
+                                            yjxxsm.append("出现在");
+                                            yjxxsm.append(addressName);
+                                            if(!Constants.QYBH_TJS.equals(areaCode)){
+                                                yjxxsm.append(",命中区域:");
+                                                yjxxsm.append(areaName);
+                                            }
                                             warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, yjrySfzh, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, captureTimeDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, lon84, lat84, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                            yjxxsm.setLength(0);
                                             break;
                                         }
                                     }
                                 }
                             } else {   // 如果不存在布控区域,则默认布控区域范围为天津市
                                 if(captureTimeDateObj.compareTo(bkkssj) >= 0 && captureTimeDateObj.compareTo(bkjssj) <= 0){
+                                    StringBuilder yjxxsm = new StringBuilder();
+                                    yjxxsm.append("进入本地预警 - ");
+                                    yjxxsm.append(yjryXm);
+                                    yjxxsm.append("于");
+                                    yjxxsm.append(captureTimeStr);
+                                    yjxxsm.append("出现在");
+                                    yjxxsm.append(addressName);
                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, yjrySfzh, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, captureTimeDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, lon84, lat84, currentTime, currentTime, null, null, null, Constants.QYMC_TJS, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                    yjxxsm.setLength(0);
                                 }
                             }
                         } else if(resCodeKy.equals(resourceCode)){   // =========== 客运数据
@@ -292,40 +317,39 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                             String depTimeDtime = oriField.getString("DEP_TIME_DTIME");
                             String fcsj = StringUtils.isNotBlank(depTimeDtime)? TimeTool.timeStampToDateString(TimeTool.dateStringToTimeStamp3(depTimeDtime)) : "暂无";
                             /*String captureTimeKy = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));*/
-                            yjxxsm.append("客运数据 - 旅客姓名:");
-                            yjxxsm.append(lkXm);
-                            yjxxsm.append(",旅客身份证号:");
-                            yjxxsm.append(lkSfzh);
-                            yjxxsm.append(",旅客手机号:");
-                            yjxxsm.append(lkSjh);
-                            yjxxsm.append(",订票时间:");
-                            yjxxsm.append(dpsjStr);
-                            yjxxsm.append(",发车时间:");
-                            yjxxsm.append(fcsj);
-                            yjxxsm.append(",始发站:");
-                            yjxxsm.append(sfdzdmc);
-                            yjxxsm.append(",目的站:");
-                            yjxxsm.append(mddzdmc);
-                            yjxxsm.append(",检票时间:");
-                            yjxxsm.append(jpsj);
-                            yjxxsm.append(",检票车次号:");
-                            yjxxsm.append(jpcch);
-                            yjxxsm.append(",座号:");
-                            yjxxsm.append(zh);
-                            yjxxsm.append(",车牌号:");
-                            yjxxsm.append(cph);
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 if(Constants.MODEL_CODE_BSJJ_KYCC.equals(mxbh)){   // 单人预警-本市进京-客运乘车
                                     if(StringUtils.isNotBlank(sfdxzqhdm) && StringUtils.isNotBlank(mddxzqhdm) && "12".equals(sfdxzqhdm.substring(0, 2)) && "11".equals(mddxzqhdm.substring(0, 2)) && dpsjDateObj.compareTo(bkkssj) >= 0 && dpsjDateObj.compareTo(bkjssj) <= 0){
                                         // 业务需求:始发地:天津,目的地:北京
+                                        StringBuilder yjxxsm = new StringBuilder();
+                                        yjxxsm.append("客运数据 - 旅客姓名:");
+                                        yjxxsm.append(lkXm);
+                                        yjxxsm.append(",旅客身份证号:");
+                                        yjxxsm.append(lkSfzh);
+                                        yjxxsm.append(",旅客手机号:");
+                                        yjxxsm.append(lkSjh);
+                                        yjxxsm.append(",订票时间:");
+                                        yjxxsm.append(dpsjStr);
+                                        yjxxsm.append(",发车时间:");
+                                        yjxxsm.append(fcsj);
+                                        yjxxsm.append(",始发站:");
+                                        yjxxsm.append(sfdzdmc);
+                                        yjxxsm.append(",目的站:");
+                                        yjxxsm.append(mddzdmc);
+                                        yjxxsm.append(",检票时间:");
+                                        yjxxsm.append(jpsj);
+                                        yjxxsm.append(",检票车次号:");
+                                        yjxxsm.append(jpcch);
+                                        yjxxsm.append(",座号:");
+                                        yjxxsm.append(zh);
+                                        yjxxsm.append(",车牌号:");
+                                        yjxxsm.append(cph);
                                         warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, lkXm, lkSfzh, lkSjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, dpsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, null, null, currentTime, currentTime, null, null, null, null, null, yjlx, Constants.YJLX_DRYJ, seatNo, null});
-                                        yjxxsm.setLength(0);
                                         break;
                                     }
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeMhdp.equals(resourceCode)) {   // =========== 民航订票数据
                             // 订座记录编号
                             /*String ordseatRecoNo = oriField.getString("ORDSEAT_RECO_NO");
@@ -372,42 +396,58 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                             String captureTime = oriField.getString("CAPTURE_TIME");
                             /*String captureTimeMhdp = StringUtils.isNotBlank(captureTime)? TimeTool.timeStampToDateString(TimeTool.dateStringToTimeStamp3(captureTime)) : "暂无";*/
                             Date captureTimeMhdpDateObj = StringUtils.isNotBlank(captureTime)? new Date(TimeTool.dateStringToTimeStamp3(captureTime) * 1000) : null;
-                            yjxxsm.append("民航订票 - 旅客中文名:");
-                            yjxxsm.append(lkzwm);
-                            yjxxsm.append(",旅客证件号码:");
-                            yjxxsm.append(zjhm);
-                            yjxxsm.append(",承运航空公司:");
-                            yjxxsm.append(cyhkgs);
-                            yjxxsm.append(",航班号:");
-                            yjxxsm.append(hbh);
-                            yjxxsm.append(",起飞机场:");
-                            yjxxsm.append(qfjcmc);
-                            yjxxsm.append(",出发时间:");
-                            yjxxsm.append(cfsj);
-                            yjxxsm.append(",到达机场:");
-                            yjxxsm.append(StringUtils.isNotBlank(ddjcmc)? ddjcmc : "暂无");
-                            yjxxsm.append(",到达时间:");
-                            yjxxsm.append(ddsj);
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 if(Constants.MODEL_CODE_WSLJ_MHDP.equals(mxbh)){   // 单人预警-外省来津-民航订票
                                     if(StringUtils.isNotBlank(ddjcdm) && "TSN".equals(ddjcdm.trim()) && captureTimeMhdpDateObj.compareTo(bkkssj) >= 0 && captureTimeMhdpDateObj.compareTo(bkjssj) <= 0){
                                         // 业务需求:到达机场代码为TSN(天津滨海国际机场)
+                                        StringBuilder yjxxsm = new StringBuilder();
+                                        yjxxsm.append("民航订票 - 旅客中文名:");
+                                        yjxxsm.append(lkzwm);
+                                        yjxxsm.append(",旅客证件号码:");
+                                        yjxxsm.append(zjhm);
+                                        yjxxsm.append(",承运航空公司:");
+                                        yjxxsm.append(cyhkgs);
+                                        yjxxsm.append(",航班号:");
+                                        yjxxsm.append(hbh);
+                                        yjxxsm.append(",起飞机场:");
+                                        yjxxsm.append(qfjcmc);
+                                        yjxxsm.append(",出发时间:");
+                                        yjxxsm.append(cfsj);
+                                        yjxxsm.append(",到达机场:");
+                                        yjxxsm.append(StringUtils.isNotBlank(ddjcmc)? ddjcmc : "暂无");
+                                        yjxxsm.append(",到达时间:");
+                                        yjxxsm.append(ddsj);
                                         warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, lkzwm, zjhm, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, captureTimeMhdpDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, null, null, currentTime, currentTime, null, null, null, null, ddjcmc, yjlx, Constants.YJLX_DRYJ, null, null});
-                                        yjxxsm.setLength(0);
                                         break;
                                     }
                                 } else if (Constants.MODEL_CODE_KSGJ_MHDP.equals(mxbh)) {   // 单人预警-跨省轨迹-民航订票
                                     String mddShi = (String) modelInfoMap.get("mdd_shi");
                                     if(StringUtils.isNotBlank(qfjcdm) && StringUtils.isNotBlank(ddjcmc) && "TSN".equals(qfjcdm.trim()) && ddjcmc.trim().contains(mddShi) && captureTimeMhdpDateObj.compareTo(bkkssj) >= 0 && captureTimeMhdpDateObj.compareTo(bkjssj) <= 0){
                                         // 业务需求:起飞机场代码为TSN(天津滨海国际机场),到达机场须属于当前任务所记录的目的地市
+                                        StringBuilder yjxxsm = new StringBuilder();
+                                        yjxxsm.append("民航订票 - 旅客中文名:");
+                                        yjxxsm.append(lkzwm);
+                                        yjxxsm.append(",旅客证件号码:");
+                                        yjxxsm.append(zjhm);
+                                        yjxxsm.append(",承运航空公司:");
+                                        yjxxsm.append(cyhkgs);
+                                        yjxxsm.append(",航班号:");
+                                        yjxxsm.append(hbh);
+                                        yjxxsm.append(",起飞机场:");
+                                        yjxxsm.append(qfjcmc);
+                                        yjxxsm.append(",出发时间:");
+                                        yjxxsm.append(cfsj);
+                                        yjxxsm.append(",到达机场:");
+                                        yjxxsm.append(StringUtils.isNotBlank(ddjcmc)? ddjcmc : "暂无");
+                                        yjxxsm.append(",到达时间:");
+                                        yjxxsm.append(ddsj);
                                         warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, lkzwm, zjhm, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, captureTimeMhdpDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, null, null, currentTime, currentTime, null, null, null, null, ddjcmc, yjlx, Constants.YJLX_DRYJ, null, null});
-                                        yjxxsm.setLength(0);
                                         break;
                                     }
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeJnryzs.equals(resourceCode)) {   // =========== 境内人员住宿数据
                             // 旅馆编号
                             String lgbh = oriField.getString("HOTEL_NO");
@@ -456,23 +496,6 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
 //                            String rzr2Xm = oriField.getString("ADMIS_PER_TWO_NAME");           // 入住人2姓名
 //                            String rzr2Sfzh = oriField.getString("ADMIS_PER_TWO_CERT_NO");      // 入住人2身份证号
 //                            String rzr2Lxfs = oriField.getString("ADMIS_PER_TWO_CTCT_TEL");     // 入住人2联系方式
-                            String captureTimeJnryzs = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
-                            yjxxsm.append("旅馆住宿 - 旅馆名称:");
-                            yjxxsm.append(lgmc);
-                            yjxxsm.append(",旅馆地址:");
-                            yjxxsm.append(lgdz);
-                            yjxxsm.append(",入住人姓名:");
-                            yjxxsm.append(rzrXm);
-                            yjxxsm.append(",入住人身份证号:");
-                            yjxxsm.append(rzrSfzh);
-                            yjxxsm.append(",入住人联系电话:");
-                            yjxxsm.append(rzrLxdh);
-                            yjxxsm.append(",入住时间:");
-                            yjxxsm.append(rzsj);
-                            yjxxsm.append(",退房时间:");
-                            yjxxsm.append(tfsj);
-                            yjxxsm.append(",房间号:");
-                            yjxxsm.append(fjh);
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 /*if("DRYJ-BSJJ-LKZD".equals(mxbh)){   // 单人预警-本市进京-旅客住店
@@ -496,8 +519,27 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                 String centerLat84 = loc.getString("lat");
                                                 String radius = loc.getString("radius");
                                                 if(GeoUtils.isPointInCircle(Double.valueOf(lgwd), Double.valueOf(lgjd), Double.valueOf(centerLat84), Double.valueOf(centerLon84), Double.valueOf(radius)) && rzsjDateObj.compareTo(bkkssj) >= 0 && rzsjDateObj.compareTo(bkjssj) <= 0){
+                                                    String captureTimeJnryzs = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
+                                                    StringBuilder yjxxsm = new StringBuilder();
+                                                    yjxxsm.append("旅馆住宿 - 旅馆名称:");
+                                                    yjxxsm.append(lgmc);
+                                                    yjxxsm.append(",旅馆地址:");
+                                                    yjxxsm.append(lgdz);
+                                                    yjxxsm.append(",入住人姓名:");
+                                                    yjxxsm.append(rzrXm);
+                                                    yjxxsm.append(",入住人身份证号:");
+                                                    yjxxsm.append(rzrSfzh);
+                                                    yjxxsm.append(",入住人联系电话:");
+                                                    yjxxsm.append(rzrLxdh);
+                                                    yjxxsm.append(",入住时间:");
+                                                    yjxxsm.append(rzsj);
+                                                    yjxxsm.append(",退房时间:");
+                                                    yjxxsm.append(tfsj);
+                                                    yjxxsm.append(",房间号:");
+                                                    yjxxsm.append(fjh);
+                                                    yjxxsm.append(",命中区域:");
+                                                    yjxxsm.append(qymc);
                                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, rzrXm, rzrSfzh, rzrLxdh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, rzsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, lgjd, lgwd, currentTime, currentTime, null, null, null, qymc, lgdz, yjlx, Constants.YJLX_DRYJ, null, null});
-                                                    yjxxsm.setLength(0);
                                                     break;
                                                 }
                                             } else {   // 多边形区域
@@ -509,8 +551,27 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     coordinates.add(new Coordinate(Double.valueOf(vertexLon84), Double.valueOf(vertexLat84)));
                                                 }
                                                 if(GeoUtils.isPointInPolygon(coordinates, new Coordinate(Double.valueOf(lgjd), Double.valueOf(lgwd))) && rzsjDateObj.compareTo(bkkssj) >= 0 && rzsjDateObj.compareTo(bkjssj) <= 0){
+                                                    String captureTimeJnryzs = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
+                                                    StringBuilder yjxxsm = new StringBuilder();
+                                                    yjxxsm.append("旅馆住宿 - 旅馆名称:");
+                                                    yjxxsm.append(lgmc);
+                                                    yjxxsm.append(",旅馆地址:");
+                                                    yjxxsm.append(lgdz);
+                                                    yjxxsm.append(",入住人姓名:");
+                                                    yjxxsm.append(rzrXm);
+                                                    yjxxsm.append(",入住人身份证号:");
+                                                    yjxxsm.append(rzrSfzh);
+                                                    yjxxsm.append(",入住人联系电话:");
+                                                    yjxxsm.append(rzrLxdh);
+                                                    yjxxsm.append(",入住时间:");
+                                                    yjxxsm.append(rzsj);
+                                                    yjxxsm.append(",退房时间:");
+                                                    yjxxsm.append(tfsj);
+                                                    yjxxsm.append(",房间号:");
+                                                    yjxxsm.append(fjh);
+                                                    yjxxsm.append(",命中区域:");
+                                                    yjxxsm.append(qymc);
                                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, rzrXm, rzrSfzh, rzrLxdh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, rzsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, lgjd, lgwd, currentTime, currentTime, null, null, null, qymc, lgdz, yjlx, Constants.YJLX_DRYJ, null, null});
-                                                    yjxxsm.setLength(0);
                                                     break;
                                                 }
                                             }
@@ -518,7 +579,6 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     }
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeWbsw.equals(resourceCode)) {   // =========== 网吧上网数据
                             // 上网人员姓名
                             String swryXm = oriField.getString("INTE_PER_NAME");
@@ -554,32 +614,32 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
 //                            String frSfzh = oriField.getString("LEGAL_CRED_NUM");       // 法人身份证号
 //                            String frLxdh = oriField.getString("LEGAL_CTCT_TEL");       // 法人联系电话
                             String captureTimeWbsw = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
-                            yjxxsm.append("网吧上网 - 上网人员姓名:");
-                            yjxxsm.append(swryXm);
-                            yjxxsm.append(",上网人员身份证号:");
-                            yjxxsm.append(swrySfzh);
-                            yjxxsm.append(",上网人员联系电话:");
-                            yjxxsm.append(swryLxdh);
-                            yjxxsm.append(",上网终端编号:");
-                            yjxxsm.append(swzdbh);
-                            yjxxsm.append(",上网开始时间:");
-                            yjxxsm.append(swkssj);
-                            yjxxsm.append(",上网结束时间:");
-                            yjxxsm.append(swjssj);
-                            yjxxsm.append(",营业场所名称:");
-                            yjxxsm.append(yycsmc);
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 // 单人预警-本市敏感区域-网吧上网
                                 if(Constants.MODEL_CODE_BSMGQY_WBSW.equals(mxbh) && swkssjDateObj.compareTo(bkkssj) >= 0 && swkssjDateObj.compareTo(bkjssj) <= 0){
                                     // 表中无经、纬度数据,无法判断是否出现在布控区域
                                     // 暂时不做过滤处理
+                                    StringBuilder yjxxsm = new StringBuilder();
+                                    yjxxsm.append("网吧上网 - 上网人员姓名:");
+                                    yjxxsm.append(swryXm);
+                                    yjxxsm.append(",上网人员身份证号:");
+                                    yjxxsm.append(swrySfzh);
+                                    yjxxsm.append(",上网人员联系电话:");
+                                    yjxxsm.append(swryLxdh);
+                                    yjxxsm.append(",上网终端编号:");
+                                    yjxxsm.append(swzdbh);
+                                    yjxxsm.append(",上网开始时间:");
+                                    yjxxsm.append(swkssj);
+                                    yjxxsm.append(",上网结束时间:");
+                                    yjxxsm.append(swjssj);
+                                    yjxxsm.append(",营业场所名称:");
+                                    yjxxsm.append(yycsmc);
                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, swryXm, swrySfzh, swryLxdh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, swkssjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, null, null, currentTime, currentTime, null, null, null, null, yycsmc, yjlx, Constants.YJLX_DRYJ, null, null});
-                                    yjxxsm.setLength(0);
                                     break;
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeDt.equals(resourceCode)) {   // =========== 地铁交易数据
                             // 乘客姓名
                             String ckXm = oriField.getString("XM");
@@ -614,36 +674,36 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                             String dtXlxx = oriField.getString("DTXLXX");
                             String dtxlxx = StringUtils.isNotBlank(dtXlxx)? dtXlxx : "暂无";
                             String captureTimeDt = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
-                            yjxxsm.append("地铁数据 - 乘客姓名:");
-                            yjxxsm.append(ckXm);
-                            yjxxsm.append(",乘客身份证号:");
-                            yjxxsm.append(ckSfzh);
-                            yjxxsm.append(",乘客联系电话:");
-                            yjxxsm.append(ckLxdh);
-                            yjxxsm.append(",刷卡卡号:");
-                            yjxxsm.append(skkh);
-                            yjxxsm.append(",刷卡时间:");
-                            yjxxsm.append(sksj);
-                            yjxxsm.append(",车站名称:");
-                            yjxxsm.append(czmc);
-                            yjxxsm.append(",进出站标识名称:");
-                            yjxxsm.append(jczbsmc);
-                            yjxxsm.append(",闸机号:");
-                            yjxxsm.append(zjh);
-                            yjxxsm.append(",地铁线路信息:");
-                            yjxxsm.append(dtxlxx);
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 // 单人预警-本市敏感区域-地铁
                                 if(Constants.MODEL_CODE_BSMGQY_DT.equals(mxbh) && sksjDateObj.compareTo(bkkssj) >= 0 && sksjDateObj.compareTo(bkjssj) <= 0){
                                     // 表中无经、纬度数据,无法判断是否出现在布控区域
                                     // 暂时不做过滤处理
+                                    StringBuilder yjxxsm = new StringBuilder();
+                                    yjxxsm.append("地铁数据 - 乘客姓名:");
+                                    yjxxsm.append(ckXm);
+                                    yjxxsm.append(",乘客身份证号:");
+                                    yjxxsm.append(ckSfzh);
+                                    yjxxsm.append(",乘客联系电话:");
+                                    yjxxsm.append(ckLxdh);
+                                    yjxxsm.append(",刷卡卡号:");
+                                    yjxxsm.append(skkh);
+                                    yjxxsm.append(",刷卡时间:");
+                                    yjxxsm.append(sksj);
+                                    yjxxsm.append(",车站名称:");
+                                    yjxxsm.append(czmc);
+                                    yjxxsm.append(",进出站标识名称:");
+                                    yjxxsm.append(jczbsmc);
+                                    yjxxsm.append(",闸机号:");
+                                    yjxxsm.append(zjh);
+                                    yjxxsm.append(",地铁线路信息:");
+                                    yjxxsm.append(dtxlxx);
                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, ckXm, ckSfzh, ckLxdh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, sksjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, null, null, currentTime, currentTime, null, null, null, null, czmc, yjlx, Constants.YJLX_DRYJ, null, null});
-                                    yjxxsm.setLength(0);
                                     break;
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeSjrd.equals(resourceCode)) {   // =========== 手机热点
                             // 移动电话
                             String yddhSrc = oriField.getString("YDDH");
@@ -683,29 +743,29 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                 JSONObject rspJSONObj = JSON.parseObject(rspStr);
                                 addressName = rspJSONObj.getString("fullAddress");
                             }
-                            yjxxsm.append("手机热点 - 移动电话:");
-                            yjxxsm.append(yddh);
-                            yjxxsm.append(",IMSI:");
-                            yjxxsm.append(imsi);
-                            yjxxsm.append(",IMEI:");
-                            yjxxsm.append(imei);
-                            yjxxsm.append(",位置区域信息编号:");
-                            yjxxsm.append(wzqyxxbh);
-                            yjxxsm.append(",关联时间:");
-                            yjxxsm.append(glsj);
-                            yjxxsm.append(",位置信息:");
-                            yjxxsm.append(StringUtils.isNotBlank(addressName)? addressName : "暂无");
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 // 单人预警-本市进京-手机热点
                                 if(Constants.MODEL_CODE_BSJJ_SJRD.equals(mxbh) && glsjDateObj.compareTo(bkkssj) >= 0 && glsjDateObj.compareTo(bkjssj) <= 0){
                                     // 不做过滤处理
+                                    StringBuilder yjxxsm = new StringBuilder();
+                                    yjxxsm.append("手机热点 - 移动电话:");
+                                    yjxxsm.append(yddh);
+                                    yjxxsm.append(",IMSI:");
+                                    yjxxsm.append(imsi);
+                                    yjxxsm.append(",IMEI:");
+                                    yjxxsm.append(imei);
+                                    yjxxsm.append(",位置区域信息编号:");
+                                    yjxxsm.append(wzqyxxbh);
+                                    yjxxsm.append(",关联时间:");
+                                    yjxxsm.append(glsj);
+                                    yjxxsm.append(",位置信息:");
+                                    yjxxsm.append(StringUtils.isNotBlank(addressName)? addressName : "暂无");
                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, yjrySfzh, yddh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, glsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, jd, wd, currentTime, currentTime, null, null, null, null, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                    yjxxsm.setLength(0);
                                     break;
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeXlpc.equals(resourceCode)) {   // =========== 巡逻盘查(人员)
                             // 卡口信息ID
                             /*String kakXxId = oriField.getString("KAK_XXID");
@@ -775,49 +835,49 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                 JSONObject rspJSONObj = JSON.parseObject(rspStr);
                                 addressName = rspJSONObj.getString("fullAddress");
                             }
-                            yjxxsm.append("巡逻盘查 - 人员姓名:");
-                            yjxxsm.append(xm);
-                            yjxxsm.append(",人员身份证号:");
-                            yjxxsm.append(sfzh);
-                            yjxxsm.append(",人员联系电话:");
-                            yjxxsm.append(lxdh);
-                            yjxxsm.append(",籍贯:");
-                            yjxxsm.append(jg);
-                            yjxxsm.append(",民族:");
-                            yjxxsm.append(mz);
-                            yjxxsm.append(",居住地详细地址:");
-                            yjxxsm.append(jzdxxdz);
-                            yjxxsm.append(",盘查时间:");
-                            yjxxsm.append(pcsj);
-                            yjxxsm.append(",卡口名称:");
-                            yjxxsm.append(kkmc);
-                            yjxxsm.append(",终端串号:");
-                            yjxxsm.append(zdchjyqk);
-                            yjxxsm.append(",盘查民警姓名:");
-                            yjxxsm.append(pcmjXm);
-                            yjxxsm.append(",盘查民警警号:");
-                            yjxxsm.append(pcmjJh);
-                            yjxxsm.append(",盘查民警所属单位名称:");
-                            yjxxsm.append(pcmjSsdwmc);
-                            yjxxsm.append(",盘查处理结果:");
-                            yjxxsm.append(pccljg);
-                            yjxxsm.append(",盘查处理移交单位名称:");
-                            yjxxsm.append(pcclyjdwmc);
-                            yjxxsm.append(",业务类型名称:");
-                            yjxxsm.append(ywlx);
-                            yjxxsm.append(",盘查地位置信息:");
-                            yjxxsm.append(StringUtils.isNotBlank(addressName)? addressName : "暂无");
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 // 单人预警-本市进京-巡逻盘查
                                 if(Constants.MODEL_CODE_BSJJ_XLPC.equals(mxbh) && pcsjDateObj.compareTo(bkkssj) >= 0 && pcsjDateObj.compareTo(bkjssj) <= 0){
                                     // 不做过滤处理
+                                    StringBuilder yjxxsm = new StringBuilder();
+                                    yjxxsm.append("巡逻盘查 - 人员姓名:");
+                                    yjxxsm.append(xm);
+                                    yjxxsm.append(",人员身份证号:");
+                                    yjxxsm.append(sfzh);
+                                    yjxxsm.append(",人员联系电话:");
+                                    yjxxsm.append(lxdh);
+                                    yjxxsm.append(",籍贯:");
+                                    yjxxsm.append(jg);
+                                    yjxxsm.append(",民族:");
+                                    yjxxsm.append(mz);
+                                    yjxxsm.append(",居住地详细地址:");
+                                    yjxxsm.append(jzdxxdz);
+                                    yjxxsm.append(",盘查时间:");
+                                    yjxxsm.append(pcsj);
+                                    yjxxsm.append(",卡口名称:");
+                                    yjxxsm.append(kkmc);
+                                    yjxxsm.append(",终端串号:");
+                                    yjxxsm.append(zdchjyqk);
+                                    yjxxsm.append(",盘查民警姓名:");
+                                    yjxxsm.append(pcmjXm);
+                                    yjxxsm.append(",盘查民警警号:");
+                                    yjxxsm.append(pcmjJh);
+                                    yjxxsm.append(",盘查民警所属单位名称:");
+                                    yjxxsm.append(pcmjSsdwmc);
+                                    yjxxsm.append(",盘查处理结果:");
+                                    yjxxsm.append(pccljg);
+                                    yjxxsm.append(",盘查处理移交单位名称:");
+                                    yjxxsm.append(pcclyjdwmc);
+                                    yjxxsm.append(",业务类型名称:");
+                                    yjxxsm.append(ywlx);
+                                    yjxxsm.append(",盘查地位置信息:");
+                                    yjxxsm.append(StringUtils.isNotBlank(addressName)? addressName : "暂无");
                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, xm, sfzh, lxdh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, pcsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, pcdJd, pcdWd, currentTime, currentTime, null, null, null, null, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                    yjxxsm.setLength(0);
                                     break;
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeZdjc.equals(resourceCode)) {   // =========== 站点检查(人员)
                             // 人员姓名
                             String xmSrc = oriField.getString("XM");
@@ -855,39 +915,39 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                             Date jcsjDateObj = StringUtils.isNotBlank(jicJdsj)? new Date(TimeTool.dateStringToTimeStamp3(jicJdsj) * 1000) : null;
 
                             String captureTimeZdjc = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
-                            yjxxsm.append("站点检查 - 人员姓名:");
-                            yjxxsm.append(xm);
-                            yjxxsm.append(",人员身份证号:");
-                            yjxxsm.append(sfzh);
-                            yjxxsm.append(",人员照片:");
-                            yjxxsm.append(ryzpUrl);
-                            yjxxsm.append(",民族:");
-                            yjxxsm.append(mz);
-                            yjxxsm.append(",地址:");
-                            yjxxsm.append(dz);
-                            yjxxsm.append(",检查警员编号:");
-                            yjxxsm.append(jybh);
-                            yjxxsm.append(",检查时间:");
-                            yjxxsm.append(jcsj);
-                            yjxxsm.append(",检查站名称:");
-                            yjxxsm.append(jczmc);
-                            yjxxsm.append(",发证机关:");
-                            yjxxsm.append(fzjg);
-                            yjxxsm.append(",证件有效起始日期:");
-                            yjxxsm.append(zjyxqsrq);
-                            yjxxsm.append(",证件有效终止日期:");
-                            yjxxsm.append(zjyxzzrq);
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 // 单人预警-本市进京-站点检查
                                 if(Constants.MODEL_CODE_BSJJ_ZDJC.equals(mxbh) && jcsjDateObj.compareTo(bkkssj) >= 0 && jcsjDateObj.compareTo(bkjssj) <= 0){
                                     // 不做过滤处理
+                                    StringBuilder yjxxsm = new StringBuilder();
+                                    yjxxsm.append("站点检查 - 人员姓名:");
+                                    yjxxsm.append(xm);
+                                    yjxxsm.append(",人员身份证号:");
+                                    yjxxsm.append(sfzh);
+                                    yjxxsm.append(",人员照片:");
+                                    yjxxsm.append(ryzpUrl);
+                                    yjxxsm.append(",民族:");
+                                    yjxxsm.append(mz);
+                                    yjxxsm.append(",地址:");
+                                    yjxxsm.append(dz);
+                                    yjxxsm.append(",检查警员编号:");
+                                    yjxxsm.append(jybh);
+                                    yjxxsm.append(",检查时间:");
+                                    yjxxsm.append(jcsj);
+                                    yjxxsm.append(",检查站名称:");
+                                    yjxxsm.append(jczmc);
+                                    yjxxsm.append(",发证机关:");
+                                    yjxxsm.append(fzjg);
+                                    yjxxsm.append(",证件有效起始日期:");
+                                    yjxxsm.append(zjyxqsrq);
+                                    yjxxsm.append(",证件有效终止日期:");
+                                    yjxxsm.append(zjyxzzrq);
                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, xm, sfzh, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, jcsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, null, null, currentTime, currentTime, null, null, null, null, jczmc, yjlx, Constants.YJLX_DRYJ, null, null});
-                                    yjxxsm.setLength(0);
                                     break;
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeDzwl.equals(resourceCode)) {   // =========== 电子围栏(火车站)
                             // 移动电话
                             String mob = oriField.getString("MOB");
@@ -930,26 +990,27 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                 JSONObject rspJSONObj = JSON.parseObject(rspStr);
                                 addressName = rspJSONObj.getString("fullAddress");
                             }
-                            yjxxsm.append("火车站电围 - 移动电话:");
-                            yjxxsm.append(yddh);
-                            yjxxsm.append(",IMSI:");
-                            yjxxsm.append(imsi);
-                            yjxxsm.append(",IMEI:");
-                            yjxxsm.append(imei);
-                            yjxxsm.append(",手机MAC地址:");
-                            yjxxsm.append(sjMac);
+
                             for (Map<String, Object> modelInfoMap : modelInfoList) {
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 if(Constants.MODEL_CODE_BSJJ_HCZDW.equals(mxbh)){   // 单人预警-本市进京-火车站电围
                                     // 业务需求:只保留命中点位在火车站区域内的数据
                                     if(GeoUtils.isPointInCircle(Double.valueOf(jzdqWd), Double.valueOf(jzdqJd), Double.valueOf(centerPointLatTJZ), Double.valueOf(centerPointLonTJZ), Double.valueOf(radiusTJZ)) && captureTimeDzwlDateObj.compareTo(bkkssj) >= 0 && captureTimeDzwlDateObj.compareTo(bkjssj) <= 0){
+                                        StringBuilder yjxxsm = new StringBuilder();
+                                        yjxxsm.append("火车站电围 - 移动电话:");
+                                        yjxxsm.append(yddh);
+                                        yjxxsm.append(",IMSI:");
+                                        yjxxsm.append(imsi);
+                                        yjxxsm.append(",IMEI:");
+                                        yjxxsm.append(imei);
+                                        yjxxsm.append(",手机MAC地址:");
+                                        yjxxsm.append(sjMac);
+                                        yjxxsm.append(",命中区域:天津站");
                                         warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, yjrySfzh, yddh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, captureTimeDzwlDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, jzdqJd, jzdqWd, currentTime, currentTime, null, null, null, Constants.QYMC_TJZ, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                        yjxxsm.setLength(0);
                                         break;
                                     }
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeRlgz.equals(resourceCode)) {   // =========== 人脸感知(火车站/本市)
                             // 抓拍机编号
                             /*String snashoMachNo = oriField.getString("SNASHO_MACH_NO");
@@ -991,6 +1052,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                 if(Constants.MODEL_CODE_BSJJ_HCZRLGZ.equals(mxbh)){   // 单人预警-本市进京-火车站人脸感知
                                     // 业务需求:只保留命中点位在火车站区域内的数据
                                     if(GeoUtils.isPointInCircle(Double.valueOf(wd), Double.valueOf(jd), Double.valueOf(centerPointLatTJZ), Double.valueOf(centerPointLonTJZ), Double.valueOf(radiusTJZ)) && gjsjDateObj.compareTo(bkkssj) >= 0 && gjsjDateObj.compareTo(bkjssj) <= 0){
+                                        StringBuilder yjxxsm = new StringBuilder();
                                         yjxxsm.append("火车站人脸感知 - 抓拍机名称:");
                                         yjxxsm.append(zpjmc);
                                         yjxxsm.append(",告警人员证件号码:");
@@ -999,24 +1061,19 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         yjxxsm.append(gjsj);
                                         yjxxsm.append(",人脸图片文件路径:");
                                         yjxxsm.append(rltpwjlj);
+                                        yjxxsm.append(",位置信息:");
+                                        yjxxsm.append(addressName);
+                                        yjxxsm.append(",命中区域:天津站");
                                         warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, gjryZjhm, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, gjsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, jd, wd, currentTime, currentTime, null, null, null, Constants.QYMC_TJZ, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                        yjxxsm.setLength(0);
                                     }
                                 } else if (Constants.MODEL_CODE_BSMGQY_BSRL.equals(mxbh)) {   // 单人预警-本市敏感区域-本市人脸
                                     // 业务需求:只保留命中点位在当前任务记录的布控区域内的数据
-                                    yjxxsm.append("本市人脸 - 抓拍机名称:");
-                                    yjxxsm.append(zpjmc);
-                                    yjxxsm.append(",告警人员证件号码:");
-                                    yjxxsm.append(gjryZjhm);
-                                    yjxxsm.append(",告警时间:");
-                                    yjxxsm.append(gjsj);
-                                    yjxxsm.append(",人脸图片文件路径:");
-                                    yjxxsm.append(rltpwjlj);
                                     // 过滤不在布控区域范围的数据
                                     JSONArray areaInfoList = JSON.parseArray(bkqyxx);
-                                    if(areaInfoList != null && areaInfoList.size() > 0){
+                                    if(areaInfoList != null && !areaInfoList.isEmpty()){
                                         for (Object obj : areaInfoList) {
                                             JSONObject ctrlAreaInfo = (JSONObject) obj;
+                                            String areaCode = (String) ctrlAreaInfo.get("qybh");
                                             String areaName = (String) ctrlAreaInfo.get("qymc");
                                             Integer geoType = (Integer) ctrlAreaInfo.get("qyjhlx");
                                             JSONObject locationJSONObj = JSON.parseObject(String.valueOf(ctrlAreaInfo.get("qyfwjwdjhFh")));
@@ -1028,10 +1085,27 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                 String centerLat84 = loc.getString("lat");
                                                 String radius = loc.getString("radius");
                                                 if(GeoUtils.isPointInCircle(Double.valueOf(wd), Double.valueOf(jd), Double.valueOf(centerLat84), Double.valueOf(centerLon84), Double.valueOf(radius)) && gjsjDateObj.compareTo(bkkssj) >= 0 && gjsjDateObj.compareTo(bkjssj) <= 0){
-                                                    yjxxsm.append(",所在区域:");
-                                                    yjxxsm.append(areaName);
+                                                    StringBuilder yjxxsm = new StringBuilder();
+                                                    if(Constants.QYBH_TJS.equals(areaCode)){
+                                                        yjxxsm.append("进入本地预警");
+                                                    } else {
+                                                        yjxxsm.append("进入敏感区域");
+                                                    }
+                                                    yjxxsm.append(" - 抓拍机名称:");
+                                                    yjxxsm.append(zpjmc);
+                                                    yjxxsm.append(",告警人员证件号码:");
+                                                    yjxxsm.append(gjryZjhm);
+                                                    yjxxsm.append(",告警时间:");
+                                                    yjxxsm.append(gjsj);
+                                                    yjxxsm.append(",人脸图片文件路径:");
+                                                    yjxxsm.append(rltpwjlj);
+                                                    yjxxsm.append(",位置信息:");
+                                                    yjxxsm.append(addressName);
+                                                    if(!Constants.QYBH_TJS.equals(areaCode)){
+                                                        yjxxsm.append(",命中区域:");
+                                                        yjxxsm.append(areaName);
+                                                    }
                                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, gjryZjhm, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, gjsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, jd, wd, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                                    yjxxsm.setLength(0);
                                                     break;
                                                 }
                                             } else {
@@ -1043,18 +1117,36 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     coordinates.add(new Coordinate(Double.valueOf(vertexLon84), Double.valueOf(vertexLat84)));
                                                 }
                                                 if(GeoUtils.isPointInPolygon(coordinates, new Coordinate(Double.valueOf(jd), Double.valueOf(wd))) && gjsjDateObj.compareTo(bkkssj) >= 0 && gjsjDateObj.compareTo(bkjssj) <= 0){
-                                                    yjxxsm.append(",所在区域:");
-                                                    yjxxsm.append(areaName);
+                                                    StringBuilder yjxxsm = new StringBuilder();
+                                                    if(Constants.QYBH_TJS.equals(areaCode)){
+                                                        yjxxsm.append("进入本地预警");
+                                                    } else {
+                                                        yjxxsm.append("进入敏感区域");
+                                                    }
+                                                    yjxxsm.append(" - 抓拍机名称:");
+                                                    yjxxsm.append(zpjmc);
+                                                    yjxxsm.append(",告警人员证件号码:");
+                                                    yjxxsm.append(gjryZjhm);
+                                                    yjxxsm.append(",告警时间:");
+                                                    yjxxsm.append(gjsj);
+                                                    yjxxsm.append(",人脸图片文件路径:");
+                                                    yjxxsm.append(rltpwjlj);
+                                                    yjxxsm.append(",位置信息:");
+                                                    yjxxsm.append(addressName);
+                                                    if(!Constants.QYBH_TJS.equals(areaCode)){
+                                                        yjxxsm.append(",命中区域:");
+                                                        yjxxsm.append(areaName);
+                                                    }
                                                     warningInfoList.add(new Object[]{rwbh, rwmc, rwlx, rwlxmc, rwdxlxmc, yjxxbh, yjryXm, gjryZjhm, yjrySjh, yjxxsm.toString(), yjzt, Constants.YJZT_WD, gjsjDateObj, zrjz, zrmjid, zrmjxm, zrmjjh, zrmjlxfs, zrdwbm, CommonUtil.getConfValueByKeyDept(zrdwbm), zrbmbm, CommonUtil.getConfValueByKeyDept(zrbmbm), sqrXm, sqrSfzh, sqrJh, sqrDwbm, sqrDwmc, yjryLb, yjryBq, gkjb, gkjbmc, resourceCode, jd, wd, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null});
-                                                    yjxxsm.setLength(0);
                                                     break;
                                                 }
                                             }
                                         }
+                                    } else {
+
                                     }
                                 }
                             }
-                            yjxxsm.setLength(0);
                         } else if (resCodeGmszy.equals(resourceCode)) {   // =========== 购买散装油
                             // ------ todo
 
@@ -1064,7 +1156,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                     }
                 }
                 // ========================= 批量入库符合条件的预警数据
-                if(warningInfoList.size() > 0){
+                if(!warningInfoList.isEmpty()){
                     batchSaveNum = ctrlDao.batchInsertWarningInfo(warningInfoList);
                 }
                 log.info("【QBEQSJYCTRL - 单人预警消费者服务】 当次消费到的数据量:{},符合条件保存入库的数据量:{}", records.count(), batchSaveNum);

+ 8 - 8
src/main/resources/application.properties

@@ -64,8 +64,8 @@ fwkfpt.serviceId=673976555399020544
 
 # \u534E\u4E3A - kafka\u914D\u7F6E
 # kafka\u96C6\u7FA4\u8BA4\u8BC1\u914D\u7F6E\u6587\u4EF6\u5B58\u653E\u8DEF\u5F84
-#kafka.properties.path=/home/QBEQSJY/kafka/
-kafka.properties.path=C:\\Users\\Administrator\\Desktop\\pfj\\idea_project\\QBEQSJY\\src\\main\\resources\\kafka\\
+kafka.properties.path=/home/QBEQSJY/kafka/
+#kafka.properties.path=C:\\Users\\Administrator\\Desktop\\pfj\\idea_project\\QBEQSJY\\src\\main\\resources\\kafka\\
 # \u4E1A\u52A1topic
 topic.name=UNICTRL_DATA_QBEQSJYCTRL_V1.0
 # \u662F\u5426\u5F00\u542F\u591A\u7EBF\u7A0B\u6267\u884C\u4EFB\u52A1 - false\uFF1A\u9ED8\u8BA4\u53EA\u5F00\u542F\u4E00\u4E2A\u5B50\u7EBF\u7A0B
@@ -73,10 +73,10 @@ multi.thread.enabled=false
 # \u6267\u884C\u4EFB\u52A1\u7684\u7EBF\u7A0B\u6570\u91CF - \u5F53[multi.thread.enabled=true]\u65F6\u8BE5\u914D\u7F6E\u751F\u6548\uFF0C\u5426\u5219\u65E0\u6548
 thread.num=5
 # \u4EE5.txt\u6587\u4EF6\u8BB0\u5F55\u5E03/\u505C\u63A7\u5931\u8D25\u7EBF\u7D22\u6570\u636E\u8F93\u51FA\u8DEF\u5F84
-#ctrl.txt.output.path=/home/QBEQSJY/ctrl_error/
-#stop.ctrl.txt.output.path=/home/QBEQSJY/stop_ctrl_error/
-ctrl.txt.output.path=C:\\Users\\Administrator\\Desktop\\pfj\\qbeqsjy\\ctrl_error
-stop.ctrl.txt.output.path=C:\\Users\\Administrator\\Desktop\\pfj\\qbeqsjy\\stop_ctrl_error
+ctrl.txt.output.path=/home/QBEQSJY/ctrl_error/
+stop.ctrl.txt.output.path=/home/QBEQSJY/stop_ctrl_error/
+#ctrl.txt.output.path=C:\\Users\\Administrator\\Desktop\\pfj\\qbeqsjy\\ctrl_error
+#stop.ctrl.txt.output.path=C:\\Users\\Administrator\\Desktop\\pfj\\qbeqsjy\\stop_ctrl_error
 # \u9884\u8B66\u6570\u636E\u67E5\u8BE2\u4E00\u6B21\u6700\u5927\u8FD4\u56DE\u6570\u636E\u6761\u6570\uFF0C\u9ED8\u8BA410000\u6761
 query.max.count=10000
 
@@ -111,8 +111,8 @@ res.code.gmszy=991C3201000512
 
 
 # \u5929\u6D25\u7AD9\u5706\u5F62\u533A\u57DF\u5706\u5FC3\u70B9\u7ECF\u7EAC\u5EA6\uFF0884\u5750\u6807\u7CFB\uFF09
-centerPoint.lon.tjz=117.xxx
-centerPoint.lat.tjz=39.xxx
+centerPoint.lon.tjz=117.210061
+centerPoint.lat.tjz=39.135884
 # \u534A\u5F84\uFF0C\u5355\u4F4D\uFF1A\u7C73
 radius.tjz=500