소스 검색

修复线未判断上下游节点、线检查了超出范围、异步结果获取到原对象异常,等问题

欧阳劲驰 2 달 전
부모
커밋
6546161b77

+ 2 - 1
src/main/java/com/shkpr/service/alambizplugin/bizservice/GisSurveyThirdImportBizService.java

@@ -84,10 +84,11 @@ public class GisSurveyThirdImportBizService {
                     return thirdImportResult;
                 }
             } catch (InterruptedException | ExecutionException e) {
-                //打印报错信息(不太可能走到这)
+                //打印报错信息
                 LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
                         , String.format("检查历史失败异常 任务id:%s msg:%s", params.getJobId(), e.getMessage())
                 );
+                return GisSurveyThirdImportResult.fail(params);
             }
         }
 

+ 4 - 3
src/main/java/com/shkpr/service/alambizplugin/components/GisSurveyThirdImporter.java

@@ -157,11 +157,12 @@ public class GisSurveyThirdImporter {
             //弃用子任务
             onDeprecatedSubtask.accept(params.getJobId());
             return new AsyncResult<>(result);
-        } catch (InterruptedException | ExecutionException | IOException e) {
+        } catch (InterruptedException | ExecutionException | IOException | RuntimeException e) {
             LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR, mBizType, mStrClassName
                     , String.format(
-                            "监测到中断或执行异常,开始清除子任务 任务id:%s",
-                            params.getJobId()
+                            "监测到中断或执行异常,开始清除子任务 任务id:%s error:%s",
+                            params.getJobId(),
+                            e
                     )
             );
 

+ 9 - 3
src/main/java/com/shkpr/service/alambizplugin/components/checker/InvalidPropertiesFinder.java

@@ -132,9 +132,6 @@ public class InvalidPropertiesFinder {
             else
                 //图层存在则检查图层
                 checkLayer(line, layerTemplate, missingRequirementsResult, invalidTypesResult, GisSurveyImportDefine.LayerType.LINE);
-            //检查坐标超出范围
-            if (checkOutRanges(line))
-                outRangesResult.add(GisSurveyThirdImportElement.create(line, GisSurveyImportDefine.LayerType.LINE));
         }
 
         long end = System.currentTimeMillis();
@@ -207,6 +204,15 @@ public class InvalidPropertiesFinder {
                         templateName = GisSurveyImportDefine.POINT.LAT;
                         break;
                 }
+            if (layerType == GisSurveyImportDefine.LayerType.LINE)
+                switch (propertyTemplate.getKey()) {
+                    case GisSurveyImportDefine.TEMPLATE.UP_NODE:
+                        templateName = GisSurveyImportDefine.LINE.UP_NO;
+                        break;
+                    case GisSurveyImportDefine.TEMPLATE.DOWN_NODE:
+                        templateName = GisSurveyImportDefine.LINE.DOWN_NO;
+                        break;
+                }
             //必填不存在则存入缺少必填
             if (!data.containsKey(templateName))
                 missingRequirementsResult.add(GisSurveyThirdImportElement.create(data,

+ 2 - 2
src/main/java/com/shkpr/service/alambizplugin/constants/GisSurveyImportDefine.java

@@ -41,8 +41,8 @@ public interface GisSurveyImportDefine {
         String CODE = "code";
         String LNG = "lng";
         String LAT = "lat";
-        String UP_NO = "up_no";
-        String DOWN_NO = "down_no";
+        String UP_NODE = "up_node";
+        String DOWN_NODE = "down_node";
     }
 
     /**