代码拉取完成,页面将自动刷新
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
# @Project : pythonProject
# @File : zi_ti_tong_zhi
# @Date : 2023/12/31 11:07
# @Author : 徐胜虎
# @Email : 1813366784@qq.com
# @Software : PyCharm
-------------------------------------------------
"""
import datetime
import os
"""
TwilioRestException: HTTP 400 error: Unable to create record: The number +861827188XXXX is unverified. Trial accounts
cannot send messages to unverified numbers; verify +861827188XXXX at twilio.com/user/account/phone-numbers/verified, or
purchase a Twilio number to send messages to unverified numbers
13545895843
【货多多】万鑫泰先生/女士,您的配件已抵达武汉,请到东西湖区高桥五路七号楚雄物流园货多多单证室凭借运单号:2401130613 自提,如有疑惑,请联系:18186062182
15972227153
【货多多】李明先生/女士,您的配件已抵达武汉,请到东西湖区高桥五路七号楚雄物流园货多多单证室凭借运单号:2401130636 自提,如有疑惑,请联系:18186062182
"""
import pandas as pd
# def send_veri_code(to_phone, body):
# from twilio.rest import Client
# account_sid = "AC1ba3cb5d3b9b90cf93f91fb140c3f0f5"
# auth_token = "94dba4e84610d4c9a175f67d1c51dd68"
# client = Client(account_sid, auth_token)
# client.messages.create(
# to=to_phone,
# from_="+15094245334",
# body=body
# )
if __name__ == '__main__':
# noinspection PyTypeChecker
# zi_ti_tong_zhi = pd.read_excel('resources/template/信息录入表.xlsx', header=0, keep_default_na=False,
# usecols=['运单号码', '收货人', '货物名称', '收货手机'],
# sheet_name='自提通知表')
# if not (os.path.isdir(r'resources/temp')):
# os.mkdir(r'resources/temp')
# with open(r'resources/temp/自提通知.docx', 'w', encoding='utf-8') as file:
# for row in zi_ti_tong_zhi.iterrows():
# print(str(row[1]['收货手机']))
# file.write(str(row[1]['收货手机']) + '\n')
# body = "【货多多】" + row[1]['收货人'] + "先生/女士,您的" + row[1][
# '货物名称'] + "已抵达武汉,请到东西湖区高桥五路七号楚雄物流园货多多单证室凭借运单号:" + str(
# row[1]['运单号码']) + " 自提,如有疑惑,请联系:18186062182\n"
# print(body)
# file.write(body + '\n')
# guo_ji_hao_ma = '+86' + str(row[1]['收货手机'])
# send_veri_code(guo_ji_hao_ma, body)
diao_che_xin_xi = pd.read_excel('resources/template/信息录入表.xlsx', header=0, keep_default_na=False,
sheet_name='每日调车信息')
if not (os.path.isdir(r'resources/temp')):
os.mkdir(r'resources/temp')
with open(r'resources/temp/自提通知.docx', 'w', encoding='utf-8') as file:
for row in diao_che_xin_xi.iterrows():
body = f"运单号码:{row[1]['运单号码']}\n调度发车日期:{row[1]['调度发车日期']}\n线路:{row[1]['线路']}\n车型:{row[1]['车型']}\n车牌号:{row[1]['车牌号']}\n司机姓名:{row[1]['司机姓名']}\n司机电话:{row[1]['司机电话']}\n预计到达日期:{row[1]['预计到达日期']}\n\n"
print(body)
file.write(body)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。