Browse Source

卡列表增加翻译及增加分配限制属性

mingfu 1 month ago
parent
commit
d66bf6eb75

+ 10 - 4
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzCardsController.java

@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.ValidationException;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.enums.ExamType;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.dz.domain.DzAgent;
 import com.ruoyi.dz.service.IDzAgentService;
@@ -47,6 +48,7 @@ public class DzCardsController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('dz:cards:list')")
     @GetMapping("/list")
+    @ApiOperation("列表")
     public TableDataInfo list(DzCards dzCards)
     {
         startPage();
@@ -72,6 +74,7 @@ public class DzCardsController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('dz:cards:query')")
     @GetMapping(value = "/{cardId}")
+    @ApiOperation("详情")
     public AjaxResult getInfo(@PathVariable("cardId") Long cardId)
     {
         return success(dzCardsService.selectDzCardsByCardId(cardId));
@@ -122,7 +125,10 @@ public class DzCardsController extends BaseController
     @Log(title = "分配卡", businessType = BusinessType.INSERT)
     @PostMapping("/assignCard")
     @ApiOperation("分配卡")
-    public AjaxResult assignCard(@ApiParam("代理商") Long agentId, @ApiParam("开始号") String begin, @ApiParam("结束号") String end)
+    public AjaxResult assignCard(@ApiParam("代理商") Long agentId, @ApiParam("开始号") String begin, @ApiParam("结束号") String end,
+                                 @ApiParam("省份") @RequestParam(required = false) String location,
+                                 @ApiParam("考生类型") @RequestParam(required = false) ExamType examType,
+                                 @ApiParam("学校") @RequestParam(required = false) Long schoolId)
     {
         SysUser sysUser = SecurityUtils.getLoginUser().getUser();
         DzAgent agent = agentService.selectDzAgentByAgentId(agentId);
@@ -130,14 +136,14 @@ public class DzCardsController extends BaseController
             if (!sysUser.getUserTypeId().equals(agent.getParentId())) {
                 throw new ValidationException("只能分配给下级代理");
             }
-            dzCardsService.assignCard(sysUser.getUserTypeId(), agentId, begin, end);
+            dzCardsService.assignCard(sysUser.getUserTypeId(), agentId, begin, end, location, examType, schoolId);
         } else if(UserTypeEnum.Institution.equals(sysUser.getUserType())) { // 机构分配卡给自己的下级
             if (!sysUser.getDeptId().equals(agent.getDeptId())) {
                 throw new ValidationException("只能分配给下级代理");
             }
-            dzCardsService.assignCard(agentId, agentId, begin, end);
+            dzCardsService.assignCard(agentId, agentId, begin, end, location, examType, schoolId);
         } else { // 平台指定, TODO 暂只支持二级代理
-            dzCardsService.assignCard(agent.getParentId(), agentId, begin, end);
+            dzCardsService.assignCard(agent.getParentId(), agentId, begin, end, location, examType, schoolId);
         }
         return AjaxResult.success();
     }

+ 89 - 7
ie-system/src/main/java/com/ruoyi/dz/domain/DzCards.java

@@ -62,12 +62,18 @@ public class DzCards extends BaseEntity
 
     /** 末级代理商ID */
     @Excel(name = "末级代理商ID")
-    private Long leftAgentId;
+    private Long leafAgentId;
 
     /** 安排校区 */
     @Excel(name = "安排校区")
     private Long campusId;
 
+    @Excel(name = "分配考生省份")
+    private String assignLocation;
+
+    @Excel(name = "分配考生类型")
+    private String assignExamType;
+
     /** 分配学校 */
     @Excel(name = "分配学校")
     private Long assignSchoolId;
@@ -132,6 +138,18 @@ public class DzCards extends BaseEntity
     @Excel(name = "关卡时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date closeTime;
 
+    private String deptName;
+    /** 代理商 */
+    private String agentName;
+    /** 安排校区 */
+    private String campusName;
+    /** 分配学校 */
+    private String assignSchoolName;
+    /** 校区名称 */
+    private String schoolName;
+    /** 校区班级ID */
+    private String className;
+
     public void setCardId(Long cardId) 
     {
         this.cardId = cardId;
@@ -182,7 +200,15 @@ public class DzCards extends BaseEntity
         return status;
     }
 
-    public void setDistributeStatus(Integer distributeStatus) 
+    public String getAssignLocation() {
+        return assignLocation;
+    }
+
+    public void setAssignLocation(String assignLocation) {
+        this.assignLocation = assignLocation;
+    }
+
+    public void setDistributeStatus(Integer distributeStatus)
     {
         this.distributeStatus = distributeStatus;
     }
@@ -242,14 +268,14 @@ public class DzCards extends BaseEntity
         return agentId;
     }
 
-    public void setLeftAgentId(Long leftAgentId) 
+    public void setLeafAgentId(Long leftAgentId)
     {
-        this.leftAgentId = leftAgentId;
+        this.leafAgentId = leafAgentId;
     }
 
-    public Long getLeftAgentId() 
+    public Long getLeafAgentId()
     {
-        return leftAgentId;
+        return leafAgentId;
     }
 
     public void setCampusId(Long campusId) 
@@ -402,6 +428,62 @@ public class DzCards extends BaseEntity
         return closeTime;
     }
 
