|
@@ -98,7 +98,7 @@ q2_result_count = len(list(db.query(q2)))
|
|
|
# html += "<div style='color:blue;'><b>逾期合約: 共" + str(q1_result_count) + "筆</b></div>"
|
|
|
|
|
|
if q2_result_count > 0: # 有逾期執行項目
|
|
|
- html += "<div style='color:blue;'><b>逾期執行項目: 共" + str(q2_result_count) + "筆</b><br><br></div>"
|
|
|
+ html += "<div style='color:blue;'><b>由" + overdue_date + "起算,逾期執行項目: 共" + str(q2_result_count) + "筆</b><br><br></div>"
|
|
|
|
|
|
html += "<table style='width:100%;border-collapse: collapse;' border='1'> \
|
|
|
<tr style='text-align:left;'> \
|
|
@@ -146,7 +146,8 @@ if q2_result_count > 0: # 有逾期執行項目
|
|
|
|
|
|
html += "</table>";
|
|
|
else: # 無逾期執行表單資料
|
|
|
- print ("無逾期執行表單記錄,不須處理")
|
|
|
+ print ("由" + overdue_date + "起算,無逾期執行表單記錄,不須處理")
|
|
|
+ html += "<div>由" + overdue_date + "起算,無逾期執行表單記錄,不須處理</div>"
|
|
|
|
|
|
html += """
|
|
|
</body>
|
|
@@ -164,16 +165,16 @@ for email in crm_list:
|
|
|
|
|
|
print ('發送逾期執行項目通知 (CRM) end...')
|
|
|
|
|
|
-print ('發送逾期執行項目通知 (執行單位) start...')
|
|
|
+print ('\n發送逾期執行項目通知 (執行單位) start...')
|
|
|
|
|
|
# 執行單位Email
|
|
|
# hhh_edit@hhh.com.tw: 編輯採訪部
|
|
|
# hhh_mk@hhh.com.tw: 行銷企劃部
|
|
|
# hhh_web@hhh.com.tw: 網站工程部
|
|
|
# hhh_video@hhh.com.tw: 影音企劃部
|
|
|
-# agent@hhh.com.tw:
|
|
|
-# hhh_admin@hhh.com.tw:
|
|
|
-# hhh_sales@hhh.com.tw:
|
|
|
+# agent@hhh.com.tw: 幸福經紀人
|
|
|
+# hhh_admin@hhh.com.tw: 行政部
|
|
|
+# hhh_sales@hhh.com.tw: 業務部
|
|
|
|
|
|
execute_man_list = ['hhh_edit@hhh.com.tw','hhh_mk@hhh.com.tw','hhh_web@hhh.com.tw','hhh_video@hhh.com.tw','agent@hhh.com.tw','hhh_admin@hhh.com.tw','hhh_sales@hhh.com.tw']
|
|
|
|
|
@@ -216,7 +217,7 @@ for execute_man in execute_man_list:
|
|
|
|
|
|
if q2_result_count > 0: # 有逾期執行項目
|
|
|
# html += "<div style='color:blue;'><b>逾期執行項目: 共" + str(q2_result_count) + "筆</b><br><br></div>"
|
|
|
- html += "<div style='color:blue;'><b>" + execute_man + "逾期執行項目: 共" + str(q2_result_count) + "筆</b><br><br></div>"
|
|
|
+ html += "<div style='color:blue;'><b>由" + overdue_date + "起算," + execute_man + " 逾期執行項目: 共" + str(q2_result_count) + "筆</b><br><br></div>"
|
|
|
|
|
|
html += "<table style='width:100%;border-collapse: collapse;' border='1'> \
|
|
|
<tr style='text-align:left;'> \
|
|
@@ -265,8 +266,8 @@ for execute_man in execute_man_list:
|
|
|
|
|
|
html += "</table>";
|
|
|
else: # 無逾期執行表單資料
|
|
|
- print ("無逾期執行表單記錄,不須處理")
|
|
|
- html += "<div>" + execute_man + " 無逾期執行表單記錄,不須處理</div>";
|
|
|
+ print ("由" + overdue_date + "起算," + execute_man + " 無逾期執行表單記錄,不須處理")
|
|
|
+ html += "<div>由" + overdue_date + "起算," + execute_man + " 無逾期執行表單記錄,不須處理</div>"
|
|
|
|
|
|
html += """
|
|
|
</body>
|
|
@@ -274,9 +275,6 @@ for execute_man in execute_man_list:
|
|
|
"""
|
|
|
|
|
|
# 寄送逾期執行表單Email通知
|
|
|
- # for email in crm_list:
|
|
|
- # print ("發送Email: " + email)
|
|
|
-
|
|
|
email = 'mike@choozmo.com'
|
|
|
print ("發送Email: " + email)
|
|
|
hhh_send_mail(email, html)
|