|
@@ -81,24 +81,6 @@ db = dataset.connect('mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57-cluster.cluster-cm
|
|
|
# 正式機 DB
|
|
|
# db = dataset.connect('mysql://hhh7796hhh:lYmWsu^ujcA1@hhh-v57-cluster.cluster-cmab1ctkglka.ap-northeast-2.rds.amazonaws.com:3306/xoops?charset=utf8mb4')
|
|
|
|
|
|
-# class Execute(BaseModel):
|
|
|
-# exf_id: str
|
|
|
-# num: str # 合約編號
|
|
|
-# company: str #設計公司
|
|
|
-# mobile: str # 手機
|
|
|
-# telete: str # 電話
|
|
|
-# designer: str #設計師
|
|
|
-# sdate: str # 上架日期
|
|
|
-# edate: str # 下架日期
|
|
|
-# note: str # 備註說明
|
|
|
-# contract_time: str # 到期日
|
|
|
-# contract_person: str # 聯絡人
|
|
|
-# sales_dept: str # 部門別
|
|
|
-# sales_man: str # 接案業務
|
|
|
-# is_close: str # 是否結案 (N: 未結案,Y: 已結案,T: 未上線,D: 續約,E: 不續約延期,F: 不續約需下線,G: 已到期未續約)
|
|
|
-# price: str
|
|
|
-
|
|
|
-
|
|
|
@app.get("/is_close_changed_notice")
|
|
|
async def is_close_changed_notice(exf_id: str = '', is_close: str = ''):
|
|
|
subject = ""
|
|
@@ -115,7 +97,6 @@ async def is_close_changed_notice(exf_id: str = '', is_close: str = ''):
|
|
|
|
|
|
for r in db.query(q):
|
|
|
subject = '[合約狀態修改]:' + r['company'] + ' (合約編號:' + r['num'] + ')_' + datetime.now().strftime("%Y-%m-%d %H:%M")
|
|
|
- url = 'https://stage-backstage.hhh.com.tw/admin/home/execute?exf_id=' + str(r['exf_id'])
|
|
|
|
|
|
html = """
|
|
|
<!DOCTYPE html>
|
|
@@ -134,8 +115,6 @@ async def is_close_changed_notice(exf_id: str = '', is_close: str = ''):
|
|
|
elif is_close == 'G':
|
|
|
html += '<div>本合約狀態已修改為 <span style="color:red;">已到期未續約</span></div>';
|
|
|
|
|
|
- html += '<div><br><br>合約連結: ' + url + '</div>';
|
|
|
-
|
|
|
html += "<div><br><br>幸福空間經營團隊敬上<br><br>※此信為系統自動寄送,請勿直接回信。謝謝!</div>"
|
|
|
|
|
|
html += """
|