Browse Source

时间区间方法修改

Signed-off-by: Binren Zhnag <zhangbr@elab-plus.com>
Binren Zhnag 4 years ago
parent
commit
eafc578cad
2 changed files with 3 additions and 1 deletions
  1. 2 0
      jianye_report.py
  2. 1 1
      report_public_funs_utils.py

+ 2 - 0
jianye_report.py

@@ -232,6 +232,7 @@ class JianYeReport(object):
         mail_util = EmailUtil()
         rfu = ReportFileUtils()
         customers = self.get_report_customers(task_key)
+        message[0] = '客户信息获取成功'
         try:
             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
@@ -244,6 +245,7 @@ class JianYeReport(object):
                 content = self.get_mail_content(customer_type)
                 save_path = FileUtil().save_path_create()
                 file_path = save_path + '/' + title
+                message[11] = '邮件信息生成成功'
                 if customer_type == 2:
                     # 集团
                     table_1 = self.brand_data()

+ 1 - 1
report_public_funs_utils.py

@@ -24,7 +24,7 @@ class ReportPublicFunsUtils:
         if type:
             return [pre_time.strftime('%Y-%m-%d %M:%I:%S'), now_time.strftime('%Y-%m-%d %M:%I:%S')]
         else:
-            repr([pre_time.strftime('%Y-%m-%d'), now_time.strftime('%Y-%m-%d')])
+            return [pre_time.strftime('%Y-%m-%d'), now_time.strftime('%Y-%m-%d')]
 
     @staticmethod
     def get_all_time_data_range(type=None):