fix: 判题规则按原型调整

- 品类结构优化第4步:架构排序标准答案翻转为顶层在上(应用功能层→硬件物理层)
- 消费者需求与行为第4步:报告模块不再限定恰好5个,至少1个且内容完整即可
fix/exam-question-access-material-excel-delete-draft
chenyuan 1 week ago
parent f032ae92b4
commit 92bd2fc162

@ -13,14 +13,13 @@ import java.util.List;
@Service
public class ConsumerBehaviorStepFourServiceImpl implements ConsumerBehaviorStepFourService {
private static final int REQUIRED_REPORT_ROWS = 5;
@Override
public ConsumerBehaviorStepFourValidationResult validate(ConsumerBehaviorStepFourValidationRequest request, JwtUser user) {
requireStudent(user);
List<ConsumerBehaviorStepFourValidationRequest.ReportRow> rows = request == null ? null : request.getRows();
if (rows == null || rows.size() != REQUIRED_REPORT_ROWS) {
throw badRequest("问卷调研报告需填写 5 个报告模块");
if (rows == null || rows.isEmpty()) {
throw badRequest("请至少填写一个报告模块");
}
for (ConsumerBehaviorStepFourValidationRequest.ReportRow row : rows) {
if (row == null || StringUtils.isBlank(row.getTitle()) || StringUtils.isBlank(row.getContent())) {

@ -23,7 +23,7 @@ public class ProductArchitectureDesignStepOneServiceImpl implements ProductArchi
private static final String TASK_KEY = "product-structure";
private static final int STEP_NO = 1;
private static final List<String> DEFAULT_ANSWER = Arrays.asList(
"hardware-physical", "driver-sensing", "algorithm-processing", "application-function");
"application-function", "algorithm-processing", "driver-sensing", "hardware-physical");
private final JdbcTemplate jdbcTemplate;

Loading…
Cancel
Save