Explorar o código

【情报二期】数据域服务 - 数据消费逻辑优化

peifj hai 1 semana
pai
achega
129bf5a8b8

+ 56 - 39
src/main/java/com/hhwy/qbeqsjy/kafka/service/ConsumeService.java

@@ -135,9 +135,10 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                     String clueType = clueIdStrArr[Constants.NUM_2];
                     String clue = clueIdStrArr[Constants.NUM_3];
                     String resourceCode = uniCtrl.getString("U_RESID");
+                    String dataType = uniCtrl.getString("U_DATA_TYPE");
                     // 每张布控资源表对应的命中数据JSON对象
                     JSONObject oriField = message.getJSONObject("ORIFIELD");
-                    log.info(oriField.toJSONString());
+                    log.info("任务编号:{},命中线索:{},命中数据资源类型:{},布控数据资源编码:{},原始数据:{}", rwbh, clue, dataType, resourceCode, message.toJSONString());
                     // 生成预警信息编号
                     String yjxxbh = String.valueOf(generator.nextId());
                     // 预警状态默认为0(未读)
@@ -147,7 +148,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                     Date currentTime = new Date();
                     // 根据clueId中的任务编号、线索值、线索类型查询对应的布控任务相关信息(包含任务信息、数据资源信息、区域信息、线索信息)
                     List<Map<String, Object>> ctrlTaskInfoList = ctrlDao.queryCtrlTaskInfo(rwbh, clue, clueType);
-                    if(ctrlTaskInfoList.size() > 0){
+                    if(!ctrlTaskInfoList.isEmpty()){
                         Map<String, Object> ctrlTaskInfo = ctrlTaskInfoList.get(0);
                         String rwmc = String.valueOf(ctrlTaskInfo.get("rwmc"));
                         Integer rwlx = (Integer) ctrlTaskInfo.get("rwlx");
@@ -185,7 +186,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                         // 根据任务编号查询对应的模型配置信息
                         List<Map<String, Object>> modelInfoList = ctrlDao.queryCtrlTaskModelInfo(rwbh);
 
-                        if(resCodeAUTH.equals(resourceCode)){   // =========== AUTH认证数据
+                        if(resCodeAUTH.equals(dataType)){   // =========== AUTH认证数据
                             // 1. ========================= 过滤基站号、经纬度为空的数据
                             String baseStationId = oriField.getString("BASE_STATION_ID");
                             String lonBD = oriField.getString("LONGITUDE");
@@ -222,7 +223,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         String centerLon84 = loc.getString("lon");
                                         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){
+                                        boolean pointInCircleFlag = GeoUtils.isPointInCircle(Double.valueOf(lat84), Double.valueOf(lon84), Double.valueOf(centerLat84), Double.valueOf(centerLon84), Double.valueOf(radius));
+                                        log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", areaName, pointInCircleFlag);
+                                        if(pointInCircleFlag && captureTimeDateObj.compareTo(bkkssj) >= 0 && captureTimeDateObj.compareTo(bkjssj) <= 0){
                                             StringBuilder yjxxsm = new StringBuilder();
                                             if(Constants.QYBH_TJS.equals(areaCode)){
                                                 yjxxsm.append("进入本地预警 - ");
@@ -241,7 +244,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                             Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh(areaCode);
                                             String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                             String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                            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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                            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, CommonUtil.getConfValueByKeyApp(dataType), lon84, lat84, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                             break;
                                         }
                                     } else {   // 布控区域是一般多边形
@@ -252,7 +255,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                             String vertexLat84 = loc.getString("lat");
                                             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){
+                                        boolean pointInPolygonFlag = GeoUtils.isPointInPolygon(coordinates, new Coordinate(Double.valueOf(lon84), Double.valueOf(lat84)));
+                                        log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", areaName, pointInPolygonFlag);
+                                        if(pointInPolygonFlag && captureTimeDateObj.compareTo(bkkssj) >= 0 && captureTimeDateObj.compareTo(bkjssj) <= 0){
                                             StringBuilder yjxxsm = new StringBuilder();
                                             if(Constants.QYBH_TJS.equals(areaCode)){
                                                 yjxxsm.append("进入本地预警 - ");
@@ -271,7 +276,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                             Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh(areaCode);
                                             String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                             String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                            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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                            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, CommonUtil.getConfValueByKeyApp(dataType), lon84, lat84, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                             break;
                                         }
                                     }
@@ -285,10 +290,10 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                    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, CommonUtil.getConfValueByKeyApp(dataType), lon84, lat84, currentTime, currentTime, null, null, null, Constants.QYMC_TJS, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                 }
                             }
-                        } else if(resCodeKy.equals(resourceCode)){   // =========== 客运数据
+                        } else if(resCodeKy.equals(dataType)){   // =========== 客运数据
                             // 票号
                             /*String trainTicNo = oriField.getString("TRAIN_TIC_NO");
                             String ph = StringUtils.isNotBlank(trainTicNo)? trainTicNo : "暂无";*/
@@ -358,12 +363,12 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                        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, CommonUtil.getConfValueByKeyApp(dataType), null, null, currentTime, currentTime, null, null, null, null, null, yjlx, Constants.YJLX_DRYJ, seatNo, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                         break;
                                     }
                                 }
                             }
