Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
326307d7
Commit
326307d7
authored
Feb 24, 2020
by
黄静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fh
parent
70908e6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
rpt_result/GetFIinfoFromJson.py
+23
-2
No files found.
rpt_result/GetFIinfoFromJson.py
100644 → 100755
View file @
326307d7
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment