|
@@ -5,10 +5,10 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.hhwy.qbeqsjy.common.*;
|
|
|
import com.hhwy.qbeqsjy.dao.CtrlDao;
|
|
|
import com.hhwy.qbeqsjy.domain.AjaxResult;
|
|
|
-import com.hhwy.qbeqsjy.dto.CtrlDTO;
|
|
|
import com.hhwy.qbeqsjy.task.CtrlTask;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -53,18 +53,16 @@ public class CtrlService {
|
|
|
private String uniCtrlDelUrl;
|
|
|
@Value("${uniCtrl.query.url}")
|
|
|
private String uniCtrlQueryUrl;
|
|
|
+ @Autowired
|
|
|
+ private SameTravelService sameTravelService;
|
|
|
+ @Value("${clue.code.idCard}")
|
|
|
+ private String clueCodeIdCard;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 处理单人预警布控任务
|
|
|
- * @param ctrlDTO
|
|
|
*/
|
|
|
- public void processDRYJCtrl(CtrlDTO ctrlDTO) {
|
|
|
- String taskId = ctrlDTO.getTaskId();
|
|
|
- String endCtrlTime = ctrlDTO.getEndCtrlTime();
|
|
|
- List<Map<String, Object>> clueList = ctrlDTO.getClueList();
|
|
|
- List<String> resourceIdList = ctrlDTO.getResourceIdList();
|
|
|
- List<String> areaIdList = ctrlDTO.getAreaIdList();
|
|
|
+ public void processDRYJCtrl(String taskId, List<Map<String, Object>> clueList, List<String> resourceIdList, List<String> areaIdList, String endCtrlTime) {
|
|
|
// 默认只开启一个子线程处理任务
|
|
|
if(!Constants.MULTI_THREAD_ENABLED_FLAG.equals(multiThreadEnabled)){
|
|
|
ExecutorService executorService = Executors.newFixedThreadPool(Constants.NUM_1);
|
|
@@ -172,21 +170,22 @@ public class CtrlService {
|
|
|
|
|
|
/**
|
|
|
* 处理聚集预警布控任务
|
|
|
- * @param ctrlDTO
|
|
|
*/
|
|
|
- public void processJJYJCtrl(CtrlDTO ctrlDTO) {
|
|
|
- String taskId = ctrlDTO.getTaskId();
|
|
|
- List<Map<String, Object>> clueList = ctrlDTO.getClueList();
|
|
|
- List<String> resourceIdList = ctrlDTO.getResourceIdList();
|
|
|
+ public void processJJYJCtrl(String taskId, List<Map<String, Object>> clueList, List<String> resourceIdList, List<String> areaIdList) {
|
|
|
ExecutorService executorService = Executors.newFixedThreadPool(Constants.NUM_1);
|
|
|
executorService.execute(() -> {
|
|
|
- Date createTime = new Date();
|
|
|
- // --- todo
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- log.info("--- > 任务ID:{},线索集合布控完成", taskId);
|
|
|
+ for (String resourceId : resourceIdList) {
|
|
|
+ // 根据数据资源业务ID查询对应的模型信息
|
|
|
+ Map<String, Object> modelDictInfoMap = ctrlDao.queryModelDictInfo(Integer.valueOf(resourceId));
|
|
|
+ for (Map<String, Object> clueMap : clueList) {
|
|
|
+ String clue = String.valueOf(clueMap.get("clue"));
|
|
|
+ String clueType = String.valueOf(clueMap.get("clueType"));
|
|
|
+ if(clueCodeIdCard.equals(clueType)){
|
|
|
+ sameTravelService.callFHUniQueryService(taskId, clue, "", "");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ log.info("--- > 任务ID:{},线索集合同行类业务查询完成", taskId);
|
|
|
|
|
|
});
|
|
|
executorService.shutdown();
|