Преглед изворни кода

flask_app: 调整数据去代码逻辑

Signed-off-by: binren <zhangbr@elab-plus.com>
binren пре 5 година
родитељ
комит
7e84a6f0c1
1 измењених фајлова са 10 додато и 11 уклоњено
  1. 10 11
      flask_app.py

+ 10 - 11
flask_app.py

@@ -190,17 +190,16 @@ class Mvp:
         else:
             print('获取所有case的数据...')
             # for city in self.citys:
-            for city in [city]:
-                for age in self.age:
-                    if city != '上海市' and age != '85-89年生':
-                        for crowd_type in [crowd]:
-                            # print(' {}{}'.format(city, age))
-                            people_uuids = self.get_people_uuid_by_type(crowd_type)
-                            if len(people_uuids) > 0:
-                                print('{}-{}-{}'.format(city, age, crowd_type))
-                                datas = self.behavior_tag_init(city, age, people_uuids)
-                                data_start.append(datas)
-                                result.extend(self.calculation_standard_score(datas, city, age, crowd_type))
+            # for city in [city]:
+            for age in self.age:
+                for crowd_type in self.crowd:
+                    # print(' {}{}'.format(city, age))
+                    people_uuids = self.get_people_uuid_by_type(crowd_type)
+                    if len(people_uuids) > 0:
+                        print('{}-{}-{}'.format(city, age, crowd_type))
+                        datas = self.behavior_tag_init(city, age, people_uuids)
+                        data_start.append(datas)
+                        result.extend(self.calculation_standard_score(datas, city, age, crowd_type))
         # return result
         data_list = []
         for e in data_start: