Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
蒋勇
zhichan
Commits
5cd367d6
Commit
5cd367d6
authored
Jan 10, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
d6f80b30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
calc_result/RiskComputer.py
+1
-1
calc_result/Update.py
+1
-1
No files found.
calc_result/RiskComputer.py
View file @
5cd367d6
...
...
@@ -38,7 +38,7 @@ class RiskComputer:
self
.
IndexRes
[
indexItem
.
Name
]
=
"0"
def
Ret2Json
(
self
):
#把指标结果转化为樊辉需要的Json
#json写入数据库
db
=
pymysql
.
connect
(
host
=
FK_DB_HOST
,
port
=
FK_DB_PORT
,
user
=
FK_DB_USER
,
password
=
FK_DB_PWD
,
db
=
FK_DB_NAME
,
charset
=
"utf8mb4"
)
db
=
pymysql
.
connect
(
host
=
FK_DB_HOST
,
port
=
int
(
FK_DB_PORT
)
,
user
=
FK_DB_USER
,
password
=
FK_DB_PWD
,
db
=
FK_DB_NAME
,
charset
=
"utf8mb4"
)
cursor
=
db
.
cursor
()
for
key
in
self
.
IndexRes
:
sql
=
"""INSERT INTO result_set(batchno,indexName,status) VALUES ('"""
+
str
(
self
.
batch_No
)
+
"""', '"""
+
str
(
key
)
+
"""','"""
+
str
(
self
.
IndexRes
[
key
])
+
"""')"""
...
...
calc_result/Update.py
View file @
5cd367d6
...
...
@@ -12,7 +12,7 @@ FK_DB_USER = env_dist.get('FK_DB_USER') #获取mysql用户名
FK_DB_PWD
=
env_dist
.
get
(
'FK_DB_PWD'
)
#获取mysql密码
FK_DB_NAME
=
env_dist
.
get
(
'FK_DB_NAME'
)
#获取mysql库
class
UpdateId
:
conn
=
pymysql
.
connect
(
host
=
FK_DB_HOST
,
port
=
FK_DB_PORT
,
user
=
FK_DB_USER
,
password
=
FK_DB_PWD
,
db
=
FK_DB_NAME
,
charset
=
"utf8mb4"
)
conn
=
pymysql
.
connect
(
host
=
FK_DB_HOST
,
port
=
int
(
FK_DB_PORT
)
,
user
=
FK_DB_USER
,
password
=
FK_DB_PWD
,
db
=
FK_DB_NAME
,
charset
=
"utf8mb4"
)
def
Update
(
self
,
BatchNo
):
cursor
=
self
.
conn
.
cursor
()
sql
=
"UPDATE upload_batch SET batchstatuscode = 'rptover' WHERE id =
%
s;"
...
...
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