加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
zi_ti_tong_zhi.py 3.41 KB
一键复制 编辑 原始数据 按行查看 历史
xushenghu 提交于 2024-03-14 13:09 . 19:57:24 2023/03/14 commit
# -*- 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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化