-                        } else if (resCodeMhdp.equals(resourceCode)) {   // =========== 民航订票数据
+                        } else if (resCodeMhdp.equals(dataType)) {   // =========== 民航订票数据
                             // 订座记录编号
                             /*String ordseatRecoNo = oriField.getString("ORDSEAT_RECO_NO");
                             String dzjlbh = StringUtils.isNotBlank(ordseatRecoNo)? ordseatRecoNo : "暂无";*/
@@ -432,7 +437,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                        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, CommonUtil.getConfValueByKeyApp(dataType), null, null, currentTime, currentTime, null, null, null, null, ddjcmc, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                         break;
                                     }
                                 } else if (Constants.MODEL_CODE_KSGJ_MHDP.equals(mxbh)) {   // 单人预警-跨省轨迹-民航订票
@@ -456,12 +461,12 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                        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, CommonUtil.getConfValueByKeyApp(dataType), null, null, currentTime, currentTime, null, null, null, null, ddjcmc, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                         break;
                                     }
                                 }
                             }
-                        } else if (resCodeJnryzs.equals(resourceCode)) {   // =========== 境内人员住宿数据
+                        } else if (resCodeJnryzs.equals(dataType)) {   // =========== 境内人员住宿数据
                             // 旅馆编号
                             String lgbh = oriField.getString("HOTEL_NO");
                             String[] lgxxArr = CommonUtil.getConfValueByKeyHotel(lgbh).split("@");
@@ -532,7 +537,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                 String centerLon84 = loc.getString("lon");
                                                 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){
+                                                boolean pointInCircleFlag = GeoUtils.isPointInCircle(Double.valueOf(lgwd), Double.valueOf(lgjd), Double.valueOf(centerLat84), Double.valueOf(centerLon84), Double.valueOf(radius));
+                                                log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", qymc, pointInCircleFlag);
+                                                if(pointInCircleFlag && rzsjDateObj.compareTo(bkkssj) >= 0 && rzsjDateObj.compareTo(bkjssj) <= 0){
                                                     String captureTimeJnryzs = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
                                                     StringBuilder yjxxsm = new StringBuilder();
                                                     yjxxsm.append("旅馆住宿 - 旅馆名称:");
@@ -556,7 +563,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh(areaCode);
                                                     String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                                     String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                                    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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                                    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, CommonUtil.getConfValueByKeyApp(dataType), lgjd, lgwd, currentTime, currentTime, null, null, null, qymc, lgdz, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                                     break;
                                                 }
                                             } else {   // 多边形区域
@@ -567,7 +574,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     String vertexLat84 = loc.getString("lat");
                                                     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){
+                                                boolean pointInPolygonFlag = GeoUtils.isPointInPolygon(coordinates, new Coordinate(Double.valueOf(lgjd), Double.valueOf(lgwd)));
+                                                log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", qymc, pointInPolygonFlag);
+                                                if(pointInPolygonFlag && rzsjDateObj.compareTo(bkkssj) >= 0 && rzsjDateObj.compareTo(bkjssj) <= 0){
                                                     String captureTimeJnryzs = TimeTool.timeStampToDateString(Long.valueOf(oriField.getString("CAPTURE_TIME")));
                                                     StringBuilder yjxxsm = new StringBuilder();
                                                     yjxxsm.append("旅馆住宿 - 旅馆名称:");
@@ -591,7 +600,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh(areaCode);
                                                     String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                                     String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                                    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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                                    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, CommonUtil.getConfValueByKeyApp(dataType), lgjd, lgwd, currentTime, currentTime, null, null, null, qymc, lgdz, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                                     break;
                                                 }
                                             }
