gushoubang 9 mesiacov pred
rodič
commit
9b1c8911c1
1 zmenil súbory, kde vykonal 10 pridanie a 10 odobranie
  1. 10 10
      app.py

+ 10 - 10
app.py

@@ -173,8 +173,8 @@ def jsonResToDict(json_res):
         "xmmc": "规划选址项目_"+formatted_time,
         "jsdw": "建设单位",
         "ydxz_bsm": landType,
-        "ydmjbegin": json_res["ydmjbegin"],
-        "ydmjend":  json_res["ydmjend"],
+        "ydmjbegin": json_res["area"]["min"],
+        "ydmjend":  json_res["area"]["max"],
         "geomId": geomId,
         "yxyz": [],
         # TODO: 循环遍历
@@ -193,15 +193,15 @@ def jsonResToDict(json_res):
         #         }
         #     }
         # ],
-        "useMultiple": json_res["useMultiple"],
-        "useLandType": json_res["useLandType"],
-        "multipleDistance": json_res["multipleDistance"]
+        # "useMultiple": json_res["useMultiple"],
+        # "useLandType": json_res["useLandType"],
+        # "multipleDistance": json_res["multipleDistance"]
     }
     # 循环遍历输入因子
-    factors = json_res["yxyz"]
+    factors = json_res["factors"]
     input_factors = {}
     for factor in factors:
-        factorInfo = getFactorByName(factor["name"])
+        factorInfo = getFactorByName(factor["type"])
         if factorInfo == None:
             continue
         factorId = factorInfo["id"]
@@ -211,13 +211,13 @@ def jsonResToDict(json_res):
 
         factor_info = {
             "id": factorId,
-            "name": factor["name"],
+            "name": factor["type"],
             "bsm": factorBsm,
             "conditionInfo": {
                 "spatial_type": conditionObj["spatial_type"],
-                "default": factor["default"],
+                "default": factor["condition"],
                 "hasValue": conditionObj["hasValue"],
-                "defaultValue": factor["defaultValue"],
+                "defaultValue": factor["value"],
                 "unit": conditionObj["unit"],
                 "clip": conditionObj["clip"]
             }