|
@@ -52,6 +52,7 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
+import java.util.concurrent.ConcurrentHashMap;
|
|
|
import java.util.concurrent.ExecutionException;
|
|
|
import java.util.function.Consumer;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -547,8 +548,11 @@ public class GisSurveyThirdImporter {
|
|
|
long begin = System.currentTimeMillis();
|
|
|
|
|
|
//点号规则
|
|
|
- final List<RuleFormatSetting> ruleFormat = gisSurveyJobInfoService.findRuleFormat(jobId);
|
|
|
- //并行遍历元素
|
|
|
+ final List<RuleFormatSetting> ruleFormat = jobInfoService.findRuleFormat(jobId);
|
|
|
+ //点号映射
|
|
|
+ Map<String, String> noMapping = new ConcurrentHashMap<>();
|
|
|
+
|
|
|
+ //并行遍历元素,处理点的点号
|
|
|
layerApplyList.parallelStream()
|
|
|
.filter(la -> Objects.equals(la.getKind(), GisMetadataDefine.TYPE_KINE.POINT))
|
|
|
.forEach(la -> {
|
|
@@ -566,7 +570,29 @@ public class GisSurveyThirdImporter {
|
|
|
la.getPropertyValues().stream()
|
|
|
.filter(it -> Objects.equals(it.getProperty(), GisSurveyExcelDefine.TEMPLATE.NO))
|
|
|
.forEach(it -> it.setValue(no));
|
|
|
+ //设置点号映射
|
|
|
+ noMapping.put(la.getCode(), no);
|
|
|
});
|
|
|
+ //处理线的上下点号
|
|
|
+ layerApplyList.parallelStream()
|
|
|
+ .filter(la -> Objects.equals(la.getKind(), GisMetadataDefine.TYPE_KINE.LINE))
|
|
|
+ .forEach(la -> {
|
|
|
+ //处理上点号
|
|
|
+ if (noMapping.containsKey(la.getUpNode())) {
|
|
|
+ //设置属性点号
|
|
|
+ la.getPropertyValues().stream()
|
|
|
+ .filter(it -> Objects.equals(it.getProperty(), GisSurveyExcelDefine.TEMPLATE.UP_NO))
|
|
|
+ .forEach(it -> it.setValue(noMapping.get(la.getUpNode())));
|
|
|
+ }
|
|
|
+ //处理下点号
|
|
|
+ if (noMapping.containsKey(la.getDownNode())) {
|
|
|
+ //设置属性点号
|
|
|
+ la.getPropertyValues().stream()
|
|
|
+ .filter(it -> Objects.equals(it.getProperty(), GisSurveyExcelDefine.TEMPLATE.DOWN_NO))
|
|
|
+ .forEach(it -> it.setValue(noMapping.get(la.getDownNode())));
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
long end = System.currentTimeMillis();
|
|
|
LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
|