Commit 326307d7 by 黄静

fh

parent 70908e6e
......@@ -4,7 +4,7 @@
# @Author : fanhui
# @File : GetFIinfoFromJson.py
# @Software: PyCharm
import datetime,time,os,sys
#变化率添加符号
def AddSign(factor):
factor=str(factor)
......@@ -20,8 +20,28 @@ def AddSign(factor):
def GetFIinfoFromJson(GetAllinfo):
# 获取传入的参数
GetAllinfo = GetAllinfo
timeType=GetAllinfo["timeType"]#获取检测区间类型
Detection_zone=GetAllinfo["Detection_zone"]#获取检测年月
e_time = datetime.datetime.strptime(Detection_zone, '%Y%m')
year0 = e_time.year
month0 = e_time.month
print(year0, month0, type(year0))
if timeType == "Y":
Detection_zone = str(year0) + "年"
if timeType == "Q":
if month0 in [1, 2, 3]:
Detection_zone = str(year0) + "年第一季度"
if month0 in [4, 5, 6]:
Detection_zone = str(year0) + "年第二季度"
if month0 in [7, 8, 9]:
Detection_zone = str(year0) + "年第三季度"
if month0 in [10, 11, 12]:
Detection_zone = str(year0) + "年第四季度"
if timeType == "M":
Detection_zone = str(year0) + "年" + str(month0) + "月"
Else_info={
"Detection_zone": GetAllinfo.get("Detection_zone",None),
"Detection_zone": Detection_zone,
"CreatTime": GetAllinfo.get("CreatTime",None),
"company_name": GetAllinfo.get("company_name",None),
"Task_Num": GetAllinfo.get("Task_Num",None)
......@@ -101,3 +121,4 @@ def GetFIinfoFromJson(GetAllinfo):
Fi_dict["Sq_total_assets_growth_rate"] = total_assets_growth_rate[Sq_time]
return Else_info,Fi_dict
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment