修复更新状态bug
This commit is contained in:
parent
a3eff70162
commit
bbe69879d6
|
|
@ -413,7 +413,7 @@ def update_cross_examine_record_state(params):
|
|||
if not time_range:
|
||||
return json.dumps(make_common_res(10, '缺少时段范围, 请刷新后重试'))
|
||||
tp_start = int(str(time_range.split('-')[0]).split(':')[0]) * 100 + int(str(time_range.split('-')[0]).split(':')[1])
|
||||
ret = db_cross.update_cross_examine_record_state(crossid, first_date, tp_start, final_state)
|
||||
ret = db_cross.update_cross_examine_record_state_sql(crossid, first_date, tp_start, final_state)
|
||||
if ret == 1:
|
||||
return json.dumps(make_common_res(0, 'ok'))
|
||||
return json.dumps(make_common_res(11, '修改失败,请检查后重试'))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Author: Owl
|
||||
# @Date: 2025/11/4 15:15
|
||||
# @Description: 路口巡检页面的相关接口入口类
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Author: Owl
|
||||
# @Date: 2025/11/4 15:13
|
||||
# @Description: 路口巡检页面相关接口
|
||||
|
|
@ -37,8 +37,8 @@ class CrossDbHelper(TableDbHelperBase):
|
|||
""" % (crossid, start_hm, first_date, end_date)
|
||||
return self.do_select(sql)
|
||||
|
||||
def update_cross_examine_record_state(self, crossid, first_date, start_hm, state):
|
||||
def update_cross_examine_record_state_sql(self, crossid, first_date, start_hm, state):
|
||||
sql = """
|
||||
update cross_doctor_matedata.cross_phase_problems_record set state = '%s' where crossid = '%s' and first_date = '%s' and start_hm = %s
|
||||
""" % (state, crossid, first_date, start_hm)
|
||||
return self.do_update(sql)
|
||||
return self.do_execute(sql)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Author: Owl
|
||||
# @Date: 2025/11/4 15:14
|
||||
# @Description: 路口巡检页面接口的公共函数类
|
||||
Loading…
Reference in New Issue