MxjbPaperExamineeMapper.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.mxjb.mapper.MxjbPaperExamineeMapper">
  6. <resultMap type="MxjbPaperExaminee" id="MxjbPaperExamineeResult">
  7. <result property="examineeId" column="examinee_id" />
  8. <result property="paperId" column="paper_id" />
  9. <result property="customerCode" column="customer_code" />
  10. <result property="beginTime" column="begin_time" />
  11. <result property="endTime" column="end_time" />
  12. <result property="state" column="state" />
  13. <result property="scoreLevel" column="score_level" />
  14. <result property="score" column="score" />
  15. <result property="scoreRate" column="score_rate" />
  16. <result property="ranking" column="ranking" />
  17. <result property="gradeRanking" column="grade_ranking" />
  18. <result property="chooseCount" column="choose_count" />
  19. <result property="chooseTotal" column="choose_total" />
  20. <result property="subjectiveCount" column="subjective_count" />
  21. <result property="subjectiveTotal" column="subjective_total" />
  22. </resultMap>
  23. <sql id="selectMxjbPaperExamineeVo">
  24. select examinee_id, paper_id, customer_code, begin_time, end_time, state, score_level, score, score_rate, ranking, grade_ranking, choose_count, choose_total, subjective_count, subjective_total from mxjb_paper_examinee
  25. </sql>
  26. <select id="selectMxjbPaperExamineeList" parameterType="MxjbPaperExaminee" resultMap="MxjbPaperExamineeResult">
  27. <include refid="selectMxjbPaperExamineeVo"/>
  28. <where>
  29. <if test="paperId != null "> and paper_id = #{paperId}</if>
  30. <if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</if>
  31. <if test="beginTime != null "> and begin_time = #{beginTime}</if>
  32. <if test="endTime != null "> and end_time = #{endTime}</if>
  33. <if test="state != null "> and state = #{state}</if>
  34. <if test="scoreLevel != null and scoreLevel != ''"> and score_level = #{scoreLevel}</if>
  35. <if test="score != null "> and score = #{score}</if>
  36. <if test="scoreRate != null "> and score_rate = #{scoreRate}</if>
  37. <if test="ranking != null "> and ranking = #{ranking}</if>
  38. <if test="gradeRanking != null "> and grade_ranking = #{gradeRanking}</if>
  39. <if test="chooseCount != null "> and choose_count = #{chooseCount}</if>
  40. <if test="chooseTotal != null "> and choose_total = #{chooseTotal}</if>
  41. <if test="subjectiveCount != null "> and subjective_count = #{subjectiveCount}</if>
  42. <if test="subjectiveTotal != null "> and subjective_total = #{subjectiveTotal}</if>
  43. </where>
  44. </select>
  45. <select id="selectMxjbPaperExamineeById" parameterType="Long" resultMap="MxjbPaperExamineeResult">
  46. <include refid="selectMxjbPaperExamineeVo"/>
  47. where examinee_id = #{examineeId}
  48. </select>
  49. <insert id="insertMxjbPaperExaminee" parameterType="MxjbPaperExaminee" useGeneratedKeys="true" keyProperty="examineeId">
  50. insert into mxjb_paper_examinee
  51. <trim prefix="(" suffix=")" suffixOverrides=",">
  52. <if test="paperId != null">paper_id,</if>
  53. <if test="customerCode != null">customer_code,</if>
  54. <if test="beginTime != null">begin_time,</if>
  55. <if test="endTime != null">end_time,</if>
  56. <if test="state != null">state,</if>
  57. <if test="scoreLevel != null">score_level,</if>
  58. <if test="score != null">score,</if>
  59. <if test="scoreRate != null">score_rate,</if>
  60. <if test="ranking != null">ranking,</if>
  61. <if test="gradeRanking != null">grade_ranking,</if>
  62. <if test="chooseCount != null">choose_count,</if>
  63. <if test="chooseTotal != null">choose_total,</if>
  64. <if test="subjectiveCount != null">subjective_count,</if>
  65. <if test="subjectiveTotal != null">subjective_total,</if>
  66. </trim>
  67. <trim prefix="values (" suffix=")" suffixOverrides=",">
  68. <if test="paperId != null">#{paperId},</if>
  69. <if test="customerCode != null">#{customerCode},</if>
  70. <if test="beginTime != null">#{beginTime},</if>
  71. <if test="endTime != null">#{endTime},</if>
  72. <if test="state != null">#{state},</if>
  73. <if test="scoreLevel != null">#{scoreLevel},</if>
  74. <if test="score != null">#{score},</if>
  75. <if test="scoreRate != null">#{scoreRate},</if>
  76. <if test="ranking != null">#{ranking},</if>
  77. <if test="gradeRanking != null">#{gradeRanking},</if>
  78. <if test="chooseCount != null">#{chooseCount},</if>
  79. <if test="chooseTotal != null">#{chooseTotal},</if>
  80. <if test="subjectiveCount != null">#{subjectiveCount},</if>
  81. <if test="subjectiveTotal != null">#{subjectiveTotal},</if>
  82. </trim>
  83. </insert>
  84. <update id="updateMxjbPaperExaminee" parameterType="MxjbPaperExaminee">
  85. update mxjb_paper_examinee
  86. <trim prefix="SET" suffixOverrides=",">
  87. <if test="paperId != null">paper_id = #{paperId},</if>
  88. <if test="customerCode != null">customer_code = #{customerCode},</if>
  89. <if test="beginTime != null">begin_time = #{beginTime},</if>
  90. <if test="endTime != null">end_time = #{endTime},</if>
  91. <if test="state != null">state = #{state},</if>
  92. <if test="scoreLevel != null">score_level = #{scoreLevel},</if>
  93. <if test="score != null">score = #{score},</if>
  94. <if test="scoreRate != null">score_rate = #{scoreRate},</if>
  95. <if test="ranking != null">ranking = #{ranking},</if>
  96. <if test="gradeRanking != null">grade_ranking = #{gradeRanking},</if>
  97. <if test="chooseCount != null">choose_count = #{chooseCount},</if>
  98. <if test="chooseTotal != null">choose_total = #{chooseTotal},</if>
  99. <if test="subjectiveCount != null">subjective_count = #{subjectiveCount},</if>
  100. <if test="subjectiveTotal != null">subjective_total = #{subjectiveTotal},</if>
  101. </trim>
  102. where examinee_id = #{examineeId}
  103. </update>
  104. <delete id="deleteMxjbPaperExamineeById" parameterType="Long">
  105. delete from mxjb_paper_examinee where examinee_id = #{examineeId}
  106. </delete>
  107. <delete id="deleteMxjbPaperExamineeByIds" parameterType="String">
  108. delete from mxjb_paper_examinee where examinee_id in
  109. <foreach item="examineeId" collection="array" open="(" separator="," close=")">
  110. #{examineeId}
  111. </foreach>
  112. </delete>
  113. </mapper>