| 
															
																@@ -233,11 +233,28 @@ class JianYeReport(object): 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         customers = self.get_report_customers(task_key) 
															 | 
															
															 | 
															
																         customers = self.get_report_customers(task_key) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         message[0] = '客户信息获取成功' 
															 | 
															
															 | 
															
																         message[0] = '客户信息获取成功' 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         send_mail_log = [] 
															 | 
															
															 | 
															
																         send_mail_log = [] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        brand_table_one = None 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        brand_table_two = None 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         try: 
															 | 
															
															 | 
															
																         try: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             save_path = FileUtil().save_path_create() 
															 | 
															
															 | 
															
																             save_path = FileUtil().save_path_create() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             send_data = [] 
															 | 
															
															 | 
															
																             send_data = [] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            error_customer = [] 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             # 查询数据 
															 | 
															
															 | 
															
																             # 查询数据 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if task_key == 12: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 集团信息计算一次发送给多个人 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                brand_table_one = self.brand_data() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                house_ids = self.get_house_id_by_brand_id('13') 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                brand_table_two = self.house_data(house_ids) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 总浏览量:xx ,总浏览人数:xx 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 新增获客: xx, 新增获电:xx 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 推荐用户数:xx,分享获电:xx,裂变获电:xx 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 全民经纪人注册数:xx 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                # 报备成功数:xx,报备到访数:xx 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                pass 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             for customer in customers: 
															 | 
															
															 | 
															
																             for customer in customers: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 # a.task_key, b.customer_type, b.name, b.mail, b.house_or_region, a.customer_id, GROUP_CONCAT(c.house_or_brand_id) as ids 
															 | 
															
															 | 
															
																                 # a.task_key, b.customer_type, b.name, b.mail, b.house_or_region, a.customer_id, GROUP_CONCAT(c.house_or_brand_id) as ids 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 name = customer[2] 
															 | 
															
															 | 
															
																                 name = customer[2] 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -249,30 +266,19 @@ class JianYeReport(object): 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 content = self.get_mail_content(customer_type) 
															 | 
															
															 | 
															
																                 content = self.get_mail_content(customer_type) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 file_path = save_path + '/' + title + '.xls' 
															 | 
															
															 | 
															
																                 file_path = save_path + '/' + title + '.xls' 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 try: 
															 | 
															
															 | 
															
																                 try: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     if customer_type == 2: 
															 | 
															
															 | 
															
																                     if customer_type == 2: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         # 集团 
															 | 
															
															 | 
															
																                         # 集团 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        table_1 = self.brand_data() 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        house_ids = self.get_house_id_by_brand_id(ids) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        table_2 = self.house_data(house_ids) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 总浏览量:xx ,总浏览人数:xx 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 新增获客: xx, 新增获电:xx 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 推荐用户数:xx,分享获电:xx,裂变获电:xx 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 全民经纪人注册数:xx 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        # 报备成功数:xx,报备到访数:xx 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        content = content.format(table_1[0], table_1[1], table_1[2], table_1[3], table_1[4], table_1[5], 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                 table_1[6], table_1[8], table_1[10], table_1[11], 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                 table_1[12], table_1[13], table_1[14], table_1[15], table_1[16], table_1[17], 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                 table_1[18], table_1[20], table_1[22], table_1[23], 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                 table_1[24], table_1[25], table_1[26], table_1[27], table_1[28], table_1[29], 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                 table_1[30], table_1[32], table_1[34], table_1[35] 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        content = content.format(brand_table_one[0], brand_table_one[1], brand_table_one[2], brand_table_one[3], brand_table_one[4], brand_table_one[5], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[6], brand_table_one[8], brand_table_one[10], brand_table_one[11], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[12], brand_table_one[13], brand_table_one[14], brand_table_one[15], brand_table_one[16], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[17], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[18], brand_table_one[20], brand_table_one[22], brand_table_one[23], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[24], brand_table_one[25], brand_table_one[26], brand_table_one[27], brand_table_one[28], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[29], 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                 brand_table_one[30], brand_table_one[32], brand_table_one[34], brand_table_one[35] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                  ) 
															 | 
															
															 | 
															
																                                                  ) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         send_data.append( 
															 | 
															
															 | 
															
																                         send_data.append( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                            [table_2, self.sheet_names_1, title, [self.head_1, self.head_1, self.head_1], file_path, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            [brand_table_two, self.sheet_names_1, title, [self.head_1, self.head_1, self.head_1], file_path, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                              content, name, mail]) 
															 | 
															
															 | 
															
																                              content, name, mail]) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         # rfu.create_excel_file(table_2, self.sheet_names_1, title, [self.head_1, self.head_1, self.head_1], file_path) 
															 | 
															
															 | 
															
																                         # rfu.create_excel_file(table_2, self.sheet_names_1, title, [self.head_1, self.head_1, self.head_1], file_path) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     elif customer_type == 1: 
															 | 
															
															 | 
															
																                     elif customer_type == 1: 
															 |