Browse Source

修复一处最新修改,只考虑一条主要的致贫风险就好

root 1 year ago
parent
commit
74afd42f58
1 changed files with 8 additions and 7 deletions
  1. 8 7
      data_verification.py

+ 8 - 7
data_verification.py

@@ -430,13 +430,14 @@ def check_risk_type(ws, row_num, title_dict):
         return key
 
     risks = []
-    for i in range(1, 6):
-        key = get_key_for(i)
-        if key not in title_dict:
-            return
-        risk = ws[f"{title_dict[key]}{row_num}"].value
-        if risk is not None and len(risk) > 0:
-            risks.append((risk, i))
+    # 最新修改,只需要筛查致贫风险1了
+    # for i in range(1, 6):
+    key = get_key_for(1)
+    if key not in title_dict:
+        return
+    risk = ws[f"{title_dict[key]}{row_num}"].value
+    if risk is not None and len(risk) > 0:
+        risks.append((risk, i))
 
     # 定义:健康帮扶,"综合保障,社会帮扶,义务教育保障, 教育帮扶, 住房安全保障, 搬迁, 饮水安全保障, 产业帮扶, 就业帮扶, 金融帮扶, 公益岗位帮扶等常量
     HEALTH_SUPPORT = "健康帮扶"