feat: resignation添加ticketMixin2

This commit is contained in:
caoqianming 2025-11-24 13:35:32 +08:00
parent dc17c01aaf
commit b939fcbef2
2 changed files with 1 additions and 16 deletions

View File

@ -498,18 +498,3 @@ class HrmService:
def bind_resignation(ticket: Ticket, transition: Transition, new_ticket_data: dict):
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:
ins.ticket = ticket
ins.save()

View File

@ -399,4 +399,4 @@ class ResignationViewSet(TicketMixin, EuModelViewSet):
queryset = Resignation.objects.all()
serializer_class = ResignationSerializer
search_fields = ["employee__name"]
workflow_key = ["wf_resignation"]
workflow_key = "wf_resignation"