fix:edu 增加用户ID

This commit is contained in:
zty 2024-06-06 10:44:53 +08:00
parent 6694a4f0d6
commit 8248d8f8a8
1 changed files with 3 additions and 2 deletions

View File

@ -639,11 +639,12 @@ class ExamRecordViewSet(ListModelMixin, DestroyModelMixin, RetrieveModelMixin, G
now_data = datetime.now()
course = exam.course_name.all()
courese_ids = [i.id for i in course]
current_date = now_data.strftime('%Y%m%d')
current_date = now_data.strftime('%Y-%m-%d')
cer_number = now_data.strftime('%Y%m%d')
data_dict = {
'姓名': request.user.name,
'用户ID': request.user,
'证书编号': 'CTCZL'+ current_date,
'证书编号': 'CTCZL'+ cer_number,
'证书方案': '202312',
'单位名称': request.user.dept.name,
'所属单位': '国检测试控股集团'+request.user.dept.name,