feat: 返回TicketSimpleSerializer

This commit is contained in:
caoqianming 2025-11-07 16:44:46 +08:00
parent 66d523b711
commit 590357468d
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@ from apps.utils.tools import check_id_number_strict, get_info_from_id
from rest_framework.exceptions import ParseError from rest_framework.exceptions import ParseError
from django.conf import settings from django.conf import settings
import datetime import datetime
from apps.wf.serializers import TicketSimpleSerializer
class EmployeeShortSerializer(CustomModelSerializer): class EmployeeShortSerializer(CustomModelSerializer):
@ -319,6 +320,7 @@ class AttendanceSerializer(CustomModelSerializer):
class ResignationSerializer(CustomModelSerializer): class ResignationSerializer(CustomModelSerializer):
belong_dept_name = serializers.CharField(source="employee.belong_dept.name", read_only=True) belong_dept_name = serializers.CharField(source="employee.belong_dept.name", read_only=True)
post_name = serializers.CharField(source="employee.post.name", read_only=True) post_name = serializers.CharField(source="employee.post.name", read_only=True)
ticket_ = TicketSimpleSerializer(source="ticket", read_only=True)
class Meta: class Meta:
model = Resignation model = Resignation
fields = '__all__' fields = '__all__'