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
948d3cb4
Commit
948d3cb4
authored
Apr 12, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230412
parent
69041829
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
31 deletions
+87
-31
apps/models.py
+37
-0
apps/view_atlas/view.py
+50
-31
No files found.
apps/models.py
View file @
948d3cb4
...
...
@@ -730,6 +730,43 @@ class Induzone(db.Model):
area_structure
=
db
.
Column
(
db
.
Float
,
comment
=
'辖区面积(平方公里)'
)
# 行政区-居民生活用水(元/立方米)
admin_live_water1
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-居民生活用水(元/立方米)'
)
# 行政区-非居民用水(元/立方米)
admin_live_water2
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-非居民用水(元/立方米)'
)
# 行政区-特种用水(元/立方米)
admin_live_water3
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-特种用水(元/立方米)'
)
# 行政区-居民生活电价
admin_electric1
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-居民生活电价'
)
# 行政区-商业电价
admin_electric2
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-商业电价'
)
# 行政区-工业电价
admin_electric3
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-工业电价'
)
# 行政区-城市居民用气(元/立方米)
admin_gas1
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-城市居民用气(元/立方米)'
)
# 行政区-工商业用气(元/立方米)
admin_gas2
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-工商业用气(元/立方米)'
)
# 行政区-居民住宅(元/平方米)
admin_residence1
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-居民住宅(元/平方米)'
)
# 行政区-非居民住宅(元/平方米)
admin_residence2
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-非居民住宅(元/平方米)'
)
# 行政区-企业职工各种费率(人社局)
admin_tax_rate
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-企业职工各种费率(人社局)'
)
# 行政区-工资标准(人社局)
admin_wage_level
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'行政区-工资标准(人社局)'
)
# 产业园区-载体形态(楼宇/厂房)
zone_status
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'产业园区-载体形态(楼宇/厂房)'
)
# 产业园区-占地面积(平方公里)
zone_land_area
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'产业园区-占地面积(平方公里)'
)
# 产业园区-建筑面积(平方公里)
zone_structure_area
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'产业园区-建筑面积(平方公里)'
)
# 产业园区-联系人(招商负责人)
zone_linkman
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'产业园区-联系人(招商负责人)'
)
# 产业园区-联系方式(招商负责人)
zone_mobile
=
db
.
Column
(
db
.
String
(
255
),
comment
=
'产业园区-联系方式(招商负责人)'
)
# 现状图谱-投资成本-水电气暖价格
class
DistrictResource
(
db
.
Model
):
__tablename_
=
"district_resource"
...
...
apps/view_atlas/view.py
View file @
948d3cb4
...
...
@@ -903,35 +903,35 @@ def get_zaiti_detail_data():
district
=
induzone
.
district
# 水电气暖
if
district
:
resource_obj
=
DistrictResource
.
query
.
filter
(
DistrictResource
.
district
==
district
)
.
first
()
resource_data
=
{
"domestic_water"
:
resource_obj
.
domestic_water
,
"not_Domestic_water"
:
resource_obj
.
not_Domestic_water
,
"special_water"
:
resource_obj
.
special_water
,
"electricity_life"
:
resource_obj
.
electricity_life
,
"electricity_commercial"
:
resource_obj
.
electricity_commercial
,
"electricity_industrial"
:
resource_obj
.
electricity_industrial
,
"gas_city"
:
resource_obj
.
gas_city
,
"gas_commercial"
:
resource_obj
.
gas_commercial
,
"hot_life"
:
resource_obj
.
hot_life
,
"not_hot_life"
:
resource_obj
.
not_hot_life
,
}
labor_obj
=
LaborCost
.
query
.
filter
(
LaborCost
.
district
==
district
)
.
first
()
labor_data
=
{
"endowment_insurance1"
:
labor_obj
.
endowment_insurance1
,
"endowment_insurance2"
:
labor_obj
.
endowment_insurance2
,
"unemployment_insurance1"
:
labor_obj
.
unemployment_insurance1
,
"unemployment_insurance2"
:
labor_obj
.
unemployment_insurance2
,
"injury_insurance1"
:
labor_obj
.
injury_insurance1
,
"injury_insurance2"
:
labor_obj
.
injury_insurance2
,
"maternity_insurance1"
:
labor_obj
.
maternity_insurance1
,
"maternity_insurance2"
:
labor_obj
.
maternity_insurance2
,
"medical_insurance1"
:
labor_obj
.
medical_insurance1
,
"medical_insurance2"
:
labor_obj
.
medical_insurance2
,
"month_wage_rates"
:
labor_obj
.
month_wage_rates
,
"hour_wage_rates"
:
labor_obj
.
hour_wage_rates
}
#
if district:
#
resource_obj = DistrictResource.query.filter(DistrictResource.district == district).first()
#
resource_data = {
#
"domestic_water": resource_obj.domestic_water,
#
"not_Domestic_water": resource_obj.not_Domestic_water,
#
"special_water": resource_obj.special_water,
#
"electricity_life": resource_obj.electricity_life,
#
"electricity_commercial": resource_obj.electricity_commercial,
#
"electricity_industrial": resource_obj.electricity_industrial,
#
"gas_city": resource_obj.gas_city,
#
"gas_commercial": resource_obj.gas_commercial,
#
"hot_life": resource_obj.hot_life,
#
"not_hot_life": resource_obj.not_hot_life,
#
}
#
labor_obj = LaborCost.query.filter(LaborCost.district == district).first()
#
labor_data = {
#
"endowment_insurance1": labor_obj.endowment_insurance1,
#
"endowment_insurance2": labor_obj.endowment_insurance2,
#
"unemployment_insurance1": labor_obj.unemployment_insurance1,
#
"unemployment_insurance2": labor_obj.unemployment_insurance2,
#
"injury_insurance1": labor_obj.injury_insurance1,
#
"injury_insurance2": labor_obj.injury_insurance2,
#
"maternity_insurance1": labor_obj.maternity_insurance1,
#
"maternity_insurance2": labor_obj.maternity_insurance2,
#
"medical_insurance1": labor_obj.medical_insurance1,
#
"medical_insurance2": labor_obj.medical_insurance2,
#
"month_wage_rates": labor_obj.month_wage_rates,
#
"hour_wage_rates": labor_obj.hour_wage_rates
#
}
url
=
''
if
district
==
'泽州县'
:
url
=
'https://zysf-store.oss-cn-beijing.aliyuncs.com/
%
E6
%99%8
B
%
E5
%9
F
%8
E
%
E6
%8
B
%9
B
%
E5
%95%86%
E5
%9
B
%
BE
%
E8
%
B0
%
B1
%
E5
%
B9
%
B3
%
E5
%8
F
%
B0/
%
E4
%
BA
%
A7
%
E4
%
B8
%9
A
%
E8
%
BD
%
BD
%
E4
%
BD
%93
-
%
E6
%8
A
%95%
E8
%
B5
%84%
E6
%88%90%
E6
%9
C
%
AC
%
E9
%85%8
D
%
E5
%9
B
%
BE/
%
E5
%
B7
%
B4
%
E5
%85%
AC
%
E9
%95%872022%
E5
%
B9
%
B4
%
E5
%9
F
%
BA
%
E5
%87%86%
E5
%9
C
%
B0
%
E4
%
BB
%
B7
%
E8
%
A1
%
A8.png'
...
...
@@ -992,8 +992,27 @@ def get_zaiti_detail_data():
"area_structure"
:
induzone
.
area_structure
,
"lng"
:
induzone
.
lng
,
"lat"
:
induzone
.
lat
,
"resource_data"
:
resource_data
,
"labor_data"
:
labor_data
"admin_live_water1"
:
induzone
.
admin_live_water1
,
"admin_live_water2"
:
induzone
.
admin_live_water2
,
"admin_live_water3"
:
induzone
.
admin_live_water3
,
"admin_electric1"
:
induzone
.
admin_electric1
,
"admin_electric2"
:
induzone
.
admin_electric2
,
"admin_electric3"
:
induzone
.
admin_electric3
,
"admin_gas1"
:
induzone
.
admin_gas1
,
"admin_gas2"
:
induzone
.
admin_gas2
,
"admin_residence1"
:
induzone
.
admin_residence1
,
"admin_residence2"
:
induzone
.
admin_residence2
,
"admin_tax_rate"
:
induzone
.
admin_tax_rate
,
"admin_wage_level"
:
induzone
.
admin_wage_level
,
"zone_status"
:
induzone
.
zone_status
,
"zone_land_area"
:
induzone
.
zone_land_area
,
"zone_structure_area"
:
induzone
.
zone_structure_area
,
"zone_linkman"
:
induzone
.
zone_linkman
,
"zone_mobile"
:
induzone
.
zone_mobile
,
# "resource_data": resource_data,
# "labor_data": labor_data
}
return
jsonify
(
code
=
RET
.
OK
,
msg
=
'详情数据查询成功!'
,
data
=
data
)
except
Exception
as
e
:
...
...
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