优化科室匹配,修正优先级判断

This commit is contained in:
2024-08-21 10:59:04 +08:00
parent 7fbcf7d268
commit 2ffdd5a22d
3 changed files with 10 additions and 7 deletions

View File

@@ -341,7 +341,7 @@ def discharge_task(pk_phhd, discharge_record, identity):
match_departments.append(search_department(new_department))
break
best_match = None
best_score = 0
best_score = -1000
for match_department in match_departments:
if match_department and match_department[1] > best_score:
best_match = match_department