html_and_vue/官微日报.py

39 lines
2.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import datetime
startDate = datetime.date(2022, 6, 2)
endDate = datetime.date(2023, 12, 31)
# today = datetime.date.today() + datetime.timedelta(days=-8)
today = datetime.date.today() + datetime.timedelta(days=-1)
remainingDate = (endDate - today).days
lastDate = (today - startDate).days
totalFollow = input('请输入累计粉丝数:')
addedFollow = input('请输入新增粉丝数:')
unFollow = input('请输入取关粉丝数:')
netFollow = int(addedFollow) - int(unFollow)
gapFollow = round((600 - float(totalFollow)),2)
perday = gapFollow * 10000 / remainingDate
xrlLuckydraw = input('请输入新人礼抽奖人数:')
prexrlLuckydraw = input('请输入前一日新人礼抽奖人数:')
signIn = input('请输入签到人数:')
presignIn = input('请输入前一日签到人数:')
mgm_saoma = input('请输入员工转介扫码人数:')
premgm_saoma = input('请输入前一日员工转介扫码人数:')
mgm_dabiao = input('请输入员工转介达标人数:')
premgm_dabiao = input('请输入前一日员工转介达标人数:')
riseLuckydraw = round(((int(xrlLuckydraw) / int(prexrlLuckydraw) - 1) * 100), 2)
riseSignin = round(((int(signIn) / int(presignIn) - 1) * 100), 2)
riseSaoma = round(((int(mgm_saoma) / int(premgm_saoma) - 1) * 100), 2)
riseDabiao = round(((int(mgm_dabiao) / int(premgm_dabiao) - 1) * 100), 2)
print('{}天】截至{},微信公众号粉丝{}万人,比上一日新增{},取关{},净增{}人。距离600万人目标还差{}万人,每日需增{}人。'.format(
remainingDate,today,totalFollow, addedFollow, unFollow, netFollow, gapFollow, int(perday)
))
print('【活动已上线{}天】{}日报:今日新人礼抽奖人数:{}人,相比昨日增幅{}%,今日签到人数{}:相比昨日增幅{}%'
'新人礼员工转介今日扫码{}人,相比昨日增幅{}%,达标{}人,相比昨日增幅{}%'.format(
lastDate, today, xrlLuckydraw, riseLuckydraw, signIn, riseSignin, mgm_saoma, riseSaoma, mgm_dabiao, riseDabiao
))