소스 검색

修改漫游点数据结构

xiewenjie 3 년 전
부모
커밋
fad7582bcc
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ImportDataController.java

+ 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());