fix: enm/task 水泥批号插入
This commit is contained in:
parent
50cdbf9428
commit
4d498f99a3
|
|
@ -90,13 +90,13 @@ def db_ins_mplogx():
|
||||||
WHERE bill_date > %s
|
WHERE bill_date > %s
|
||||||
ORDER BY id, bill_date
|
ORDER BY id, bill_date
|
||||||
"""
|
"""
|
||||||
|
# date_obj = datetime.datetime.strptime(bill_date, '%Y-%m-%d %H:%M:%S')
|
||||||
cursor.execute(query, (bill_date,))
|
cursor.execute(query, (bill_date,))
|
||||||
rows = cursor.fetchall() # 获取数据后保存至本地
|
rows = cursor.fetchall() # 获取数据后保存至本地
|
||||||
if rows:
|
if rows:
|
||||||
bill_date = rows[-1][0]
|
bill_date = rows[-1][-1]
|
||||||
print(rows)
|
|
||||||
db_insert_mplogx_batch(rows)
|
db_insert_mplogx_batch(rows)
|
||||||
update_sysconfig({'enm1': {'bill_date': bill_date}})
|
update_sysconfig({'enm1': {'bill_date': str(bill_date)}})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue