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
88aa9901
Commit
88aa9901
authored
Nov 25, 2022
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20221125
parent
b89d70af
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
19 deletions
+69
-19
apps/inves_manage/project_manager.py
+0
-0
apps/inves_manage/siku_view.py
+0
-12
apps/models.py
+68
-0
apps/view_mobile/view_user.py
+1
-1
apps/view_user/view.py
+0
-6
No files found.
apps/inves_manage/project_manager.py
View file @
88aa9901
This diff is collapsed.
Click to expand it.
apps/inves_manage/siku_view.py
View file @
88aa9901
...
@@ -742,18 +742,6 @@ def upload_project_data1():
...
@@ -742,18 +742,6 @@ def upload_project_data1():
msg
=
"{}表格内无有效数据!"
.
format
(
'线索库'
if
data_type
==
1
else
'对接库'
if
data_type
==
2
msg
=
"{}表格内无有效数据!"
.
format
(
'线索库'
if
data_type
==
1
else
'对接库'
if
data_type
==
2
else
'签约库'
if
data_type
==
3
else
'开工库'
if
data_type
==
4
else
''
))
else
'签约库'
if
data_type
==
3
else
'开工库'
if
data_type
==
4
else
''
))
if
int
(
data_type
)
==
1
:
# 上传线索库
if
int
(
data_type
)
==
1
:
# 上传线索库
# 判断该项目名称是否已经存在
# project_num = row_content[0]
# project_name = row_content[1]
# project_obj = SikuProject.query.filter(
# SikuProject.project_name == project_name,
# SikuProject.is_delete == 0,
# ).first()
# 记录同名的项目名称
# if project_obj and project_name == project_obj.project_name:
# rep_project_num += 1
# continue
ret
=
upload_xiansuo_project
(
row_content
,
time_strf
,
upload_time
,
upload_unity
,
upload_people
)
ret
=
upload_xiansuo_project
(
row_content
,
time_strf
,
upload_time
,
upload_unity
,
upload_people
)
if
ret
==
'continue'
:
if
ret
==
'continue'
:
add_num
+=
1
add_num
+=
1
...
...
apps/models.py
View file @
88aa9901
...
@@ -1134,6 +1134,9 @@ class ProjectFile(db.Model):
...
@@ -1134,6 +1134,9 @@ class ProjectFile(db.Model):
project_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"siku_project.id"
),
comment
=
'外键id,项目id'
)
project_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"siku_project.id"
),
comment
=
'外键id,项目id'
)
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'project_files'
))
# 项目1-N项目对接情况
project
=
db
.
relationship
(
'SikuProject'
,
backref
=
db
.
backref
(
'project_files'
))
# 项目1-N项目对接情况
project_manager_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"project_management.id"
),
comment
=
'外键id,项目id'
)
project_manager
=
db
.
relationship
(
'ProjectManagement'
,
backref
=
db
.
backref
(
'project_files1'
))
# 项目1-N项目对接情况
# 签约库-签约的第三方
# 签约库-签约的第三方
class
SignThree
(
db
.
Model
):
class
SignThree
(
db
.
Model
):
...
@@ -1217,4 +1220,69 @@ class ProjectManagement(db.Model):
...
@@ -1217,4 +1220,69 @@ class ProjectManagement(db.Model):
investor_address
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'投资方联系地址'
)
investor_address
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'投资方联系地址'
)
# 项目化管理-山西省地市指标表
class
ShanxiTarget
(
db
.
Model
):
__tablename_
=
"shanxi_target"
__table_args__
=
({
'comment'
:
'项目化管理-山西省地市指标表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
comment
=
'主键id'
)
# file_name = db.Column(db.String(30), comment='文件名称')
is_delete
=
db
.
Column
(
db
.
Integer
,
comment
=
'逻辑删除'
)
data_time
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'数据年份'
)
upload_time
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'上传日期'
)
upload_unit
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'上传部门'
)
upload_people
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'上传人'
)
district_name
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'区县名称'
)
# 签约项目情况
sign_money
=
db
.
Column
(
db
.
Float
,
comment
=
'签约金额'
)
sign_target_money
=
db
.
Column
(
db
.
Float
,
comment
=
'目标金额'
)
sign_finish_rate
=
db
.
Column
(
db
.
Float
,
comment
=
'完成率'
)
# 新开工固定资产投资项目计划投资完成情况
plan_invest_money
=
db
.
Column
(
db
.
Float
,
comment
=
'计划投资额'
)
plan_target_money
=
db
.
Column
(
db
.
Float
,
comment
=
'目标计划投资额'
)
plan_finish_rate
=
db
.
Column
(
db
.
Float
,
comment
=
'计划投资额完成率'
)
# 固定资产投资项目资金到位情况
arrive_money
=
db
.
Column
(
db
.
Float
,
comment
=
'资金到位'
)
arrive_target_money
=
db
.
Column
(
db
.
Float
,
comment
=
'目标资金到位'
)
arrive_finish_rate
=
db
.
Column
(
db
.
Float
,
comment
=
'计划投资额完成率'
)
# 项目化管理-晋城市县(市、区)、开发区指标表
class
JcTarget
(
db
.
Model
):
__tablename_
=
"jc_target"
__table_args__
=
({
'comment'
:
'项目化管理-晋城市县(市、区)、开发区指标表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
comment
=
'主键id'
)
file_name
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'文件名称'
)
is_delete
=
db
.
Column
(
db
.
Integer
,
comment
=
'逻辑删除'
)
year
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'数据年份'
)
upload_time
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'上传日期'
)
upload_unit
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'上传部门'
)
upload_people
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'上传人'
)
grade_sign
=
db
.
Column
(
db
.
Float
,
comment
=
'签约项目金额'
)
grade_start
=
db
.
Column
(
db
.
Float
,
comment
=
'项目开工率'
)
grade_plan_invest
=
db
.
Column
(
db
.
Float
,
comment
=
'新开工固定资产投资项目计划投资额'
)
grade_arrive_target1
=
db
.
Column
(
db
.
Float
,
comment
=
'固定资产投资项目资金到位额'
)
grade_arrive_target0
=
db
.
Column
(
db
.
Float
,
comment
=
'非固定资产投资项目资金到位额'
)
district_name
=
db
.
Column
(
db
.
String
(
30
),
comment
=
'区县名称'
)
money_sign
=
db
.
Column
(
db
.
Float
,
comment
=
'签约项目金额'
)
rate_start
=
db
.
Column
(
db
.
Float
,
comment
=
'项目开工率'
)
money_plan_invest
=
db
.
Column
(
db
.
Float
,
comment
=
'新开工固定资产投资项目计划投资额'
)
money_arrive_target1
=
db
.
Column
(
db
.
Float
,
comment
=
'固定资产投资项目资金到位额'
)
money_arrive_target0
=
db
.
Column
(
db
.
Float
,
comment
=
'非固定资产投资项目资金到位额'
)
apps/view_mobile/view_user.py
View file @
88aa9901
...
@@ -33,7 +33,7 @@ def user_info():
...
@@ -33,7 +33,7 @@ def user_info():
"email"
:
user
.
email
if
user
.
email
else
""
# 邮箱
"email"
:
user
.
email
if
user
.
email
else
""
# 邮箱
}
}
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查询成功"
,
data
=
data
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查询成功"
,
data
=
data
)
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"无法获取信息"
)
return
jsonify
(
code
=
RET
.
SESSIONERR
,
msg
=
"无法获取信息"
)
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
=
"参数错误"
)
...
...
apps/view_user/view.py
View file @
88aa9901
...
@@ -548,17 +548,14 @@ def fix_user_info():
...
@@ -548,17 +548,14 @@ def fix_user_info():
token
=
request
.
headers
[
"token"
]
token
=
request
.
headers
[
"token"
]
user
=
verify_token
(
token
)
user
=
verify_token
(
token
)
user_id
=
user
.
id
user_id
=
user
.
id
req_dict
=
request
.
get_json
()
req_dict
=
request
.
get_json
()
real_name
=
req_dict
.
get
(
"real_name"
)
real_name
=
req_dict
.
get
(
"real_name"
)
age
=
req_dict
.
get
(
"age"
)
age
=
req_dict
.
get
(
"age"
)
sex
=
req_dict
.
get
(
"sex"
)
sex
=
req_dict
.
get
(
"sex"
)
name
=
req_dict
.
get
(
"name"
)
name
=
req_dict
.
get
(
"name"
)
position
=
req_dict
.
get
(
"position"
)
position
=
req_dict
.
get
(
"position"
)
try
:
try
:
user_information
=
User
.
query
.
get
(
user_id
)
user_information
=
User
.
query
.
get
(
user_id
)
# 姓名
# 姓名
if
real_name
:
if
real_name
:
user_information
.
real_name
=
real_name
user_information
.
real_name
=
real_name
...
@@ -566,15 +563,12 @@ def fix_user_info():
...
@@ -566,15 +563,12 @@ def fix_user_info():
# 年龄
# 年龄
if
age
:
if
age
:
user_information
.
age
=
age
user_information
.
age
=
age
# 性别 1 - 男 2 - 女
# 性别 1 - 男 2 - 女
if
sex
:
if
sex
:
user_information
.
sex
=
sex
user_information
.
sex
=
sex
# 职务
# 职务
if
position
:
if
position
:
user_information
.
position
=
position
user_information
.
position
=
position
# 用户名
# 用户名
if
name
:
if
name
:
user
=
User
.
query
.
filter_by
(
name
=
name
)
.
filter
(
User
.
id
!=
user_id
)
.
first
()
user
=
User
.
query
.
filter_by
(
name
=
name
)
.
filter
(
User
.
id
!=
user_id
)
.
first
()
...
...
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