xiangpei
2024-05-24 a59f6162dd58465ffc6b0084db0385bd8ddd8fcc
src/main/resources/mapper/ExamPaperAnswerMapper.xml
@@ -491,7 +491,7 @@
      </foreach>
    </insert>
  <select id="dataByTemplate" resultType="java.util.Map" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
  <select id="dataByTemplate" resultType="com.mindskip.xzs.domain.vo.ExamPaperDataExportVO" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
    SELECT
      a.id,
      a.name,
@@ -508,7 +508,7 @@
      a.id, a.name
  </select>
  <select id="totalByTemplate" resultType="java.util.Map" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
  <select id="totalByTemplate" resultType="com.mindskip.xzs.domain.vo.ExamPaperDataExportVO" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
    SELECT
           (SELECT (SELECT count(*) FROM t_exam_paper) + (SELECT count(*) FROM t_exam_templates)) as examTotal, -- 总考试次数
           COUNT(DISTINCT c.create_user) as factPeopleTotal, -- 参考人数
@@ -524,7 +524,7 @@
      a.id
  </select>
  <select id="dataByPaper" resultType="java.util.Map" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
  <select id="dataByPaper" resultType="com.mindskip.xzs.domain.vo.ExamPaperDataExportVO" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
    SELECT
      a.id,
      a.name,
@@ -535,12 +535,12 @@
      t_department a
        LEFT JOIN t_user_department b ON a.id = b.department_id
        LEFT JOIN t_exam_paper_answer c ON b.user_id = c.create_user AND (c.invalid = 0 OR c.invalid IS NULL) AND c.exam_paper_id = #{id}
        LEFT JOIN t_exam_paper_user d ON c.exam_paper_id = d.exam_paper_id and b.user_id = d.user_id
        LEFT JOIN t_exam_paper_user d ON b.user_id = d.user_id AND d.exam_paper_id = #{id}
    GROUP BY
      a.id, a.name
  </select>
  <select id="totalByPaper" resultType="java.util.Map" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
  <select id="totalByPaper" resultType="com.mindskip.xzs.domain.vo.ExamPaperDataExportVO" parameterType="com.mindskip.xzs.domain.vo.ExamPaperDataVO">
    SELECT
        (SELECT (SELECT count(*) FROM t_exam_paper) + (SELECT count(*) FROM t_exam_templates)) as examTotal, -- 总考试次数
        count(DISTINCT b.create_user) AS factPeopleTotal, -- 参考数