派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
src/main/java/com/qxueyou/scc/exam/action/ExamPaperSectionController.java
@@ -30,11 +30,11 @@
 * @author kevin
 * @history 2018-03-11 create kevin
 */
@Api(tags = "试卷部分管理接口")
@Api(tags = "试卷部分管理接口")
@Controller
@RequestMapping(value = "/exam/papersection")
public class ExamPaperSectionController {
    //分页查询中,默认记录条数和页数
    //分页查询中,默认记录条数和页数
    private static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE;
    private static final int DEFAULT_PAGE_NUM = 1;
@@ -52,18 +52,18 @@
    IExerciseGroupService exerciseGroupService;
    /**
     * 试卷部分列表
     * 试卷部分列表
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public @ResponseBody
    Result pageList(String examPaperId, Integer pageSize, Integer pageNum) {
        Result result = new Result(Boolean.TRUE);
        Pager pager = new Pager();
        // 查询记录数
        // 查询记录数
        String hqlCount = "from ExamPaperSectionInfo where examPaperId=? and deleteFlag is false";
        int totalCount = commonDAO.findCount(hqlCount, CollectionUtils.newList(examPaperId));
        // page赋值
        // page赋值
        pager.setTotalCount(totalCount);
        pager.setPageSize(pageSize != null && pageSize > 0 ? pageSize : DEFAULT_PAGE_SIZE);
        pager.setPageNum(pageNum != null && pageNum > 0 ? pageNum : DEFAULT_PAGE_NUM);
@@ -76,7 +76,7 @@
    }
    /**
     * 详情
     * 详情
     *
     * @param examPaperSectionId
     * @return
@@ -90,7 +90,7 @@
    }
    /**
     * 保存
     * 保存
     *
     * @param examPaperSectionInfo
     * @return
@@ -110,7 +110,7 @@
    }
    /**
     * 删除
     * 删除
     *
     * @param examPaperSectionIds
     * @return
@@ -126,7 +126,7 @@
    }
    /**
     * 设置题库
     * 设置题库
     *
     * @param examPaperSectionInfo
     * @return
@@ -137,7 +137,7 @@
    public @ResponseBody
    Result saveSectionGroup(String sectionId, String selectedGroupIds, String selectedItemTypes) throws Exception {
        if (StringUtils.isEmpty(sectionId) || StringUtils.isEmpty(selectedGroupIds) || StringUtils.isEmpty(selectedItemTypes)) {
            return new Result(false, "请求参数错误!");
            return new Result(false, "请求参数错误!");
        }
        String[] arrGroupIds = selectedGroupIds.split(",");
@@ -152,7 +152,7 @@
    }
    /**
     * 自主选题
     * 自主选题
     *
     * @param examPaperSectionInfo
     * @return
@@ -162,7 +162,7 @@
    public @ResponseBody
    Result saveSectionSeletedItems(String sectionId, String sourceGroupId, String selectedItemIds) throws Exception {
        if (StringUtils.isEmpty(sectionId) || StringUtils.isEmpty(sourceGroupId) || StringUtils.isEmpty(selectedItemIds)) {
            return new Result(false, "请求参数错误!");
            return new Result(false, "请求参数错误!");
        }
        String[] arrItemIds = selectedItemIds.split(",");
@@ -170,7 +170,7 @@
    }
    /**
     * 交换题目顺序
     * 交换题目顺序
     *
     * @param examPaperSectionInfo
     * @return
@@ -183,7 +183,7 @@
    }
    /**
     * 删除题目
     * 删除题目
     *
     * @param examPaperSectionInfo
     * @return
@@ -196,7 +196,7 @@
    }
    /**
     * 考试保存题目
     * 考试保存题目
     *
     * @return
     */
@@ -210,7 +210,7 @@
    /**
     * 查询当前题组中被选中的题目ID
     * 查询当前题组中被选中的题目ID
     */
    @RequestMapping(value = "/group/itemIds", method = RequestMethod.GET)
    public @ResponseBody