feat: 重构UI界面,添加匹配条件配置、日志系统,优化匹配算法
This commit is contained in:
@@ -47,10 +47,10 @@ for i, name in enumerate(student_names):
|
||||
else:
|
||||
student[day] = ''
|
||||
|
||||
history_count = min(5, i)
|
||||
history_count = random.randint(0, 3)
|
||||
available_teachers = [t for t in teacher_names if t != name]
|
||||
if available_teachers:
|
||||
history_teachers = random.sample(available_teachers, history_count)
|
||||
if available_teachers and history_count > 0:
|
||||
history_teachers = random.sample(available_teachers, min(history_count, len(available_teachers)))
|
||||
student["历史匹配老师"] = ', '.join(history_teachers)
|
||||
else:
|
||||
student["历史匹配老师"] = ""
|
||||
|
||||
Reference in New Issue
Block a user