@@ -599,7 +608,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     }
                                 }
                             }
-                        } else if (resCodeWbsw.equals(resourceCode)) {   // =========== 网吧上网数据
+                        } else if (resCodeWbsw.equals(dataType)) {   // =========== 网吧上网数据
                             // 上网人员姓名
                             String swryXm = oriField.getString("INTE_PER_NAME");
                             // 上网人员身份证号
@@ -656,11 +665,11 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                    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, CommonUtil.getConfValueByKeyApp(dataType), null, null, currentTime, currentTime, null, null, null, null, yycsmc, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                     break;
                                 }
                             }
-                        } else if (resCodeDt.equals(resourceCode)) {   // =========== 地铁交易数据
+                        } else if (resCodeDt.equals(dataType)) {   // =========== 地铁交易数据
                             // 乘客姓名
                             String ckXm = oriField.getString("XM");
                             // 乘客身份证号
@@ -720,11 +729,11 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                    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, CommonUtil.getConfValueByKeyApp(dataType), null, null, currentTime, currentTime, null, null, null, null, czmc, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                     break;
                                 }
                             }
-                        } else if (resCodeSjrd.equals(resourceCode)) {   // =========== 手机热点
+                        } else if (resCodeSjrd.equals(dataType)) {   // =========== 手机热点
                             // 移动电话
                             String yddhSrc = oriField.getString("YDDH");
                             String yddh = StringUtils.isNotBlank(yddhSrc)? yddhSrc : yjrySjh;
@@ -782,11 +791,11 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                    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, CommonUtil.getConfValueByKeyApp(dataType), jd, wd, currentTime, currentTime, null, null, null, null, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                     break;
                                 }
                             }
-                        } else if (resCodeXlpc.equals(resourceCode)) {   // =========== 巡逻盘查(人员)
+                        } else if (resCodeXlpc.equals(dataType)) {   // =========== 巡逻盘查(人员)
                             // 卡口信息ID
                             /*String kakXxId = oriField.getString("KAK_XXID");
                             String kkxxId = StringUtils.isNotBlank(kakXxId)? kakXxId : "暂无";*/
@@ -894,11 +903,11 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                    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, CommonUtil.getConfValueByKeyApp(dataType), pcdJd, pcdWd, currentTime, currentTime, null, null, null, null, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                     break;
                                 }
                             }
-                        } else if (resCodeZdjc.equals(resourceCode)) {   // =========== 站点检查(人员)
+                        } else if (resCodeZdjc.equals(dataType)) {   // =========== 站点检查(人员)
                             // 人员姓名
                             String xmSrc = oriField.getString("XM");
                             String xm = StringUtils.isNotBlank(xmSrc)? xmSrc : "暂无";
@@ -964,11 +973,11 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     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, null, null, null, sftsed, sftssd, zrmjsfzh});
+                                    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, CommonUtil.getConfValueByKeyApp(dataType), null, null, currentTime, currentTime, null, null, null, null, jczmc, yjlx, Constants.YJLX_DRYJ, null, null, null, null, null, sftsed, sftssd, zrmjsfzh});
                                     break;
                                 }
                             }
-                        } else if (resCodeDzwl.equals(resourceCode)) {   // =========== 电子围栏(火车站)
+                        } else if (resCodeDzwl.equals(dataType)) {   // =========== 电子围栏(火车站)
                             // 移动电话
                             String mob = oriField.getString("MOB");
                             String yddh = StringUtils.isNotBlank(mob)? mob : yjrySjh;
@@ -1015,7 +1024,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                 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){
+                                    boolean pointInCircleFlag = GeoUtils.isPointInCircle(Double.valueOf(jzdqWd), Double.valueOf(jzdqJd), Double.valueOf(centerPointLatTJZ), Double.valueOf(centerPointLonTJZ), Double.valueOf(radiusTJZ));
+                                    log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", Constants.QYMC_TJZ, pointInCircleFlag);
+                                    if(pointInCircleFlag && captureTimeDzwlDateObj.compareTo(bkkssj) >= 0 && captureTimeDzwlDateObj.compareTo(bkjssj) <= 0){
                                         StringBuilder yjxxsm = new StringBuilder();
                                         yjxxsm.append("火车站电围 - 移动电话:");
                                         yjxxsm.append(yddh);
@@ -1029,12 +1040,12 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh("TJZ");
                                         String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                         String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                        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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                        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, CommonUtil.getConfValueByKeyApp(dataType), jzdqJd, jzdqWd, currentTime, currentTime, null, null, null, Constants.QYMC_TJZ, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                         break;
                                     }
                                 }
                             }
