Explorar el Código

调整专业组引起的测评计算问题

mingfu hace 1 semana
padre
commit
ac83a7c89e

+ 1 - 1
ie-system/src/main/java/com/ruoyi/ie/mapper/AMarjorPlanMapper.java

@@ -23,7 +23,7 @@ public interface AMarjorPlanMapper
      * @return 专业计划要求
      */
     public AMarjorPlan selectAMarjorPlanById(Long id);
-    public List<String> selectMajorCodesByIds(Long[] ids);
+    public List<AMarjorPlan> selectMajorCodesByIds(@Param("ids") Long[] ids, @Param("year") Integer year);
 
     public List<AMarjorPlan> selectListByRuleCond(Map cond);
 

+ 1 - 0
ie-system/src/main/resources/mapper/ie/AEnrollScoreMapper.xml

@@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examineeType != null "> and es.examineeTypes = #{examineeType}</if>
             <if test="year != null "> and es.year = #{year}</if>
             <if test="universityCode != null and universityCode != ''"> and u.`code` = #{universityCode}</if>
+            <if test="majorGroup != null"> and es.`majorGroups` = #{majorGroup}</if>
             <choose>
                 <when test="majorCodes != null"> AND (m1.`id` IS NULL OR m1.`code` in <foreach item="o" collection="majorCodes" open="(" separator="," close=")">#{o}</foreach>)</when>
                 <when test="majorTypes != null"> AND (m1.`id` IS NULL OR m2.`code` in <foreach item="o" collection="majorTypes" open="(" separator="," close=")">#{o}</foreach>)</when>

+ 1 - 0
ie-system/src/main/resources/mapper/ie/AEnrollSpecialMapper.xml

@@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="year != null "> and es.year = #{year}</if>
             <if test="examineeType != null "> and es.examineeType = #{examineeType}</if>
             <if test="universityCode != null  and universityCode != ''"> and u.`code` = #{universityCode}</if>
+            <if test="majorGroup != null"> and es.`majorGroup` = #{majorGroup}</if>
             <choose>
                 <when test="majorCodes != null"> AND (m1.`id` IS NULL OR m1.`code` in <foreach item="o" collection="majorCodes" open="(" separator="," close=")">#{o}</foreach>)</when>
                 <when test="majorTypes != null"> AND (m1.`id` IS NULL OR m2.`code` in <foreach item="o" collection="majorTypes" open="(" separator="," close=")">#{o}</foreach>)</when>

+ 4 - 4
ie-system/src/main/resources/mapper/ie/AMarjorPlanMapper.xml

@@ -112,11 +112,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id in <foreach item="id" collection="array" open="(" separator="," close=")">#{id}</foreach>
     </select>
 
-    <select id="selectMajorCodesByIds" parameterType="String" resultType="String">
-        SELECT distinct m1.code majorCode
+    <select id="selectMajorCodesByIds" parameterType="String" resultMap="AMarjorPlanResult"> <!--  and m1.`exam_type` = p.examineeType -->
+        SELECT distinct p.majorGroup majorGroup, m1.code majorCode
         FROM `a_marjor_plan` p
-        JOIN `sy_major` m1 ON m1.`name` = p.`majorName` and m1.`exam_type` = p.examineeType
-        where p.id in <foreach item="id" collection="array" open="(" separator="," close=")">#{id}</foreach>
+        JOIN `sy_major` m1 ON m1.`name` = p.`majorName`
+        where p.year = #{year} and p.id in <foreach item="id" collection="ids" open="(" separator="," close=")">#{id}</foreach>
     </select>
         
     <insert id="insertAMarjorPlan" parameterType="AMarjorPlan" useGeneratedKeys="true" keyProperty="id">