From 058141151ea767ec95dbeddb5fe41642fbd36908 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 9 Nov 2025 14:27:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96bind=5Fresignation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/services.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/hrm/services.py b/apps/hrm/services.py index e7405942..96c81c49 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -502,12 +502,14 @@ def bind_resignation(ticket: Ticket, transition: Transition, new_ticket_data: di ins = Resignation.objects.get(id=new_ticket_data['t_id']) if ins.ticket and ins.ticket.id != ticket.id: raise ParseError('重复创建工单') + ticket_data = ticket.ticket_data + ticket_data.update({ + 't_model': 'resignation', + 't_id': ins.id, + }) + ticket.ticket_data = ticket_data + ticket.create_by = ins.create_by + ticket.save() if ins.ticket is None: - ticket_data = ticket.ticket_data - ticket_data.update({ - 't_model': 'resignation', - 't_id': ins.id, - }) - ticket.ticket_data = ticket_data - ticket.create_by = ins.create_by - ticket.save() \ No newline at end of file + ins.ticket = ticket + ins.save() \ No newline at end of file