提交 5ba0ed4c 作者: 薛凌堃

证监会公告数据维护

上级 7f5f3c83
""" """
...@@ -23,6 +23,8 @@ log = baseCore.getLogger() ...@@ -23,6 +23,8 @@ log = baseCore.getLogger()
cnx = baseCore.cnx cnx = baseCore.cnx
cursor = baseCore.cursor cursor = baseCore.cursor
cnx_ = baseCore.cnx_
cursor_ = baseCore.cursor_
# tracker_conf = get_tracker_conf('./client.conf') # tracker_conf = get_tracker_conf('./client.conf')
# client = Fdfs_client(tracker_conf) # client = Fdfs_client(tracker_conf)
...@@ -31,8 +33,8 @@ taskType = '企业公告/证监会' ...@@ -31,8 +33,8 @@ taskType = '企业公告/证监会'
def secrchATT(item_id, name, type_id): def secrchATT(item_id, name, type_id):
sel_sql = '''select id from clb_sys_attachment where item_id = %s and name = %s and type_id=%s ''' sel_sql = '''select id from clb_sys_attachment where item_id = %s and name = %s and type_id=%s '''
cursor.execute(sel_sql, (item_id, name, type_id)) cursor_.execute(sel_sql, (item_id, name, type_id))
selects = cnx.fetchone() selects = cnx_.fetchone()
return selects return selects
...@@ -64,8 +66,8 @@ def tableUpdate(retData, com_name, year, pdf_name, num): ...@@ -64,8 +66,8 @@ def tableUpdate(retData, com_name, year, pdf_name, num):
status, create_by, status, create_by,
create_time, page_size) create_time, page_size)
cursor.execute(Upsql, values) # 插入 cursor_.execute(Upsql, values) # 插入
cnx.commit() # 提交 cnx_.commit() # 提交
log.info("更新完成:{}".format(Upsql)) log.info("更新完成:{}".format(Upsql))
selects = secrchATT(item_id, pdf_name, type_id) selects = secrchATT(item_id, pdf_name, type_id)
id = selects[0] id = selects[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论