-                        } else if (resCodeRlgz.equals(resourceCode)) {   // =========== 人脸感知(火车站/本市)
+                        } else if (resCodeRlgz.equals(dataType)) {   // =========== 人脸感知(火车站/本市)
                             // 抓拍机编号
                             /*String snashoMachNo = oriField.getString("SNASHO_MACH_NO");
                             String zpjbh = StringUtils.isNotBlank(snashoMachNo)? snashoMachNo : "暂无";*/
@@ -1074,7 +1085,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                 String mxbh = (String) modelInfoMap.get("mxbh");
                                 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){
+                                    boolean pointInCircleFlag = GeoUtils.isPointInCircle(Double.valueOf(wd), Double.valueOf(jd), Double.valueOf(centerPointLatTJZ), Double.valueOf(centerPointLonTJZ), Double.valueOf(radiusTJZ));
+                                    log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", Constants.QYMC_TJZ, pointInCircleFlag);
+                                    if(pointInCircleFlag && gjsjDateObj.compareTo(bkkssj) >= 0 && gjsjDateObj.compareTo(bkjssj) <= 0){
                                         StringBuilder yjxxsm = new StringBuilder();
                                         yjxxsm.append("火车站人脸感知 - 抓拍机名称:");
                                         yjxxsm.append(zpjmc);
@@ -1090,7 +1103,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                         Map<String, String> tjzFxmjxxMap = ctrlDao.queryFxmjxxByQybh("TJZ");
                                         String edFxmjSfzh = tjzFxmjxxMap.get("edFxmjSfzh");
                                         String sdFxmjSfzh = tjzFxmjxxMap.get("sdFxmjSfzh");
-                                        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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                        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, CommonUtil.getConfValueByKeyApp(dataType), jd, wd, currentTime, currentTime, null, null, null, Constants.QYMC_TJZ, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                     }
                                 } else if (Constants.MODEL_CODE_BSMGQY_BSRL.equals(mxbh)) {   // 单人预警-本市敏感区域-本市人脸
                                     // 业务需求:只保留命中点位在当前任务记录的布控区域内的数据
@@ -1110,7 +1123,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                 String centerLon84 = loc.getString("lon");
                                                 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){
+                                                boolean pointInCircleFlag = GeoUtils.isPointInCircle(Double.valueOf(wd), Double.valueOf(jd), Double.valueOf(centerLat84), Double.valueOf(centerLon84), Double.valueOf(radius));
+                                                log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", areaName, pointInCircleFlag);
+                                                if(pointInCircleFlag && gjsjDateObj.compareTo(bkkssj) >= 0 && gjsjDateObj.compareTo(bkjssj) <= 0){
                                                     StringBuilder yjxxsm = new StringBuilder();
                                                     if(Constants.QYBH_TJS.equals(areaCode)){
                                                         yjxxsm.append("进入本地预警");
@@ -1134,7 +1149,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh(areaCode);
                                                     String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                                     String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                                    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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                                    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, CommonUtil.getConfValueByKeyApp(dataType), jd, wd, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                                     break;
                                                 }
                                             } else {
@@ -1145,7 +1160,9 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     String vertexLat84 = loc.getString("lat");
                                                     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){
+                                                boolean pointInPolygonFlag = GeoUtils.isPointInPolygon(coordinates, new Coordinate(Double.valueOf(jd), Double.valueOf(wd)));
+                                                log.info("预警点位是否出现在当前任务布控区域【{}】内判断结果:{}", areaName, pointInPolygonFlag);
+                                                if(pointInPolygonFlag && gjsjDateObj.compareTo(bkkssj) >= 0 && gjsjDateObj.compareTo(bkjssj) <= 0){
                                                     StringBuilder yjxxsm = new StringBuilder();
                                                     if(Constants.QYBH_TJS.equals(areaCode)){
                                                         yjxxsm.append("进入本地预警");
@@ -1169,7 +1186,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                                     Map<String, String> fxmjxxMap = ctrlDao.queryFxmjxxByQybh(areaCode);
                                                     String edFxmjSfzh = fxmjxxMap.get("edFxmjSfzh");
                                                     String sdFxmjSfzh = fxmjxxMap.get("sdFxmjSfzh");
-                                                    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, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
+                                                    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, CommonUtil.getConfValueByKeyApp(dataType), jd, wd, currentTime, currentTime, null, null, null, areaName, addressName, yjlx, Constants.YJLX_DRYJ, null, null, null, edFxmjSfzh, sdFxmjSfzh, sftsed, sftssd, zrmjsfzh});
                                                     break;
                                                 }
                                             }
