opl_end时close_mtask 参数类型错误
This commit is contained in:
parent
dc5d3d184f
commit
cf26cc69a8
|
@ -64,9 +64,8 @@ def bind_opl(ticket: Ticket, transition: Transition, new_ticket_data: dict):
|
||||||
def t_submit_close_mtask(ticket: Ticket, transition: Transition, new_ticket_data: dict):
|
def t_submit_close_mtask(ticket: Ticket, transition: Transition, new_ticket_data: dict):
|
||||||
# 提交作业关闭时关闭作业监控
|
# 提交作业关闭时关闭作业监控
|
||||||
opl = Opl.objects.filter(ticket=ticket).first()
|
opl = Opl.objects.filter(ticket=ticket).first()
|
||||||
if opl and opl.mtask_uid:
|
if opl:
|
||||||
close_mtask(opl.mtask_uid)
|
close_mtask(opl)
|
||||||
# 防止没变化,手动处理一下
|
|
||||||
|
|
||||||
|
|
||||||
def opl_audit_end(ticket: Ticket):
|
def opl_audit_end(ticket: Ticket):
|
||||||
|
@ -138,16 +137,16 @@ def opl_end(ticket: Ticket):
|
||||||
"""
|
"""
|
||||||
作业许可证关闭时执行
|
作业许可证关闭时执行
|
||||||
"""
|
"""
|
||||||
opl = ticket.opl
|
opl = Opl.objects.filter(ticket=ticket).first()
|
||||||
if opl.mtask_uid:
|
if opl:
|
||||||
# 关闭作业视频监控任务
|
# 关闭作业视频监控任务
|
||||||
close_mtask(opl.mtask_uid)
|
close_mtask(opl)
|
||||||
operation = opl.operation
|
operation = opl.operation
|
||||||
opls = Opl.objects.filter(operation=operation)
|
opls = Opl.objects.filter(operation=operation)
|
||||||
opls.filter(ticket=None).delete() # 删除无用许可证
|
opls.filter(ticket=None).delete() # 删除无用许可证
|
||||||
states = opls.values_list('ticket__state__type', flat=True)
|
states = opls.values_list('ticket__state__type', flat=True)
|
||||||
if 0 in states or 1 in states: # 查看工单状态
|
if 0 in states or 1 in states: # 查看工单状态
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
operation.state = Operation.OP_DONE
|
operation.state = Operation.OP_DONE
|
||||||
operation.save()
|
operation.save()
|
||||||
|
|
Loading…
Reference in New Issue