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
49b4993d
Commit
49b4993d
authored
Mar 14, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230314
parent
6c5649c5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
19 deletions
+15
-19
apps/inves_manage/project_manager.py
+4
-4
apps/inves_manage/siku_view.py
+3
-3
apps/models.py
+1
-1
apps/view_index/view.py
+0
-2
apps/view_user/view.py
+0
-7
apps/view_xiaocx/view.py
+3
-1
insert_company_hots.py
+4
-1
No files found.
apps/inves_manage/project_manager.py
View file @
49b4993d
...
@@ -278,7 +278,7 @@ def upload_project_data2():
...
@@ -278,7 +278,7 @@ def upload_project_data2():
table
=
data
.
sheets
()[
0
]
table
=
data
.
sheets
()[
0
]
names
=
data
.
sheet_names
()
# 返回book中所有工作表的名字
names
=
data
.
sheet_names
()
# 返回book中所有工作表的名字
status
=
data
.
sheet_loaded
(
names
[
0
])
# 检查sheet1是否导入完毕
status
=
data
.
sheet_loaded
(
names
[
0
])
# 检查sheet1是否导入完毕
print
(
status
)
#
print(status)
nrows
=
table
.
nrows
# 获取该sheet中的有效行数
nrows
=
table
.
nrows
# 获取该sheet中的有效行数
except
Exception
as
e
:
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
...
@@ -564,7 +564,7 @@ def batch_export_project5():
...
@@ -564,7 +564,7 @@ def batch_export_project5():
sheet_name
=
k
sheet_name
=
k
sheet
=
excel
.
add_sheet
(
sheet_name
)
sheet
=
excel
.
add_sheet
(
sheet_name
)
head_list
=
v
head_list
=
v
print
(
head_list
)
#
print(head_list)
for
j
in
range
(
len
(
head_list
)):
for
j
in
range
(
len
(
head_list
)):
sheet
.
write
(
0
,
j
,
head_list
[
j
])
sheet
.
write
(
0
,
j
,
head_list
[
j
])
# 写入数据,从第二行(i+1)
# 写入数据,从第二行(i+1)
...
@@ -814,7 +814,7 @@ def upload_shanxi_data():
...
@@ -814,7 +814,7 @@ def upload_shanxi_data():
return
jsonify
(
code
=
RET
.
SESSIONERR
,
msg
=
"进行操作时用户信息校验失败,请重新登陆后尝试!"
)
return
jsonify
(
code
=
RET
.
SESSIONERR
,
msg
=
"进行操作时用户信息校验失败,请重新登陆后尝试!"
)
# 上传的文件
# 上传的文件
file
=
request
.
files
[
'file'
]
file
=
request
.
files
[
'file'
]
print
(
file
.
filename
)
# 打印文件名
#
print(file.filename) # 打印文件名
data_time
=
request
.
form
[
'data_time'
]
data_time
=
request
.
form
[
'data_time'
]
# file_name = file.filename
# file_name = file.filename
upload_time
=
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
upload_time
=
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
...
@@ -824,7 +824,7 @@ def upload_shanxi_data():
...
@@ -824,7 +824,7 @@ def upload_shanxi_data():
table
=
data
.
sheets
()[
0
]
table
=
data
.
sheets
()[
0
]
names
=
data
.
sheet_names
()
# 返回book中所有工作表的名字
names
=
data
.
sheet_names
()
# 返回book中所有工作表的名字
status
=
data
.
sheet_loaded
(
names
[
0
])
# 检查sheet1是否导入完毕
status
=
data
.
sheet_loaded
(
names
[
0
])
# 检查sheet1是否导入完毕
print
(
status
)
#
print(status)
nrows
=
table
.
nrows
# 获取该sheet中的有效行数
nrows
=
table
.
nrows
# 获取该sheet中的有效行数
except
Exception
as
e
:
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
current_app
.
logger
.
error
(
e
)
...
...
apps/inves_manage/siku_view.py
View file @
49b4993d
...
@@ -1819,7 +1819,7 @@ def batch_export_project1():
...
@@ -1819,7 +1819,7 @@ def batch_export_project1():
sheet_name
=
k
sheet_name
=
k
sheet
=
excel
.
add_sheet
(
sheet_name
)
sheet
=
excel
.
add_sheet
(
sheet_name
)
head_list
=
v
head_list
=
v
print
(
head_list
)
#
print(head_list)
for
j
in
range
(
len
(
head_list
)):
for
j
in
range
(
len
(
head_list
)):
sheet
.
write
(
0
,
j
,
head_list
[
j
])
sheet
.
write
(
0
,
j
,
head_list
[
j
])
# 写入数据,从第二行(i+1)
# 写入数据,从第二行(i+1)
...
@@ -1936,7 +1936,7 @@ def batch_export_project2():
...
@@ -1936,7 +1936,7 @@ def batch_export_project2():
sheet_name
=
k
sheet_name
=
k
sheet
=
excel
.
add_sheet
(
sheet_name
)
sheet
=
excel
.
add_sheet
(
sheet_name
)
head_list
=
v
head_list
=
v
print
(
head_list
)
#
print(head_list)
for
j
in
range
(
len
(
head_list
)):
for
j
in
range
(
len
(
head_list
)):
sheet
.
write
(
0
,
j
,
head_list
[
j
])
sheet
.
write
(
0
,
j
,
head_list
[
j
])
# 写入数据,从第二行(i+1)
# 写入数据,从第二行(i+1)
...
@@ -2066,7 +2066,7 @@ def batch_export_project3():
...
@@ -2066,7 +2066,7 @@ def batch_export_project3():
sheet_name
=
k
sheet_name
=
k
sheet
=
excel
.
add_sheet
(
sheet_name
)
sheet
=
excel
.
add_sheet
(
sheet_name
)
head_list
=
v
head_list
=
v
print
(
head_list
)
#
print(head_list)
for
j
in
range
(
len
(
head_list
)):
for
j
in
range
(
len
(
head_list
)):
sheet
.
write
(
0
,
j
,
head_list
[
j
])
sheet
.
write
(
0
,
j
,
head_list
[
j
])
# 写入数据,从第二行(i+1)
# 写入数据,从第二行(i+1)
...
...
apps/models.py
View file @
49b4993d
...
@@ -1008,7 +1008,7 @@ class User(BaseModel, db.Model):
...
@@ -1008,7 +1008,7 @@ class User(BaseModel, db.Model):
s
=
Serializer
(
Config
.
SECRET_KEY
,
expires_in
=
Config
.
TOKEN_EXPIRATION
)
s
=
Serializer
(
Config
.
SECRET_KEY
,
expires_in
=
Config
.
TOKEN_EXPIRATION
)
# 接收用户id转换与编码
# 接收用户id转换与编码
token
=
s
.
dumps
({
"id"
:
user_id
})
.
decode
(
'ascii'
)
token
=
s
.
dumps
({
"id"
:
user_id
})
.
decode
(
'ascii'
)
print
(
token
)
#
print(token)
return
token
return
token
...
...
apps/view_index/view.py
View file @
49b4993d
...
@@ -378,8 +378,6 @@ def project():
...
@@ -378,8 +378,6 @@ def project():
i
=
0
i
=
0
for
project
in
project_list
:
for
project
in
project_list
:
i
+=
1
i
+=
1
print
(
i
)
print
(
i
)
if
i
>
7
:
if
i
>
7
:
pass
pass
else
:
else
:
...
...
apps/view_user/view.py
View file @
49b4993d
...
@@ -142,13 +142,6 @@ def back_login():
...
@@ -142,13 +142,6 @@ def back_login():
role_name
=
'超级管理员'
role_name
=
'超级管理员'
if
role
==
2
:
if
role
==
2
:
role_name
=
'系统运维员'
role_name
=
'系统运维员'
# operation_message = "{}通过后台登录成功了!".format(role_name)
# upload_time = datetime.now()
# log = OperationLog(read_type=0, operation_people_id=user.id, operation_time=upload_time, operation_people=name,
# section=role_name,
# operation_message=operation_message, action='使用密码登录后台管理系统成功')
# db.session.add(log)
# db.session.commit()
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"登录成功"
,
token
=
token
,
flag
=
3
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"登录成功"
,
token
=
token
,
flag
=
3
)
...
...
apps/view_xiaocx/view.py
View file @
49b4993d
...
@@ -414,7 +414,9 @@ def company_list():
...
@@ -414,7 +414,9 @@ def company_list():
company_count
=
company_obj
.
count
()
company_count
=
company_obj
.
count
()
data
=
[{
data
=
[{
"id"
:
company_obj
.
id
,
"id"
:
company_obj
.
id
,
"name"
:
company_obj
.
company_name
"name"
:
company_obj
.
company_name
,
"product_all"
:
company_obj
.
product_all
,
"c_name"
:
company_obj
.
c_name
}
for
company_obj
in
company_obj_list
]
}
for
company_obj
in
company_obj_list
]
except
Exception
as
e
:
except
Exception
as
e
:
...
...
insert_company_hots.py
View file @
49b4993d
...
@@ -18,10 +18,13 @@ def handle():
...
@@ -18,10 +18,13 @@ def handle():
# 读取企业数据表的资质
# 读取企业数据表的资质
i
=
1
i
=
1
# for company_obj in company_obj_list:
# for company_obj in company_obj_list:
for
id
in
range
(
16
,
5944047
):
for
id
in
range
(
305515
,
5944047
):
try
:
company_obj
=
Enterprise
.
query
.
get
(
id
)
company_obj
=
Enterprise
.
query
.
get
(
id
)
if
not
company_obj
:
if
not
company_obj
:
continue
continue
except
:
continue
grade_li
=
[]
grade_li
=
[]
# if company_obj.company_name == '山东中联佳裕软件股份有限公司':
# if company_obj.company_name == '山东中联佳裕软件股份有限公司':
...
...
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