修复例行路口大数据方案验证异常
This commit is contained in:
parent
09f5c303f0
commit
719d6f863b
|
|
@ -281,12 +281,13 @@ class TmnetDbHelper(TableDbHelperBase):
|
|||
return 0, e
|
||||
|
||||
def clear_old_cross_examine_records(self):
|
||||
old_data_sql = "select * from cross_doctor_metadata.cross_phase_problem_record where end_date is null"
|
||||
old_data_sql = "select * from cross_doctor_matedata.cross_phase_problems_record where end_date is null"
|
||||
old_data = self.do_select(old_data_sql)
|
||||
clear_list = []
|
||||
now_date, suc_num = datetime.now().strftime('%Y%m%d'), 0
|
||||
for row in old_data:
|
||||
phase_type = row['phase_type']
|
||||
if len(phase_type) >= 5:
|
||||
if phase_type[-4] == '^^^^':
|
||||
clear_list.append({
|
||||
'crossid': row['crossid'],
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ def init(args):
|
|||
dev = int(args.dev)
|
||||
day = args.day
|
||||
if dev == 0:
|
||||
g_cloud_db['host'] = '172.21.32.41'
|
||||
g_cloud_db['host'] = '172.21.32.43'
|
||||
g_cloud_db['port'] = 3306
|
||||
g_dbinfo['host'] = '172.21.32.21'
|
||||
g_db_pool.init_pool(g_dbinfo)
|
||||
|
|
@ -69,7 +69,7 @@ def init(args):
|
|||
if day == 0:
|
||||
day = (datetime.now() - timedelta(days=1)).strftime('%Y%m%d')
|
||||
today_data = g_db_cloud.query_all_cross_examine_problems(day)
|
||||
yes_str = datetime.strptime(day, '%Y%m%d').strftime('%Y-%m-%d')
|
||||
yes_str = (datetime.strptime(day, '%Y%m%d') - timedelta(days=1)).strftime('%Y-%m-%d')
|
||||
yesterday_records = g_db_cross.query_all_cross_examine_records(yes_str)
|
||||
yesterday_data_dict = parse_records2dict(yesterday_records)
|
||||
today_records = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue