Browse Source

update

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 years ago
parent
commit
ba844fd712
1 changed files with 6 additions and 2 deletions
  1. 6 2
      report_push.py

+ 6 - 2
report_push.py

@@ -575,16 +575,20 @@ class ReportPush(object):
             house_id = id[0]
             house_name = id[1]
             house_result = [house_name]
-            equal_house = self.equal_by_house_id(house_data, house_id, 0)[2:]
-            equal_brand = self.equal_by_house_id(brand_data, house_id, 2)[4:]
+            equal_house = self.equal_by_house_id(house_data, house_id, 0)
+            equal_brand = self.equal_by_house_id(brand_data, house_id, 2)
             house_result_part = []
             if equal_house and equal_brand:
+                equal_house = equal_house[2:]
+                equal_brand = equal_brand[4:]
                 for i in range(0, 10):
                     house_result_part.append(self.add(equal_house[i], equal_brand[i]))
             elif equal_house and not equal_brand:
+                equal_house = equal_house[2:]
                 for i in range(0, 10):
                     house_result_part.append(equal_house[i])
             elif not equal_house and equal_brand:
+                equal_brand = equal_brand[4:]
                 for i in range(0, 10):
                     house_result_part.append(equal_brand[i])
             house_result.append(sum(house_result_part))