+    public String getAssignExamType() {
+        return assignExamType;
+    }
+
+    public void setAssignExamType(String assignExamType) {
+        this.assignExamType = assignExamType;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public String getAgentName() {
+        return agentName;
+    }
+
+    public void setAgentName(String agentName) {
+        this.agentName = agentName;
+    }
+
+    public String getCampusName() {
+        return campusName;
+    }
+
+    public void setCampusName(String campusName) {
+        this.campusName = campusName;
+    }
+
+    public String getAssignSchoolName() {
+        return assignSchoolName;
+    }
+
+    public void setAssignSchoolName(String assignSchoolName) {
+        this.assignSchoolName = assignSchoolName;
+    }
+
+    public String getSchoolName() {
+        return schoolName;
+    }
+
+    public void setSchoolName(String schoolName) {
+        this.schoolName = schoolName;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -416,7 +498,7 @@ public class DzCards extends BaseEntity
             .append("isSettlement", getIsSettlement())
             .append("deptId", getDeptId())
             .append("agentId", getAgentId())
-            .append("leftAgentId", getLeftAgentId())
+            .append("leafAgentId", getLeafAgentId())
             .append("campusId", getCampusId())
             .append("assignSchoolId", getAssignSchoolId())
             .append("schoolId", getSchoolId())

+ 4 - 0
ie-system/src/main/java/com/ruoyi/dz/mapper/DzAgentMapper.java

@@ -1,7 +1,9 @@
 package com.ruoyi.dz.mapper;
 
+import java.util.Collection;
 import java.util.List;
 import com.ruoyi.dz.domain.DzAgent;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 机构代理Mapper接口
@@ -11,6 +13,8 @@ import com.ruoyi.dz.domain.DzAgent;
  */
 public interface DzAgentMapper 
 {
+    public List<DzAgent> selectDzAgentByAgentIds(@Param("ids")Collection<Long> ids);
+
     /**
      * 查询机构代理
      * 

+ 2 - 0
ie-system/src/main/java/com/ruoyi/dz/mapper/DzClassesMapper.java

@@ -1,5 +1,6 @@
 package com.ruoyi.dz.mapper;
 
+import java.util.Collection;
 import java.util.List;
 import com.ruoyi.dz.domain.DzClasses;
 import org.apache.ibatis.annotations.Param;
@@ -12,6 +13,7 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface DzClassesMapper 
 {
+    public List<DzClasses> selectClassesByIds(@Param("ids") Collection<Long> ids);
     public List<DzClasses> selectClassesForTeacher(@Param("teacherId") Long teacherId);
 
     /**

+ 3 - 1
ie-system/src/main/java/com/ruoyi/dz/mapper/DzSchoolMapper.java

@@ -1,7 +1,9 @@
 package com.ruoyi.dz.mapper;
 
+import java.util.Collection;
 import java.util.List;
 import com.ruoyi.dz.domain.DzSchool;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 机构校区Mapper接口
@@ -26,7 +28,7 @@ public interface DzSchoolMapper
      * @return 机构校区集合
      */
     public List<DzSchool> selectDzSchoolList(DzSchool dzSchool);
-    public List<DzSchool> selectDzSchoolListByIds(List<Long> schoolIds);
+    public List<DzSchool> selectDzSchoolListByIds(@Param("ids") Collection<Long> ids);
     /**
      * 新增机构校区
      *

+ 3 - 1
ie-system/src/main/java/com/ruoyi/dz/service/IDzCardsService.java

@@ -1,6 +1,8 @@
 package com.ruoyi.dz.service;
 
 import java.util.List;
+
+import com.ruoyi.common.enums.ExamType;
 import com.ruoyi.dz.domain.DzCards;
 import com.ruoyi.enums.CardAction;
 import com.ruoyi.enums.CardType;
@@ -78,7 +80,7 @@ public interface IDzCardsService
      * @param beginNo
      * @param endNo
      */
-    public void assignCard(Long agentId, Long leafAgentId, String beginNo, String endNo);
+    public void assignCard(Long agentId, Long leafAgentId, String beginNo, String endNo, String location, ExamType examType, Long schoolId);
 
     /**
      * 开卡

+ 68 - 12
ie-system/src/main/java/com/ruoyi/dz/service/impl/DzCardsServiceImpl.java

@@ -1,25 +1,26 @@
 package com.ruoyi.dz.service.impl;
 
-import java.util.Date;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 import cn.hutool.core.util.RandomUtil;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.enums.ExamType;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.criteria.CardCriteria;
-import com.ruoyi.dz.domain.DzAgent;
-import com.ruoyi.dz.domain.DzCardsOpen;
-import com.ruoyi.dz.mapper.DzAgentMapper;
-import com.ruoyi.dz.mapper.DzCardsOpenMapper;
+import com.ruoyi.dz.domain.*;
+import com.ruoyi.dz.mapper.*;
 import com.ruoyi.enums.*;
+import com.ruoyi.system.mapper.SysDeptMapper;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.ruoyi.dz.mapper.DzCardsMapper;
-import com.ruoyi.dz.domain.DzCards;
 import com.ruoyi.dz.service.IDzCardsService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -40,6 +41,12 @@ public class DzCardsServiceImpl implements IDzCardsService
     private DzCardsOpenMapper dzCardsOpenMapper;
     @Autowired
     private DzAgentMapper dzAgentMapper;
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
+    @Autowired
+    private DzSchoolMapper dzSchoolMapper;
+    @Autowired
+    private DzClassesMapper dzClassesMapper;
 
     private final String format = "%d%08d";
 
@@ -64,6 +71,52 @@ public class DzCardsServiceImpl implements IDzCardsService
         return list.size() != 1 ? null : list.get(0);
     }
 
+    private List<DzCards> fillNames(List<DzCards> list) {
+        Set<Long> classIdSet = Sets.newHashSet();
+        Set<Long> schoolIdSet = Sets.newHashSet();
+        Set<Long> deptIdSet = Sets.newHashSet();
+        Set<Long> agentIdSet = Sets.newHashSet();
+        for(DzCards c : list) {
+            if(null != c.getClassId()) {
+                classIdSet.add(c.getClassId());
+            }
+            if(null != c.getAssignSchoolId()) {
+                schoolIdSet.add(c.getAssignSchoolId());
+            }
+            if(null != c.getSchoolId()) {
+                schoolIdSet.add(c.getSchoolId());
+            }
+            if(null != c.getCampusId()) {
+                schoolIdSet.add(c.getCampusId());
+            }
+            if(null != c.getDeptId()) {
+                deptIdSet.add(c.getDeptId());
+            }
+            if(null != c.getLeafAgentId()) {
+                agentIdSet.add(c.getLeafAgentId());
+            }
+            if(null != c.getAgentId()) {
+                agentIdSet.add(c.getAgentId());
+            }
+        }
+        Map<Long, String> deptMap = !deptIdSet.isEmpty() ? sysDeptMapper.selectDeptByIds(deptIdSet).stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName)) : Maps.newHashMap();
+        Map<Long, String> schoolMap = !schoolIdSet.isEmpty() ? dzSchoolMapper.selectDzSchoolListByIds(schoolIdSet).stream().collect(Collectors.toMap(DzSchool::getId, DzSchool::getName)) : Maps.newHashMap();;
+        Map<Long, String> agentMap = !agentIdSet.isEmpty() ? dzAgentMapper.selectDzAgentByAgentIds(agentIdSet).stream().collect(Collectors.toMap(DzAgent::getAgentId, DzAgent::getName)) : Maps.newHashMap();
+        Map<Long, String> classesMap = !classIdSet.isEmpty() ? dzClassesMapper.selectClassesByIds(classIdSet).stream().collect(Collectors.toMap(DzClasses::getClassId, DzClasses::getName)) : Maps.newHashMap();
+        for(DzCards c : list) {
+            c.setClassName(classesMap.get(c.getClassId()));
+            c.setAssignSchoolName(schoolMap.get(c.getAssignSchoolId()));
+            c.setSchoolName(schoolMap.get(c.getSchoolId()));
+            c.setCampusName(schoolMap.get(c.getCampusId()));
+            c.setDeptName(deptMap.get(c.getDeptId()));
+            if(null != c.getAgentId()) {
+                String name = agentMap.get(c.getAgentId());
+                c.setAgentName(null != c.getLeafAgentId() && !c.getLeafAgentId().equals(c.getAgentId()) ? agentMap.get(c.getLeafAgentId()) + "(" + name + ")" : name);
+            }
+        }
+        return list;
+    }
+
     /**
      * 查询学习卡列表
      * 
@@ -73,7 +126,7 @@ public class DzCardsServiceImpl implements IDzCardsService
     @Override
     public List<DzCards> selectDzCardsList(DzCards dzCards)
     {
-        return dzCardsMapper.selectDzCardsList(dzCards);
+        return fillNames(dzCardsMapper.selectDzCardsList(dzCards));
     }
 
     /**
@@ -150,7 +203,7 @@ public class DzCardsServiceImpl implements IDzCardsService
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void assignCard(Long agentId, Long leafAgentId, String beginNo, String endNo) {
+    public void assignCard(Long agentId, Long leafAgentId, String beginNo, String endNo, String location, ExamType examType, Long schoolId) {
         CardCriteria cond = new CardCriteria();
         cond.setStartNo(beginNo);
         cond.setEndNo(endNo);
@@ -161,8 +214,11 @@ public class DzCardsServiceImpl implements IDzCardsService
                 throw new ValidationException("卡分配错误");
             }
             dzCards.setAgentId(agentId);
-            dzCards.setLeftAgentId(leafAgentId);
+            dzCards.setLeafAgentId(leafAgentId);
             dzCards.setDistributeTime(DateUtils.getNowDate());
+            dzCards.setAssignLocation(location);
+            dzCards.setAssignExamType(null != examType ? examType.name() : null);
+            dzCards.setAssignSchoolId(schoolId);
             dzCardsMapper.updateDzCards(dzCards);
         });
     }

+ 3 - 0
ie-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.mapper;
 
+import java.util.Collection;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 import com.ruoyi.common.core.domain.entity.SysDept;
@@ -11,6 +12,8 @@ import com.ruoyi.common.core.domain.entity.SysDept;
  */
 public interface SysDeptMapper
 {
+    public List<SysDept> selectDeptByIds(@Param("ids") Collection<Long> ids);
+
     /**
      * 查询机构管理数据
      * 

+ 5 - 0
ie-system/src/main/resources/mapper/dz/DzAgentMapper.xml

@@ -53,6 +53,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where t1.agent_id = #{agentId}
     </select>
 
+    <select id="selectDzAgentByAgentIds" resultMap="DzAgentResult">
+        <include refid="selectDzAgentVo"/>
+        where t1.agent_id in <foreach collection="ids" item="id" open="(" separator="," close=")">#{id}</foreach>
+    </select>
+
     <insert id="insertDzAgent" parameterType="DzAgent" useGeneratedKeys="true" keyProperty="agentId">
         insert into dz_agent
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 16 - 10
ie-system/src/main/resources/mapper/dz/DzCardsMapper.xml

@@ -16,8 +16,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isSettlement"    column="is_settlement"    />
         <result property="deptId"    column="dept_id"    />
         <result property="agentId"    column="agent_id"    />
-        <result property="leftAgentId"    column="left_agent_id"    />
+        <result property="leafAgentId"    column="leaf_agent_id"    />
         <result property="campusId"    column="campus_id"    />
+        <result property="assignLocation"    column="assign_location"    />
+        <result property="assignExamType"    column="assign_exam_type"    />
         <result property="assignSchoolId"    column="assign_school_id"    />
         <result property="schoolId"    column="school_id"    />
         <result property="classId"    column="class_id"    />
@@ -38,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectDzCardsVo">
-        select card_id, card_no, password, type, status, distribute_status, time_status, pay_status, is_settlement, dept_id, agent_id, left_agent_id, campus_id, assign_school_id, school_id, class_id, year, end_year, open_id, remark, distribute_time, out_date, open_time, pay_time, active_time, settlement_time, refund_time, close_time, create_time, update_time from dz_cards
+        select card_id, card_no, password, type, status, distribute_status, time_status, pay_status, is_settlement, dept_id, agent_id, leaf_agent_id, campus_id, assign_location,assign_exam_type,assign_school_id, school_id, class_id, year, end_year, open_id, remark, distribute_time, out_date, open_time, pay_time, active_time, settlement_time, refund_time, close_time, create_time, update_time from dz_cards
     </sql>
 
     <select id="selectDzCardsList" parameterType="DzCards" resultMap="DzCardsResult">
@@ -54,8 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isSettlement != null "> and is_settlement = #{isSettlement}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="agentId != null "> and agent_id = #{agentId}</if>
-            <if test="leftAgentId != null "> and left_agent_id = #{leftAgentId}</if>
+            <if test="leafAgentId != null "> and leaf_agent_id = #{leafAgentId}</if>
             <if test="campusId != null "> and campus_id = #{campusId}</if>
+            <if test="assignLocation != null "> and assign_location = #{assignLocation}</if>
+            <if test="assignExamType != null "> and assign_exam_type = #{assignExamType}</if>
             <if test="assignSchoolId != null "> and assign_school_id = #{assignSchoolId}</if>
             <if test="schoolId != null "> and school_id = #{schoolId}</if>
             <if test="classId != null "> and class_id = #{classId}</if>
@@ -91,9 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isSettlement != null">is_settlement,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="agentId != null">agent_id,</if>
-            <if test="leftAgentId != null">left_agent_id,</if>
+            <if test="leafAgentId != null">leaf_agent_id,</if>
             <if test="campusId != null">campus_id,</if>
-            <if test="assignSchoolId != null">assign_school_id,</if>
+            assign_location,assign_exam_type,assign_school_id,
             <if test="schoolId != null">school_id,</if>
             <if test="classId != null">class_id,</if>
             <if test="year != null">year,</if>
@@ -122,9 +126,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isSettlement != null">#{isSettlement},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="agentId != null">#{agentId},</if>
-            <if test="leftAgentId != null">#{leftAgentId},</if>
+            <if test="leafAgentId != null">#{leafAgentId},</if>
             <if test="campusId != null">#{campusId},</if>
-            <if test="assignSchoolId != null">#{assignSchoolId},</if>
+            #{assignLocation},#{assignExamType},#{assignSchoolId},
             <if test="schoolId != null">#{schoolId},</if>
             <if test="classId != null">#{classId},</if>
             <if test="year != null">#{year},</if>
@@ -157,9 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isSettlement != null">is_settlement = #{isSettlement},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="agentId != null">agent_id = #{agentId},</if>
-            <if test="leftAgentId != null">left_agent_id = #{leftAgentId},</if>
+            <if test="leafAgentId != null">leaf_agent_id = #{leafAgentId},</if>
             <if test="campusId != null">campus_id = #{campusId},</if>
-            <if test="assignSchoolId != null">assign_school_id = #{assignSchoolId},</if>
+            assign_location = #{assignLocation},assign_exam_type = #{assignExamType},assign_school_id = #{assignSchoolId},
             <if test="schoolId != null">school_id = #{schoolId},</if>
             <if test="classId != null">class_id = #{classId},</if>
             <if test="year != null">year = #{year},</if>
@@ -207,8 +211,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isSettlement != null "> and is_settlement = #{isSettlement}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="agentId != null "> and agent_id = #{agentId}</if>
-            <if test="leftAgentId != null "> and left_agent_id = #{leftAgentId}</if>
+            <if test="leafAgentId != null "> and leaf_agent_id = #{leafAgentId}</if>
             <if test="campusId != null "> and campus_id = #{campusId}</if>
+            <if test="assignLocation != null "> and assign_location = #{assignLocation}</if>
+            <if test="assignExamType != null "> and assign_exam_type = #{assignExamType}</if>
             <if test="assignSchoolId != null "> and assign_school_id = #{assignSchoolId}</if>
             <if test="schoolId != null "> and school_id = #{schoolId}</if>
             <if test="classId != null "> and class_id = #{classId}</if>

+ 5 - 0
ie-system/src/main/resources/mapper/dz/DzClassesMapper.xml

@@ -52,6 +52,11 @@
         WHERE tc.`teacher_id` = #{teacherId} AND NOW() &lt; tc.`out_date`
     </select>
 
+    <select id="selectClassesByIds" resultMap="DzClassesResult">
+        <include refid="selectDzClassesVo"/>
+        where t1.class_id in <foreach collection="ids" item="id" open="(" separator="," close=")">#{id}</foreach>
+    </select>
+
     <select id="selectDzClassesByClassId" parameterType="Long" resultMap="DzClassesResult">
         <include refid="selectDzClassesVo"/>
         where t1.class_id = #{classId}

+ 2 - 2
ie-system/src/main/resources/mapper/dz/DzSchoolMapper.xml

@@ -52,11 +52,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
-    <select id="selectDzSchoolListByIds" parameterType="list" resultMap="DzSchoolResult">
+    <select id="selectDzSchoolListByIds" resultMap="DzSchoolResult">
         <include refid="selectDzSchoolVo"/>
         WHERE 1=1
         AND t1.id IN
-        <foreach collection="list" item="id" open="(" separator="," close=")">
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
             #{id}
         </foreach>
         ORDER BY t1.id ASC

+ 6 - 0
ie-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -64,6 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		from sys_dept d
 		where d.dept_id = #{deptId}
 	</select>
+
+	<select id="selectDeptByIds" resultMap="SysDeptResult">
+		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status
+		from sys_dept d
+		where d.dept_id in <foreach collection="ids" item="id" open="(" separator="," close=")">#{id}</foreach>
+	</select>
     
     <select id="checkDeptExistUser" parameterType="Long" resultType="int">
 		select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'