|
@@ -18,7 +18,7 @@ from sqlalchemy import create_engine
|
|
|
class send_material_report_weekly:
|
|
|
def __init__(self):
|
|
|
self.OuterStr = "mysql+pymysql://%s:%s@%s:%d/%s" % (
|
|
|
- "hcst", parse.quote_plus("hcst@2021"), "192.168.0.184", 3390, "application")
|
|
|
+ "hcst", parse.quote_plus("hcst@2021"), "111.206.86.186", 3390, "application")
|
|
|
self.OuterConn = create_engine(self.OuterStr,
|
|
|
pool_size=10,
|
|
|
max_overflow=5,
|
|
@@ -51,7 +51,7 @@ left join `jeecg-boot`.user_company t2
|
|
|
on t1.user_id=t2.user_id
|
|
|
left join `jeecg-boot`.ctop_project pro
|
|
|
on t1.project_id=pro.id
|
|
|
-where t1.stat_date between date_format(date_sub({stat_date}, INTERVAL 6 DAY),'%Y%m%d') and {stat_date}
|
|
|
+where t1.stat_date between date_format(date_sub({stat_date}, INTERVAL 6 DAY),'%%Y%%m%%d') and {stat_date}
|
|
|
group by t1.signature; """.format(stat_date=self.stat_date)
|
|
|
print(sql)
|
|
|
path = """/data/excel/material_week_{stat_date}.xls""".format(stat_date=self.stat_date)
|