Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
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
Administrator
mancheng
Commits
2f4da1f0
Commit
2f4da1f0
authored
Jun 19, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230619
parent
06aa514b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
apps/inves_manage/statistic_analysis_view.py
+17
-4
No files found.
apps/inves_manage/statistic_analysis_view.py
View file @
2f4da1f0
...
...
@@ -671,6 +671,15 @@ def get_data3(data_time, district_li, max_year):
# 固定资产投资项目到位资金完成率
def
get_data4
(
data_time
,
district_li
,
max_year
):
data_li4
=
[]
data_time1
=
''
if
not
data_time
:
data_time1
=
str
(
max_year
)
+
'年'
elif
data_time
and
not
data_time
[
2
]:
data_time1
=
data_time
[
0
]
+
'年'
+
data_time
[
1
]
+
'月'
# ["2022", "01", ""]
elif
all
([
data_time
[
0
],
data_time
[
1
],
data_time
[
2
]]):
data_time1
=
data_time
[
0
]
+
'年'
+
data_time
[
1
]
+
'-'
+
data_time
[
2
]
+
'月'
else
:
pass
try
:
for
district
in
district_li
:
...
...
@@ -683,12 +692,15 @@ def get_data4(data_time, district_li, max_year):
for
jc_obj
in
jc_obj_list
:
year_list
.
append
(
int
(
jc_obj
.
year
.
split
(
'年'
)[
0
]))
max_year
=
max
(
set
(
year_list
))
print
(
district
)
if
'开发区'
in
district
:
district
=
'开发区'
project_obj
=
MoneyArrive
.
query
.
filter
(
# MoneyArrive.data_time.like('%{}%'.format(data_time[0]) if data_time else str(max_year)),
MoneyArrive
.
data_time
.
like
(
'
%
{}
%
'
.
format
(
str
(
data_time
[
0
]
)
if
data_time
else
str
(
max_year
))),
MoneyArrive
.
data_time
.
like
(
'
%
{}
%
'
.
format
(
str
(
data_time
1
)
if
data_time
else
str
(
max_year
))),
MoneyArrive
.
is_delete
==
0
,
MoneyArrive
.
district_name
==
district
# MoneyArrive.district_name == district
MoneyArrive
.
district_name
.
like
(
'
%
{}
%
'
.
format
(
district
))
)
.
first
()
if
not
project_obj
:
arrive_money
=
0
...
...
@@ -706,7 +718,7 @@ def get_data4(data_time, district_li, max_year):
year_target
=
jc_obj
.
money_arrive_target1
data
=
{
"name"
:
district
,
"name"
:
'晋城经济技术开发区'
if
'开发区'
in
district
else
district
,
"data"
:
arrive_money
,
"target"
:
year_target
,
"value"
:
round
(
arrive_money
/
year_target
*
100
,
2
)
if
year_target
and
year_target
!=
0
else
0
...
...
@@ -1414,6 +1426,7 @@ def project_graph():
industry_name
=
req_dic
[
'industry_name'
]
# 用于4项目行业类型分布
data_time
=
req_dic
[
'data_time'
]
# ["2022", "01", "12"]
current_year
=
datetime
.
now
()
.
year
# current_year = 2022
now_time3
=
''
now_time4
=
''
now_time
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-01 00:00:00'
)
...
...
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