Sfoglia il codice sorgente

修改返回量表数据接口的字段名

hujing 6 anni fa
parent
commit
8faad378cf

+ 4 - 4
graph/src/main/java/org/diagbot/graph/jdbc/Neo4jAPI.java

@@ -1655,7 +1655,7 @@ public class Neo4jAPI {
         List<TreeMap<String, Object>> results = new ArrayList<>();
         List<Object> titles;
 
-        threeLevelItems.put("type", "");
+        threeLevelItems.put("scaleType", "");
 
         try {
             String query1 = "match (m:Scale)-[r1]->(n1)-[r2]->(n2) WHERE m.name=~'.*" + scaleName + ".*' return n1.name,n1.method,r1.score,n2.name," +
@@ -1729,7 +1729,7 @@ public class Neo4jAPI {
             for (TreeMap<String, Object> resMap:results) {
                 resMap.remove("priority");
             }
-            threeLevelItems.put("result", results);
+            threeLevelItems.put("formula", results);
 
             Map<String, List<Map<String, String>>> nameDetails = new HashMap<>();
             List<TreeMap<String, Object>> finalResult = new ArrayList<>();
@@ -1781,7 +1781,7 @@ public class Neo4jAPI {
 
                 detailsResult.put("name", key.split("_")[0]);
                 detailsResult.put("details", value);
-                detailsResult.put("type",0);
+                detailsResult.put("controltype",0);
                 detailsResult.put("priority",key.split("_")[1]);
                 finalResult.add(detailsResult);
             }
@@ -1797,7 +1797,7 @@ public class Neo4jAPI {
             for (TreeMap<String, Object> map:finalResult) {
                 map.remove("priority");
             }
-            threeLevelItems.put("details", finalResult);
+            threeLevelItems.put("rows", finalResult);
         } catch (Exception ex) {
             ex.printStackTrace();
             System.out.println("返回带得分需要计算的量表时出了问题!---->getScaleCalc");