Browse Source

保存模版修改

liaoyitao 1 month ago
parent
commit
d51c50d27c
2 changed files with 11 additions and 1 deletions
  1. 2 1
      .gitignore
  2. 9 0
      src/main/java/com/lqkj/link/module/zone/service/ZoneInfoService.java

+ 2 - 1
.gitignore

@@ -31,8 +31,9 @@ build/
31 31
 
32 32
 ### VS Code ###
33 33
 .vscode/
34
-/config/application.yml
34
+/config/application1.2.0.yml
35 35
 /log/*.log
36 36
 log
37 37
 log/
38 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 210
             Map<String, ModelInfo> modelPathIdMap = modelInfoList
211 211
                     .stream()
212 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 217
             List<GeomInfo> geomInfoList = new ArrayList<>();
214 218
             GeometryFactory geometryFactory = new GeometryFactory();
215 219
             int j = 1;
216 220
             for (TemplateInfo templateInfo : templateInfoList) {
217 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 226
                 ModelInfo modelInfo = modelPathIdMap.get(modelName);
227
+
219 228
                 for (int i = 0; i < templateInfo.getLocation().size(); i++) {
220 229
                     JSONObject trans = templateInfo.getLocation().get(i);
221 230
                     GeomInfo geomInfo = new GeomInfo();