Browse Source

保存模版修改

liaoyitao 1 month ago
parent
commit
d51c50d27c

+ 2 - 1
.gitignore

@@ -31,8 +31,9 @@ build/
31
 
31
 
32
 ### VS Code ###
32
 ### VS Code ###
33
 .vscode/
33
 .vscode/
34
-/config/application.yml
34
+/config/application1.2.0.yml
35
 /log/*.log
35
 /log/*.log
36
 log
36
 log
37
 log/
37
 log/
38
 /upload/
38
 /upload/
39
+/config/application.yml

+ 9 - 0
src/main/java/com/lqkj/link/module/zone/service/ZoneInfoService.java

@@ -210,12 +210,21 @@ public class ZoneInfoService {
210
             Map<String, ModelInfo> modelPathIdMap = modelInfoList
210
             Map<String, ModelInfo> modelPathIdMap = modelInfoList
211
                     .stream()
211
                     .stream()
212
                     .collect(Collectors.toMap(ModelInfo::getOriginalPath, ModelInfo -> ModelInfo));
212
                     .collect(Collectors.toMap(ModelInfo::getOriginalPath, ModelInfo -> ModelInfo));
213
+            Map<String, String> collect = null;
214
+            if (zoneInfo1.getTypeNumber() == 1) {
215
+                collect = modelInfoList.stream().collect(Collectors.toMap(ModelInfo::getModelName, ModelInfo::getOriginalPath));
216
+            }
213
             List<GeomInfo> geomInfoList = new ArrayList<>();
217
             List<GeomInfo> geomInfoList = new ArrayList<>();
214
             GeometryFactory geometryFactory = new GeometryFactory();
218
             GeometryFactory geometryFactory = new GeometryFactory();
215
             int j = 1;
219
             int j = 1;
216
             for (TemplateInfo templateInfo : templateInfoList) {
220
             for (TemplateInfo templateInfo : templateInfoList) {
217
                 String modelName = templateInfo.getModelPath();
221
                 String modelName = templateInfo.getModelPath();
222
+                if (zoneInfo1.getTypeNumber() == 1) {
223
+                    assert collect != null;
224
+                    modelName = collect.get(modelName.substring(0, modelName.lastIndexOf(".")).toLowerCase());
225
+                }
218
                 ModelInfo modelInfo = modelPathIdMap.get(modelName);
226
                 ModelInfo modelInfo = modelPathIdMap.get(modelName);
227
+
219
                 for (int i = 0; i < templateInfo.getLocation().size(); i++) {
228
                 for (int i = 0; i < templateInfo.getLocation().size(); i++) {
220
                     JSONObject trans = templateInfo.getLocation().get(i);
229
                     JSONObject trans = templateInfo.getLocation().get(i);
221
                     GeomInfo geomInfo = new GeomInfo();
230
                     GeomInfo geomInfo = new GeomInfo();