Browse Source

mvp: 格式调整

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 năm trước cách đây
mục cha
commit
4513bd4b47
1 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 5
      mvp.py

+ 4 - 5
mvp.py

@@ -248,8 +248,8 @@ class Mvp:
                 all_data, behavior_data_1 = self.calculation_standard_score(datas, city, age, crowd)
                 result.append(all_data)
                 behavior_data = behavior_data_1
-            # if behavior_data:
-            #     module_scores.extend(self.module_score(crowd, city, age, behavior_data))
+            if behavior_data:
+                module_scores.extend(self.module_score(crowd, city, age, behavior_data))
         else:
             print('获取所有case的数据...')
             # for city in self.citys:
@@ -271,7 +271,7 @@ class Mvp:
                             result.append(all_data)
                             behavior_data = behavior_data_1
                         if behavior_data:
-                           module_scores.extend(self.module_score(crowd_type, city, age, behavior_data))
+                            module_scores.extend(self.module_score(crowd_type, city, age, behavior_data))
         # return result
         # data_list = []
         # for e in data_start:
@@ -282,8 +282,7 @@ class Mvp:
         #             ele.extend(sub_e)
         #             data_list.append(ele)
         #     pass
-        # return {'tag_score': result, 'module_score': module_scores}
-        return {'tag_score': result}
+        return {'tag_score': result, 'module_score': module_scores}
         # return {'score': result, 'data': data_list}
 
     def behavior_tag_init(self, city, age, people_uuids):