@@ -1179,7 +1196,7 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
                                     }
                                 }
                             }
-                        } /*else if (resCodeGmszy.equals(resourceCode)) {   // =========== 购买散装油
+                        } /*else if (resCodeGmszy.equals(dataType)) {   // =========== 购买散装油
                             // ------ todo
 
 

+ 88 - 0
src/main/java/com/hhwy/qbeqsjy/service/CronTaskService.java

@@ -0,0 +1,88 @@
+package com.hhwy.qbeqsjy.service;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.hhwy.qbeqsjy.common.CommonUtil;
+import com.hhwy.qbeqsjy.common.Constants;
+import com.hhwy.qbeqsjy.common.HttpClient;
+import com.hhwy.qbeqsjy.dao.CtrlDao;
+import com.hhwy.qbeqsjy.domain.AjaxResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 定时任务业务类
+ */
+@Slf4j
+@Service
+@EnableScheduling
+public class CronTaskService {
+
+    @Resource
+    private CtrlDao ctrlDao;
+    @Resource
+    private CtrlService ctrlService;
+
+
+    /**
+     * 定时任务:处理布控失败线索数据,重新下发布控,间隔30分钟执行一次
+     */
+    @Scheduled(cron = "0 */30 * * * ?")
+    public void processCtrlErrorClue(){
+        int ctrlNum = 0;
+        int ctrlSuccessNum = 0;
+        HttpClient httpClient = new HttpClient();
+        List<Map<String, Object>> ctrlErrorClueList = ctrlDao.queryCtrlErrorClueInfo();
+        if(!ctrlErrorClueList.isEmpty()){
+            for (Map<String, Object> itemMap : ctrlErrorClueList) {
+                String taskId = (String) itemMap.get("task_id");
+                String clue = (String) itemMap.get("clue");
+                String clueType = (String) itemMap.get("clue_type");
+                String endCtrlTime = (String) itemMap.get("end_ctrl_time");
+                String resourceIdListJSONStr = (String) itemMap.get("resource_id_list_json");   // ["123", "456"]
+                // 组装布控参数
+                Map<String, Object> clueMap = new HashMap<>();
+                clueMap.put("taskId", taskId);
+                clueMap.put("clue", clue);
+                clueMap.put("clueType", clueType);
+                clueMap.put("endCtrlTime", endCtrlTime);
+                clueMap.put("resourceIdList", resourceIdListJSONStr);
+                AjaxResult result = ctrlService.doCtrl(httpClient, clueMap);
+                int code = (int) result.get("code");
+                if(code == 500){
+                    log.error("任务ID:{},线索值:{},布控失败 等待下一次任务继续实施布控", taskId, clue);
+                } else {
+                    JSONObject data = (JSONObject) result.get("data");
+                    if(data == null){
+                        String msg = (String) result.get("msg");
+                        log.info("任务ID:{},线索值:{},布控服务返回信息:{}", taskId, clue, msg);
+                    } else {
+                        String clueId = data.getString("clueId");
+                        log.info("任务ID:{},线索值:{},线索ID:{}", taskId, clue, clueId);
+                        // 删除布控失败线索信息表中的对应记录
+                        ctrlDao.deleteCtrlErrorClueInfo(taskId, clue);
+                        ctrlSuccessNum++;
+                    }
+                }
+                ctrlNum++;
+                // 每布控5000条线索,当前线程睡眠30s,减轻【统一布控】服务端压力
+                if(ctrlNum == Constants.NUM_5000){
+                    CommonUtil.threadSleep(Constants.NUM_30000);
+                    ctrlNum = 0;
+                }
+            }
+        }
+        log.info("============== 【定时任务】 处理布控失败线索重新下发布控任务 执行完成,需重试布控的线索数量:{},重试布控成功的线索数量:{}", ctrlErrorClueList.size(), ctrlSuccessNum);
+    }
+
+
+
+}

+ 41 - 16
src/main/resources/application.properties

@@ -77,40 +77,65 @@ thread.num=5
 #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
+# \u9884\u8B66\u6570\u636E\u67E5\u8BE2\u4E00\u6B21\u6700\u5927\u8FD4\u56DE\u6570\u636E\u6761\u6570\uFF0C\u9ED8\u8BA41000\u6761
+query.max.count=1000
 
 
 # \u652F\u6301\u5E03\u63A7\u7684\u6570\u636E\u8D44\u6E90\u5217\u8868
 # AUTH\u8BA4\u8BC1\u6570\u636E
-res.code.auth=134B102
-# \u5BA2\u8FD0\u6570\u636E
-res.code.ky=991C1516
+#res.code.auth=134B102
+res.code.auth=AUTH
+# \u5BA2\u8FD0\u4E58\u8F66
+#res.code.ky=991C1516
+res.code.ky=KYCC
 # \u6C11\u822A\u8BA2\u7968
-res.code.mhdp=991C1233
+#res.code.mhdp=991C1233
+res.code.mhdp=MHDP
 # \u5883\u5185\u4EBA\u5458\u4F4F\u5BBF
-res.code.jnryzs=991C1223
+#res.code.jnryzs=991C1223
+res.code.jnryzs=JNRYZS
 # \u7F51\u5427\u4E0A\u7F51
-res.code.wbsw=991C1071
+#res.code.wbsw=991C1071
+res.code.wbsw=WBSW
 # \u5730\u94C1\u4EA4\u6613
-res.code.dt=01C1200002598
+#res.code.dt=01C1200002598
+res.code.dt=DTJY
 # \u624B\u673A\u70ED\u70B9
-res.code.sjrd=01C1200002597
+#res.code.sjrd=01C1200002597
+res.code.sjrd=SJRD
 # \u5DE1\u903B\u76D8\u67E5\uFF08\u4EBA\u5458\uFF09
-res.code.xlpc=01C1200001942
+#res.code.xlpc=01C1200001942
+res.code.xlpc=XLPC_RY
 # \u7AD9\u70B9\u68C0\u67E5\uFF08\u4EBA\u5458\uFF09
-res.code.zdjc=01C1200002316
+#res.code.zdjc=01C1200002316
+res.code.zdjc=ZDJC_RY
 # \u7535\u5B50\u56F4\u680F\uFF08\u706B\u8F66\u7AD9\uFF09
-res.code.dzwl=991C1356
+#res.code.dzwl=991C1356
+res.code.dzwl=DZWL_HCZ
 # \u4EBA\u8138\u611F\u77E5\uFF08\u706B\u8F66\u7AD9\uFF09
-res.code.rlgz=991C2304
+#res.code.rlgz=991C2304
+res.code.rlgz=RLGZ_HCZ
 # \u8D2D\u4E70\u6563\u88C5\u6CB9
 #res.code.gmszy=991C3201000512
 
 
+# \u6570\u636E\u8D44\u6E90\u7C7B\u578B(U_DATA_TYPE) \u4E0E \u6570\u636E\u8D44\u6E90\u7F16\u7801 \u5B57\u5178
+AUTH=134B102
+KYCC=991C1516
+MHDP=991C1233
+JNRYZS=991C1223
+WBSW=991C1071
+DTJY=01C1200002598
+SJRD=01C1200002597
+XLPC_RY=01C1200001942
+ZDJC_RY=01C1200002316
+DZWL_HCZ=991C1356
+RLGZ_HCZ=991C2304
+
+
 # \u5929\u6D25\u7AD9\u5706\u5F62\u533A\u57DF\u5706\u5FC3\u70B9\u7ECF\u7EAC\u5EA6\uFF0884\u5750\u6807\u7CFB\uFF09
-centerPoint.lon.tjz=117.210061
-centerPoint.lat.tjz=39.135884
+centerPoint.lon.tjz=117.20154566438113
+centerPoint.lat.tjz=39.13545980734351
 # \u534A\u5F84\uFF0C\u5355\u4F4D\uFF1A\u7C73
 radius.tjz=500