renyupeng 11 miesięcy temu
rodzic
commit
50fafeff47

+ 3 - 3
Apietl/test/project_material_report.py

@@ -27,7 +27,7 @@ class project_material_report:
 
     def Project_Handler(self):
         sql = """
-        select project_id,replace(project_name,'/','-') from application.kuaishou_account_report_daily_dw  where  stat_date>=20240101 and stat_date<=20240331
+        select project_id,replace(project_name,'/','-') from application.kuaishou_account_report_daily_dw  where  stat_date>=20240401 and stat_date<=20240631
 and charge>0 and project_id is not null
 group by project_id
         """
@@ -70,13 +70,13 @@ END) as '公司',
 application.kuaishou_material_video_report_daily_dw a
 left join `jeecg-boot`.sys_user b
 on a.user_id=b.id
-where stat_date >= 20240101 and stat_date<=20240331 and project_id={project_id}
+where stat_date>=20240401 and stat_date<=20240631 and project_id={project_id}
 group by signature) a
 left join
 application.material_farst_cost_time b
 on a.signature=b.signature
             """.format(project_id=project_id)
-            path = "/data/excel/ks/{project_name}.xls".format(project_name=project_name)
+            path = "/home/excel/ks/{project_name}.xls".format(project_name=project_name)
             pd.read_sql_query(sql, self.OuterConn).to_excel(path, index=False, engine='openpyxl')
 
 

+ 4 - 4
Apietl/test/toutiaoproject_material_image_report.py

@@ -28,7 +28,7 @@ class project_material_report:
 
     def Project_Handler(self):
         sql = """
-    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20240101 and stat_datetime<=20240331
+    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20240401 and stat_datetime<=20240631
 and cost>0 and project_id is not null
 group by project_id
         """
@@ -47,15 +47,15 @@ select project_name,
                        ''), '9', '') as aa,
         cost
 from application.bytedance_material_image_report_daily_dw
-where stat_datetime >= 20240101
-  and stat_datetime <= 20240331
+where stat_datetime >= 20240401
+  and stat_datetime <= 20240631
   and project_id={project_id}
     and cost>0
 )t
  where aa !=''
 group by image_name
             """.format(project_id=project_id)
-            path = "/data/excel/toutiao/tupian/{project_name}.xls".format(project_name=project_name)
+            path = "/home/excel/toutiao/tupian/{project_name}.xls".format(project_name=project_name)
             pd.read_sql_query(sql, self.OuterConn).to_excel(path, index=False,engine='openpyxl')
 
 

+ 3 - 3
Apietl/test/toutiaoproject_material_report.py

@@ -28,7 +28,7 @@ class project_material_report:
 
     def Project_Handler(self):
         sql = """
-    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20240101 and stat_datetime<=20240331
+    select project_id,project_name from application.bytedance_advertiser_report_daily_dw  where  stat_datetime>=20240401 and stat_datetime<=20240431
 and cost>0 and project_id is not null
 group by project_id
         """
@@ -71,13 +71,13 @@ END) as '公司',
 application.bytedance_material_video_report_daily_dw a
 left join `jeecg-boot`.sys_user b
 on a.user_id=b.id
-where stat_datetime >= 20240101 and stat_datetime<=20240331 and project_id={project_id}
+where stat_datetime >= 20240401 and stat_datetime<=20240631 and project_id={project_id}
 group by signature) a
 left join
 application.bytedance_material_farst_cost_time b
 on a.signature=b.signature
             """.format(project_id=project_id)
-            path = "/data/excel/toutiao/{project_name}.xls".format(project_name=project_name)
+            path = "/home/excel/toutiao/{project_name}.xls".format(project_name=project_name)
             pd.read_sql_query(sql, self.OuterConn).to_excel(path, index=False,engine='openpyxl')