Browse Source

修复空指针

欧阳劲驰 2 months ago
parent
commit
c200dc8efd

+ 3 - 0
src/main/java/com/shkpr/service/alambizplugin/components/GisSurveySystemChecker.java

@@ -23,6 +23,7 @@ import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyPoint;
 import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckId;
 import com.shkpr.service.alambizplugin.dto.GisSurveySystemCheckResultDetail;
 import com.shkpr.service.alambizplugin.dto.TypeDefine;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.AsyncResult;
 import org.springframework.stereotype.Component;
@@ -45,6 +46,7 @@ import java.util.function.Consumer;
  * @since 1.0.0
  */
 @Component
+@Slf4j
 public class GisSurveySystemChecker {
     /**
      * log
@@ -309,6 +311,7 @@ public class GisSurveySystemChecker {
                             e
                     )
             );
+            log.error("StackTrac:", e);
 
             //清除子任务
             if (isolatedPointsFuture != null) isolatedPointsFuture.cancel(true);

+ 2 - 2
src/main/java/com/shkpr/service/alambizplugin/components/checker/ElevationDiffFinder.java

@@ -71,7 +71,7 @@ public class ElevationDiffFinder {
                     })
                     .filter(line -> {
                         //勘测长度字符串判断
-                        if (StringUtils.isBlank(line.getSurveyLength()) && NumberUtils.isParsable(line.getSurveyLength()))
+                        if (StringUtils.isBlank(line.getSurveyLength()) && !NumberUtils.isParsable(line.getSurveyLength()))
                             return false;
                         try {
                             //判断高程差是否大于勘测长度
@@ -111,7 +111,7 @@ public class ElevationDiffFinder {
         long end = System.currentTimeMillis();
         LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
                 , String.format(
-                        "结束执行寻找孤立点,用时(毫秒):%d"
+                        "结束执行高程差异常,用时(毫秒):%d"
                         , (end - begin)
                 )
         );