|
@@ -1,5 +1,6 @@
|
|
package com.shkpr.service.alambizplugin.components;
|
|
package com.shkpr.service.alambizplugin.components;
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.core.type.TypeReference;
|
|
import com.global.base.log.LogLevelFlag;
|
|
import com.global.base.log.LogLevelFlag;
|
|
import com.global.base.log.LogPrintMgr;
|
|
import com.global.base.log.LogPrintMgr;
|
|
import com.shkpr.service.alambizplugin.apiparam.GisSurveyCheckParams;
|
|
import com.shkpr.service.alambizplugin.apiparam.GisSurveyCheckParams;
|
|
@@ -10,25 +11,28 @@ import com.shkpr.service.alambizplugin.components.checker.IsolatedPointsFinder;
|
|
import com.shkpr.service.alambizplugin.components.checker.OverlapLinesFinder;
|
|
import com.shkpr.service.alambizplugin.components.checker.OverlapLinesFinder;
|
|
import com.shkpr.service.alambizplugin.constants.CommAsyncStatusEnum;
|
|
import com.shkpr.service.alambizplugin.constants.CommAsyncStatusEnum;
|
|
import com.shkpr.service.alambizplugin.constants.GisSurveyCheckTypeEnum;
|
|
import com.shkpr.service.alambizplugin.constants.GisSurveyCheckTypeEnum;
|
|
-import com.shkpr.service.alambizplugin.constants.GisSurveySystemCheckResultPath;
|
|
|
|
|
|
+import com.shkpr.service.alambizplugin.constants.GisSurveySystemCheckKeys;
|
|
import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
|
|
import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
|
|
import com.shkpr.service.alambizplugin.dbdao.services.intef.GisSurveyLayerApplyService;
|
|
import com.shkpr.service.alambizplugin.dbdao.services.intef.GisSurveyLayerApplyService;
|
|
import com.shkpr.service.alambizplugin.dbdao.services.intef.TypeDefineService;
|
|
import com.shkpr.service.alambizplugin.dbdao.services.intef.TypeDefineService;
|
|
|
|
+import com.shkpr.service.alambizplugin.dto.CommAsyncResult;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyLine;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyLine;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyPoint;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyPoint;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckId;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckId;
|
|
-import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckResult;
|
|
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckResultDetail;
|
|
import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckResultDetail;
|
|
-import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckSubtask;
|
|
|
|
import com.shkpr.service.alambizplugin.dto.TypeDefine;
|
|
import com.shkpr.service.alambizplugin.dto.TypeDefine;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.AsyncResult;
|
|
import org.springframework.scheduling.annotation.AsyncResult;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.util.concurrent.ListenableFuture;
|
|
import org.springframework.util.concurrent.ListenableFuture;
|
|
|
|
|
|
|
|
+import java.nio.file.Files;
|
|
|
|
+import java.nio.file.Path;
|
|
import java.time.Duration;
|
|
import java.time.Duration;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
import java.util.concurrent.ExecutionException;
|
|
import java.util.concurrent.ExecutionException;
|
|
import java.util.function.Consumer;
|
|
import java.util.function.Consumer;
|
|
|
|
|
|
@@ -46,7 +50,7 @@ public class GisSurveySystemChecker {
|
|
private final String mStrClassName;
|
|
private final String mStrClassName;
|
|
private final String mBizType;
|
|
private final String mBizType;
|
|
|
|
|
|
- private final GisSurveySystemCheckResultManager systemCheckResultManager;
|
|
|
|
|
|
+ private final AsyncResultManager asyncResultManager;
|
|
private final GisSurveyLayerApplyService gisSurveyLayerApplyService;
|
|
private final GisSurveyLayerApplyService gisSurveyLayerApplyService;
|
|
private final TypeDefineService typeDefineService;
|
|
private final TypeDefineService typeDefineService;
|
|
private final IsolatedPointsFinder isolatedPointsFinder;
|
|
private final IsolatedPointsFinder isolatedPointsFinder;
|
|
@@ -55,14 +59,14 @@ public class GisSurveySystemChecker {
|
|
private final OverlapLinesFinder overlapLinesFinder;
|
|
private final OverlapLinesFinder overlapLinesFinder;
|
|
private final ElevationDiffFinder elevationDiffFinder;
|
|
private final ElevationDiffFinder elevationDiffFinder;
|
|
|
|
|
|
- public GisSurveySystemChecker(GisSurveySystemCheckResultManager systemCheckResultManager
|
|
|
|
|
|
+ public GisSurveySystemChecker(AsyncResultManager asyncResultManager
|
|
, GisSurveyLayerApplyService gisSurveyLayerApplyService, TypeDefineService typeDefineService
|
|
, GisSurveyLayerApplyService gisSurveyLayerApplyService, TypeDefineService typeDefineService
|
|
, IsolatedPointsFinder isolatedPointsFinder, IsolatedLinesFinder isolatedLinesFinder
|
|
, IsolatedPointsFinder isolatedPointsFinder, IsolatedLinesFinder isolatedLinesFinder
|
|
, DuplicatePointsFinder duplicatePointsFinder, OverlapLinesFinder overlapLinesFinder
|
|
, DuplicatePointsFinder duplicatePointsFinder, OverlapLinesFinder overlapLinesFinder
|
|
, ElevationDiffFinder elevationDiffFinder) {
|
|
, ElevationDiffFinder elevationDiffFinder) {
|
|
mStrClassName = "GisSurveySystemChecker";
|
|
mStrClassName = "GisSurveySystemChecker";
|
|
mBizType = LogFlagBusiType.BUSI_GIS_SURVEY.toStrValue();
|
|
mBizType = LogFlagBusiType.BUSI_GIS_SURVEY.toStrValue();
|
|
- this.systemCheckResultManager = systemCheckResultManager;
|
|
|
|
|
|
+ this.asyncResultManager = asyncResultManager;
|
|
this.gisSurveyLayerApplyService = gisSurveyLayerApplyService;
|
|
this.gisSurveyLayerApplyService = gisSurveyLayerApplyService;
|
|
this.typeDefineService = typeDefineService;
|
|
this.typeDefineService = typeDefineService;
|
|
this.isolatedPointsFinder = isolatedPointsFinder;
|
|
this.isolatedPointsFinder = isolatedPointsFinder;
|
|
@@ -81,16 +85,18 @@ public class GisSurveySystemChecker {
|
|
* @return 系统检查返回
|
|
* @return 系统检查返回
|
|
*/
|
|
*/
|
|
@Async
|
|
@Async
|
|
- public ListenableFuture<GisSurveySystemCheckResult> systemCheckTask(GisSurveyCheckParams params
|
|
|
|
- , Consumer<GisSurveySystemCheckSubtask> onStartSubtask, Consumer<GisSurveySystemCheckId> onDeprecatedSubtask) {
|
|
|
|
|
|
+ public ListenableFuture<CommAsyncResult<Map<String, GisSurveySystemCheckResultDetail>>> systemCheckTask(
|
|
|
|
+ GisSurveyCheckParams params
|
|
|
|
+ , Consumer<Map<String, ListenableFuture<GisSurveySystemCheckResultDetail>>> onStartSubtask
|
|
|
|
+ , Consumer<GisSurveySystemCheckId> onDeprecatedSubtask) {
|
|
//系统检查id
|
|
//系统检查id
|
|
GisSurveySystemCheckId systemCheckId = GisSurveySystemCheckId.generateId(params);
|
|
GisSurveySystemCheckId systemCheckId = GisSurveySystemCheckId.generateId(params);
|
|
- if (systemCheckId == null) return new AsyncResult<>(GisSurveySystemCheckResult.fail(params));
|
|
|
|
- //创建临时文件夹
|
|
|
|
- if (!systemCheckResultManager.createTempDirectory(systemCheckId))
|
|
|
|
- return new AsyncResult<>(GisSurveySystemCheckResult.fail(params));
|
|
|
|
|
|
+ if (systemCheckId == null) return new AsyncResult<>(CommAsyncResult.fail(null));
|
|
|
|
+
|
|
//构建返回
|
|
//构建返回
|
|
- GisSurveySystemCheckResult result = GisSurveySystemCheckResult.fail(params);
|
|
|
|
|
|
+ CommAsyncResult<Map<String, GisSurveySystemCheckResultDetail>> result = CommAsyncResult.fail(systemCheckId.toString());
|
|
|
|
+ result.setOperator(params.getOperator());
|
|
|
|
+
|
|
//孤立点任务
|
|
//孤立点任务
|
|
ListenableFuture<GisSurveySystemCheckResultDetail> isolatedPointsFuture = null;
|
|
ListenableFuture<GisSurveySystemCheckResultDetail> isolatedPointsFuture = null;
|
|
//孤立线任务
|
|
//孤立线任务
|
|
@@ -101,19 +107,21 @@ public class GisSurveySystemChecker {
|
|
ListenableFuture<GisSurveySystemCheckResultDetail> overlapLinesFuture = null;
|
|
ListenableFuture<GisSurveySystemCheckResultDetail> overlapLinesFuture = null;
|
|
//高程差任务
|
|
//高程差任务
|
|
ListenableFuture<GisSurveySystemCheckResultDetail> elevationDiffFuture = null;
|
|
ListenableFuture<GisSurveySystemCheckResultDetail> elevationDiffFuture = null;
|
|
|
|
+
|
|
//点集合
|
|
//点集合
|
|
List<GisSurveyLayerApplyPoint> points = null;
|
|
List<GisSurveyLayerApplyPoint> points = null;
|
|
//线集合
|
|
//线集合
|
|
List<GisSurveyLayerApplyLine> lines = null;
|
|
List<GisSurveyLayerApplyLine> lines = null;
|
|
- try {
|
|
|
|
- LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
|
|
|
|
- , String.format(
|
|
|
|
- "开始执行系统检查;检查类型 检查类型:%s code:%s"
|
|
|
|
- , systemCheckId.getCheckType().getFlag()
|
|
|
|
- , systemCheckId.getCode()
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
|
|
|
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
|
|
|
|
+ , String.format(
|
|
|
|
+ "开始执行系统检查;检查类型 检查类型:%s code:%s"
|
|
|
|
+ , systemCheckId.getCheckType().getFlag()
|
|
|
|
+ , systemCheckId.getCode()
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ try {
|
|
//根据项目查询点线信息
|
|
//根据项目查询点线信息
|
|
if (GisSurveyCheckTypeEnum.PROJECT == systemCheckId.getCheckType()) {
|
|
if (GisSurveyCheckTypeEnum.PROJECT == systemCheckId.getCheckType()) {
|
|
points = gisSurveyLayerApplyService.findAddPointByProjId(systemCheckId.getCode());
|
|
points = gisSurveyLayerApplyService.findAddPointByProjId(systemCheckId.getCode());
|
|
@@ -127,76 +135,123 @@ public class GisSurveySystemChecker {
|
|
//查询经纬度类型定义
|
|
//查询经纬度类型定义
|
|
List<TypeDefine> typeDefines = typeDefineService.findLatLng();
|
|
List<TypeDefine> typeDefines = typeDefineService.findLatLng();
|
|
|
|
|
|
|
|
+
|
|
|
|
+ //结果flag
|
|
|
|
+ final String FLAG = systemCheckId.getFlag();
|
|
|
|
+ //创建临时文件夹
|
|
|
|
+ if (!asyncResultManager.createTempDirectory(FLAG))
|
|
|
|
+ return new AsyncResult<>(result);
|
|
|
|
+
|
|
|
|
+ //子任务
|
|
|
|
+ HashMap<String, ListenableFuture<GisSurveySystemCheckResultDetail>> subtask = new HashMap<>();
|
|
|
|
+
|
|
//孤立点检查
|
|
//孤立点检查
|
|
if (points != null && lines != null) {
|
|
if (points != null && lines != null) {
|
|
- if (params.getIsolatedPointsStart())
|
|
|
|
|
|
+ if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.ISOLATED_POINTS)) {
|
|
isolatedPointsFuture = isolatedPointsFinder.findIsolatedPoints(points, lines, systemCheckId);
|
|
isolatedPointsFuture = isolatedPointsFinder.findIsolatedPoints(points, lines, systemCheckId);
|
|
|
|
+ subtask.put(GisSurveySystemCheckKeys.ISOLATED_POINTS, isolatedPointsFuture);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//重复点检查
|
|
//重复点检查
|
|
if (points != null) {
|
|
if (points != null) {
|
|
- if (params.getDuplicatePointsStart())
|
|
|
|
|
|
+ if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.DUPLICATE_POINTS)) {
|
|
duplicatePointsFuture = duplicatePointsFinder.findDuplicatePoints(points, typeDefines, systemCheckId);
|
|
duplicatePointsFuture = duplicatePointsFinder.findDuplicatePoints(points, typeDefines, systemCheckId);
|
|
|
|
+ subtask.put(GisSurveySystemCheckKeys.DUPLICATE_POINTS, duplicatePointsFuture);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//孤立线\重叠线\高程差异常检查
|
|
//孤立线\重叠线\高程差异常检查
|
|
if (lines != null) {
|
|
if (lines != null) {
|
|
- if (params.getIsolatedLinesStart())
|
|
|
|
|
|
+ if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.ISOLATED_LINES)) {
|
|
isolatedLinesFuture = isolatedLinesFinder.findIsolatedLines(lines, systemCheckId);
|
|
isolatedLinesFuture = isolatedLinesFinder.findIsolatedLines(lines, systemCheckId);
|
|
- if (params.getOverlapLinesStart())
|
|
|
|
|
|
+ subtask.put(GisSurveySystemCheckKeys.ISOLATED_LINES, isolatedLinesFuture);
|
|
|
|
+ }
|
|
|
|
+ if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.OVERLAP_LINES)) {
|
|
overlapLinesFuture = overlapLinesFinder.findOverlapLines(lines, systemCheckId);
|
|
overlapLinesFuture = overlapLinesFinder.findOverlapLines(lines, systemCheckId);
|
|
- if (params.getElevationDiffStart())
|
|
|
|
|
|
+ subtask.put(GisSurveySystemCheckKeys.OVERLAP_LINES, overlapLinesFuture);
|
|
|
|
+ }
|
|
|
|
+ if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.ELEVATION_DIFF)) {
|
|
elevationDiffFuture = elevationDiffFinder.findElevationDiff(lines, systemCheckId);
|
|
elevationDiffFuture = elevationDiffFinder.findElevationDiff(lines, systemCheckId);
|
|
|
|
+ subtask.put(GisSurveySystemCheckKeys.ELEVATION_DIFF, elevationDiffFuture);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//返回子任务
|
|
//返回子任务
|
|
- onStartSubtask.accept(
|
|
|
|
- new GisSurveySystemCheckSubtask(isolatedPointsFuture, isolatedLinesFuture, duplicatePointsFuture
|
|
|
|
- , overlapLinesFuture,elevationDiffFuture)
|
|
|
|
- );
|
|
|
|
|
|
+ onStartSubtask.accept(subtask);
|
|
|
|
+
|
|
|
|
+ //获取上次结果
|
|
|
|
+ CommAsyncResult<Map<String, GisSurveySystemCheckResultDetail>> lastResult = asyncResultManager.getResult(FLAG, new TypeReference<CommAsyncResult<Map<String, GisSurveySystemCheckResultDetail>>>() {
|
|
|
|
+ });
|
|
|
|
+ //设置数据
|
|
|
|
+ Map<String, GisSurveySystemCheckResultDetail> data = new HashMap<>();
|
|
|
|
+ if (lastResult != null && lastResult.getData() != null) data = lastResult.getData();
|
|
|
|
+ //设置数据时间
|
|
|
|
+ Map<String, LocalDateTime> refreshTimes = new HashMap<>();
|
|
|
|
+ if (lastResult != null && lastResult.getRefreshTimes() != null) refreshTimes = lastResult.getRefreshTimes();
|
|
|
|
|
|
//等待结果,并存入返回,优先监听点相关(执行速度快且只需要点集合,优先释放点集合内存)
|
|
//等待结果,并存入返回,优先监听点相关(执行速度快且只需要点集合,优先释放点集合内存)
|
|
if (isolatedPointsFuture != null) {
|
|
if (isolatedPointsFuture != null) {
|
|
//监听孤立点
|
|
//监听孤立点
|
|
final GisSurveySystemCheckResultDetail isolatedPointsResult = isolatedPointsFuture.get();
|
|
final GisSurveySystemCheckResultDetail isolatedPointsResult = isolatedPointsFuture.get();
|
|
- result.setIsolatedPointsResult(isolatedPointsResult);
|
|
|
|
|
|
+ data.put(GisSurveySystemCheckKeys.ISOLATED_POINTS, isolatedPointsResult);
|
|
|
|
+ refreshTimes.put(GisSurveySystemCheckKeys.ISOLATED_POINTS, params.getRefreshTime());
|
|
//释放点缓存(孤立点和重复点都完成时,后续不需要点数据,释放缓存节省内存)
|
|
//释放点缓存(孤立点和重复点都完成时,后续不需要点数据,释放缓存节省内存)
|
|
if (duplicatePointsFuture != null && duplicatePointsFuture.isDone()) points.clear();
|
|
if (duplicatePointsFuture != null && duplicatePointsFuture.isDone()) points.clear();
|
|
}
|
|
}
|
|
if (duplicatePointsFuture != null) {
|
|
if (duplicatePointsFuture != null) {
|
|
//监听重复点
|
|
//监听重复点
|
|
final GisSurveySystemCheckResultDetail duplicatePointsResult = duplicatePointsFuture.get();
|
|
final GisSurveySystemCheckResultDetail duplicatePointsResult = duplicatePointsFuture.get();
|
|
- result.setDuplicatePointsResult(duplicatePointsResult);
|
|
|
|
|
|
+ data.put(GisSurveySystemCheckKeys.DUPLICATE_POINTS, duplicatePointsResult);
|
|
|
|
+ refreshTimes.put(GisSurveySystemCheckKeys.DUPLICATE_POINTS, params.getRefreshTime());
|
|
//释放点缓存(孤立点和重复点都完成时,后续不需要点数据,释放缓存节省内存)
|
|
//释放点缓存(孤立点和重复点都完成时,后续不需要点数据,释放缓存节省内存)
|
|
if (isolatedPointsFuture != null && isolatedPointsFuture.isDone()) points.clear();
|
|
if (isolatedPointsFuture != null && isolatedPointsFuture.isDone()) points.clear();
|
|
}
|
|
}
|
|
if (isolatedLinesFuture != null) {
|
|
if (isolatedLinesFuture != null) {
|
|
- //监听重复线
|
|
|
|
|
|
+ //监听孤立线
|
|
final GisSurveySystemCheckResultDetail isolatedLinesResult = isolatedLinesFuture.get();
|
|
final GisSurveySystemCheckResultDetail isolatedLinesResult = isolatedLinesFuture.get();
|
|
- result.setIsolatedLinesResult(isolatedLinesResult);
|
|
|
|
|
|
+ data.put(GisSurveySystemCheckKeys.ISOLATED_LINES, isolatedLinesResult);
|
|
|
|
+ refreshTimes.put(GisSurveySystemCheckKeys.ISOLATED_LINES, params.getRefreshTime());
|
|
}
|
|
}
|
|
if (overlapLinesFuture != null) {
|
|
if (overlapLinesFuture != null) {
|
|
//监听重叠线
|
|
//监听重叠线
|
|
final GisSurveySystemCheckResultDetail overlapLinesResult = overlapLinesFuture.get();
|
|
final GisSurveySystemCheckResultDetail overlapLinesResult = overlapLinesFuture.get();
|
|
- result.setOverlapLinesResult(overlapLinesResult);
|
|
|
|
|
|
+ data.put(GisSurveySystemCheckKeys.OVERLAP_LINES, overlapLinesResult);
|
|
|
|
+ refreshTimes.put(GisSurveySystemCheckKeys.OVERLAP_LINES, params.getRefreshTime());
|
|
}
|
|
}
|
|
if (elevationDiffFuture != null) {
|
|
if (elevationDiffFuture != null) {
|
|
//监听高程差异常
|
|
//监听高程差异常
|
|
final GisSurveySystemCheckResultDetail elevationDiffResult = elevationDiffFuture.get();
|
|
final GisSurveySystemCheckResultDetail elevationDiffResult = elevationDiffFuture.get();
|
|
- result.setElevationDiffResult(elevationDiffResult);
|
|
|
|
|
|
+ data.put(GisSurveySystemCheckKeys.ELEVATION_DIFF, elevationDiffResult);
|
|
|
|
+ refreshTimes.put(GisSurveySystemCheckKeys.ELEVATION_DIFF, params.getRefreshTime());
|
|
}
|
|
}
|
|
|
|
|
|
//完成检查
|
|
//完成检查
|
|
- result.setCheckStatus(CommAsyncStatusEnum.SUCCESS.getCode());
|
|
|
|
|
|
+ result.setStatus(CommAsyncStatusEnum.SUCCESS.getCode());
|
|
result.setCompleteTime(LocalDateTime.now());
|
|
result.setCompleteTime(LocalDateTime.now());
|
|
|
|
+ result.setData(data);
|
|
|
|
+ result.setRefreshTimes(refreshTimes);
|
|
|
|
+ result.setSubitemKeys(params.getSubitemKeys());
|
|
|
|
|
|
//写入结果
|
|
//写入结果
|
|
- systemCheckResultManager.writeResult(result, systemCheckId, GisSurveySystemCheckResultPath.RESULT);
|
|
|
|
|
|
+ Path resultPath = asyncResultManager.writeJson(result, FLAG, AsyncResultManager.RESULT_FILE_NAME);
|
|
|
|
+ if (resultPath == null || !Files.exists(resultPath)) {
|
|
|
|
+ //弃用子任务
|
|
|
|
+ onDeprecatedSubtask.accept(systemCheckId);
|
|
|
|
+ //打印报错信息
|
|
|
|
+ LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
|
|
|
|
+ , String.format("第三方导出文件写入失败, 任务id:%s", systemCheckId)
|
|
|
|
+ );
|
|
|
|
+ return new AsyncResult<>(CommAsyncResult.fail(systemCheckId.toString()));
|
|
|
|
+ }
|
|
|
|
+
|
|
//替换结果
|
|
//替换结果
|
|
- if (!systemCheckResultManager.replaceResult(systemCheckId)) {
|
|
|
|
|
|
+ if (!asyncResultManager.replaceResult(FLAG)) {
|
|
//弃用子任务
|
|
//弃用子任务
|
|
onDeprecatedSubtask.accept(systemCheckId);
|
|
onDeprecatedSubtask.accept(systemCheckId);
|
|
- return new AsyncResult<>(GisSurveySystemCheckResult.fail(params));
|
|
|
|
|
|
+ return new AsyncResult<>(CommAsyncResult.fail(systemCheckId.toString()));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //弃用子任务
|
|
|
|
+ onDeprecatedSubtask.accept(systemCheckId);
|
|
LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
|
|
LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
|
|
, String.format(
|
|
, String.format(
|
|
"结束执行系统检查;检查类型: %s, code:%s , 用时(毫秒):%d",
|
|
"结束执行系统检查;检查类型: %s, code:%s , 用时(毫秒):%d",
|
|
@@ -205,9 +260,6 @@ public class GisSurveySystemChecker {
|
|
Duration.between(result.getRequestTime(), result.getCompleteTime()).toMillis()
|
|
Duration.between(result.getRequestTime(), result.getCompleteTime()).toMillis()
|
|
)
|
|
)
|
|
);
|
|
);
|
|
-
|
|
|
|
- //弃用子任务
|
|
|
|
- onDeprecatedSubtask.accept(systemCheckId);
|
|
|
|
return new AsyncResult<>(result);
|
|
return new AsyncResult<>(result);
|
|
} catch (InterruptedException | ExecutionException e) {
|
|
} catch (InterruptedException | ExecutionException e) {
|
|
LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
|
|
LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
|
|
@@ -227,7 +279,7 @@ public class GisSurveySystemChecker {
|
|
if (elevationDiffFuture != null) elevationDiffFuture.cancel(true);
|
|
if (elevationDiffFuture != null) elevationDiffFuture.cancel(true);
|
|
|
|
|
|
//失败信息
|
|
//失败信息
|
|
- result.setCheckStatus(CommAsyncStatusEnum.FAIL.getCode());
|
|
|
|
|
|
+ result.setStatus(CommAsyncStatusEnum.FAIL.getCode());
|
|
result.setCompleteTime(LocalDateTime.now());
|
|
result.setCompleteTime(LocalDateTime.now());
|
|
|
|
|
|
//弃用子任务
|
|
//弃用子任务
|