Commit e62cc11c authored by wujipeng's avatar wujipeng
Browse files

优化

parent 967d97b3
......@@ -145,6 +145,28 @@ public class FzGradesServiceImpl extends ServiceImpl<FzGradesMapper, FzGradesEnt
if (byCode.put(code, entity) != null) {
throw new BusinessException("同一份成绩中题目编号不能重复");
}
//转换type
//单选题、多选题、选图题 -> 客观题
//主观题 -> 主观题
//绘图题 -> 绘图题
//实操题 -> 实操题
switch (value.getType()) {
case "单选题":
case "多选题":
case "选图题":
entity.setType("客观题");
break;
case "主观题":
entity.setType("主观题");
break;
case "绘图题":
entity.setType("绘图题");
break;
case "实操题":
entity.setType("实操题");
break;
default:
}
}
List<FzGradesEntity> result = new ArrayList<>(byCode.values());
result.sort(Comparator.comparing(FzGradesEntity::getCode));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment