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
771902a1
Commit
771902a1
authored
Mar 12, 2024
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e2c40e75
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
108 deletions
+118
-108
apps/inves_manage/statistic_analysis_view.py
+83
-81
apps/inves_manage/view.py
+2
-2
apps/view_choose/choose_view.py
+28
-18
apps/view_choose/map_view.py
+2
-3
apps/view_choose/view.py
+1
-2
apps/view_user/view.py
+2
-2
No files found.
apps/inves_manage/statistic_analysis_view.py
View file @
771902a1
This diff is collapsed.
Click to expand it.
apps/inves_manage/view.py
View file @
771902a1
...
@@ -89,8 +89,8 @@ def project_stalker():
...
@@ -89,8 +89,8 @@ def project_stalker():
def
project_map
():
def
project_map
():
req_dic
=
request
.
get_json
()
req_dic
=
request
.
get_json
()
district_name
=
req_dic
[
'district_name'
]
district_name
=
req_dic
[
'district_name'
]
# current_year = datetime.now().year
current_year
=
str
(
datetime
.
now
()
.
year
)
current_year
=
'2022
'
# current_year = '2023
'
try
:
try
:
project_obj_count1
=
0
project_obj_count1
=
0
project_obj_count2
=
0
project_obj_count2
=
0
...
...
apps/view_choose/choose_view.py
View file @
771902a1
...
@@ -103,7 +103,7 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
...
@@ -103,7 +103,7 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
if
key_words
:
if
key_words
:
carrier_obj
=
CarrierLand
.
query
.
filter
(
carrier_obj
=
CarrierLand
.
query
.
filter
(
and_
(
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
and_
(
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
CarrierLand
.
district_name
==
district_name
if
district_name
!=
'
晋城市
'
else
text
(
''
),
CarrierLand
.
district_name
==
district_name
if
district_name
!=
'
满城区
'
else
text
(
''
),
CarrierLand
.
land_nature
.
like
(
'
%
{}
%
'
.
format
(
land_nature
))
if
land_nature
else
text
(
''
),
CarrierLand
.
land_nature
.
like
(
'
%
{}
%
'
.
format
(
land_nature
))
if
land_nature
else
text
(
''
),
CarrierLand
.
audit_status
==
1
CarrierLand
.
audit_status
==
1
))
.
filter
(
))
.
filter
(
...
@@ -114,7 +114,7 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
...
@@ -114,7 +114,7 @@ def global_land(key_words, district_name, land_name, land_nature, industry_name,
else
:
else
:
carrier_obj
=
CarrierLand
.
query
.
filter
(
carrier_obj
=
CarrierLand
.
query
.
filter
(
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
CarrierLand
.
land_name
.
like
(
'
%
{}
%
'
.
format
(
land_name
))
if
land_name
else
text
(
''
),
CarrierLand
.
district_name
==
district_name
if
district_name
!=
'
晋城市
'
else
text
(
''
),
CarrierLand
.
district_name
==
district_name
if
district_name
!=
'
满城区
'
else
text
(
''
),
CarrierLand
.
land_nature
==
land_nature
if
land_nature
else
text
(
''
),
CarrierLand
.
land_nature
==
land_nature
if
land_nature
else
text
(
''
),
CarrierLand
.
audit_status
==
1
CarrierLand
.
audit_status
==
1
)
)
...
@@ -262,23 +262,33 @@ def get_district_name(token):
...
@@ -262,23 +262,33 @@ def get_district_name(token):
district_name1
=
user_obj
.
belong_organization
# 所属区县
district_name1
=
user_obj
.
belong_organization
# 所属区县
if
not
district_name1
:
if
not
district_name1
:
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"权限错误,请设置用户所属单位!"
)
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"权限错误,请设置用户所属单位!"
)
if
'
晋城市
'
in
district_name1
:
if
'
满城区
'
in
district_name1
:
return
"
晋城市
"
return
"
满城区
"
else
:
else
:
if
'沁水'
in
district_name1
:
if
'满城镇'
in
district_name1
:
return
'沁水县'
return
'满城镇'
if
'高平'
in
district_name1
:
if
'刘家台乡'
in
district_name1
:
return
'高平市'
return
'刘家台乡'
if
'阳城'
in
district_name1
:
if
'神星镇'
in
district_name1
:
return
'阳城县'
return
'神星镇'
if
'陵川'
in
district_name1
:
if
'坨南乡'
in
district_name1
:
return
'陵川县'
return
'坨南乡'
if
'泽州'
in
district_name1
:
if
'白龙乡'
in
district_name1
:
return
'泽州县'
return
'白龙乡'
if
'城区'
in
district_name1
:
if
'大册营镇'
in
district_name1
:
return
'城区'
return
'大册营镇'
if
'晋城经济技'
in
district_name1
:
if
'要庄乡'
in
district_name1
:
return
'晋城经济技术开发区'
return
'要庄乡'
if
'石井乡'
in
district_name1
:
return
'石井乡'
if
'南韩村镇'
in
district_name1
:
return
'南韩村镇'
if
'于家庄镇'
in
district_name1
:
return
'于家庄镇'
if
'方顺桥镇'
in
district_name1
:
return
'方顺桥镇'
if
'河北满城经济开发区'
in
district_name1
:
return
'河北满城经济开发区'
except
Exception
as
e
:
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
SESSIONERR
,
msg
=
"token过期,请重新登录!"
)
return
jsonify
(
code
=
RET
.
SESSIONERR
,
msg
=
"token过期,请重新登录!"
)
...
...
apps/view_choose/map_view.py
View file @
771902a1
...
@@ -254,9 +254,8 @@ def month_rate():
...
@@ -254,9 +254,8 @@ def month_rate():
# 当年产业用地面积
# 当年产业用地面积
# upload_time = '2022-01-01 00:00:00'
# upload_time = '2022-01-01 00:00:00'
upload_time
=
''
upload_time
=
''
if
district_name
==
'晋城市'
:
if
district_name
==
'满城区'
:
district_name_list
=
[
"沁水县"
,
"高平市"
,
"陵川县"
,
"阳城县"
,
district_name_list
=
[
"满城区"
,
"满城镇"
,
"神星镇"
,
"方顺桥镇"
,
"南韩村镇"
,
"大册营镇"
,
"于家庄镇"
,
"要庄乡"
,
"石井乡"
,
"坨南乡"
,
"白龙乡"
,
"刘家台乡"
]
"泽州县"
,
"城区"
,
"晋城经济技术开发区"
]
for
district_name
in
district_name_list
:
for
district_name
in
district_name_list
:
land_area_obj_list
=
com
.
get_total_land_area
(
''
,
''
,
district_name
,
''
,
upload_time
)
land_area_obj_list
=
com
.
get_total_land_area
(
''
,
''
,
district_name
,
''
,
upload_time
)
land_total_area
=
sum
([
float
(
land_area_obj
.
total_area
if
land_area_obj
.
total_area
else
0
)
for
land_area_obj
in
land_area_obj_list
])
land_total_area
=
sum
([
float
(
land_area_obj
.
total_area
if
land_area_obj
.
total_area
else
0
)
for
land_area_obj
in
land_area_obj_list
])
...
...
apps/view_choose/view.py
View file @
771902a1
...
@@ -154,4 +154,4 @@ def downlist(): # 一级二级行业分类
...
@@ -154,4 +154,4 @@ def downlist(): # 一级二级行业分类
except
Exception
as
e
:
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库错误"
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库错误"
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查找成功"
,
data
=
data
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查找成功"
,
data
=
data
)
\ No newline at end of file
apps/view_user/view.py
View file @
771902a1
...
@@ -226,8 +226,8 @@ def login_bypwd():
...
@@ -226,8 +226,8 @@ def login_bypwd():
# 参数获取与校验
# 参数获取与校验
req_dict
=
request
.
get_json
()
req_dict
=
request
.
get_json
()
# 解密
# 解密
param
=
req_dict
.
get
(
"param"
)
# 加密参数
#
param = req_dict.get("param") # 加密参数
req_dict
=
json
.
loads
(
decrypt
(
param
))
#
req_dict = json.loads(decrypt(param))
mobile
=
req_dict
.
get
(
'mobile'
)
mobile
=
req_dict
.
get
(
'mobile'
)
password
=
req_dict
.
get
(
'password'
)
password
=
req_dict
.
get
(
'password'
)
# 校验参数完整性
# 校验参数完整性
...
...
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