Browse Source

修改漫游点数据结构

xiewenjie 3 years ago
parent
commit
fad7582bcc

+ 6 - 2
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ImportDataController.java

@@ -200,7 +200,9 @@ public class ImportDataController extends BaseController {
                 puck.put("y", puck.getDoubleValue("y") * -1);
                 puck.remove("z");
                 newJson.put("puck", puck);
-                roamingPoint.add(newJson);
+                Map<Object, Object> newData = new HashMap<>();
+                newData.put(objectJson.getString("subgroup"), newJson);
+                roamingPoint.add(newData);
             }
             FileUtils.writeFile(filePath + File.separator + "roamingPoint.json", roamingPoint.toJSONString());
 
@@ -539,7 +541,9 @@ public class ImportDataController extends BaseController {
                             puck.put("y", puck.getDoubleValue("y") * -1);
                             puck.remove("z");
                             newJson.put("puck", puck);
-                            roamingPoint.add(newJson);
+                            Map<Object, Object> newData = new HashMap<>();
+                            newData.put(objectJson.getString("subgroup"), newJson);
+                            roamingPoint.add(newData);
                         }
                         FileUtils.writeFile(basePath + File.separator + "roamingPoint.json", roamingPoint.toJSONString());