diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildCheckinDetailController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildCheckinDetailController.java
index eba571fc8..9f712564e 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildCheckinDetailController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildCheckinDetailController.java
@@ -53,6 +53,14 @@ public class ByChildCheckinDetailController extends BaseController {
         if (byChildCheckinDetail.getCreateTime() == null) {
             byChildCheckinDetail.setCreateTime(new Date());
         }
+
+        byChildCheckinDetail.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
+        //判断是否为班主任
+        System.out.println(schoolCommon.getClassId());
+        if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
+            byChildCheckinDetail.setClassid(schoolCommon.getClassId());
+        }
+
         List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
         return getDataTable(list);
     }
diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java
index b40a4fbaa..eed49ed03 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java
@@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller;
 
 import java.util.List;
 
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.project.common.SchoolCommon;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
 public class ByChildContactpeopleController extends BaseController {
     @Autowired
     private IByChildContactpeopleService byChildContactpeopleService;
+    @Autowired
+    private SchoolCommon schoolCommon;
 
     /**
      * 查询幼儿紧急情况联系人列表
@@ -40,6 +44,12 @@ public class ByChildContactpeopleController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(ByChildContactpeople byChildContactpeople) {
         startPage();
+        byChildContactpeople.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
+        //判断是否为班主任
+        System.out.println(schoolCommon.getClassId());
+        if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
+            byChildContactpeople.setClassid(schoolCommon.getClassId());
+        }
         List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople);
         return getDataTable(list);
     }
diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java
index b9bf0c28a..a311d7eaa 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java
@@ -44,6 +44,12 @@ public class ByChildController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(ByChild byChild) {
         startPage();
+        byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
+        //判断是否为班主任
+        System.out.println(schoolCommon.getClassId());
+        if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
+            byChild.setClassid(schoolCommon.getClassId());
+        }
         List<ByChild> list = byChildService.selectByChildList(byChild);
         return getDataTable(list);
     }
@@ -54,6 +60,12 @@ public class ByChildController extends BaseController {
     @PreAuthorize("@ss.hasPermi('benyi:checkindetail:list')")
     @GetMapping("/listByCheck")
     public TableDataInfo listByCheck(ByChild byChild) {
+        byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
+        //判断是否为班主任
+        System.out.println(schoolCommon.getClassId());
+        if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
+            byChild.setClassid(schoolCommon.getClassId());
+        }
         List<ByChild> list = byChildService.selectByCheckList(byChild);
         return getDataTable(list);
     }
diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java
index df9fe532b..1146970b5 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java
@@ -25,6 +25,18 @@ public class ByChildContactpeople extends BaseEntity {
     @Excel(name = "幼儿id")
     private Long childid;
 
+    /**
+     * 学校id
+     */
+    @Excel(name = "学校id")
+    private Long schoolid;
+
+    /**
+     * 班级id
+     */
+    @Excel(name = "班级id")
+    private String classid;
+
     /**
      * 父亲姓名
      */
@@ -137,6 +149,22 @@ public class ByChildContactpeople extends BaseEntity {
         return childid;
     }
 
+    public void setSchoolid(Long schoolid) {
+        this.schoolid = schoolid;
+    }
+
+    public Long getSchoolid() {
+        return schoolid;
+    }
+
+    public void setClassid(String classid) {
+        this.classid = classid;
+    }
+
+    public String getClassid() {
+        return classid;
+    }
+
     public void setFathername(String fathername) {
         this.fathername = fathername;
     }
@@ -270,6 +298,8 @@ public class ByChildContactpeople extends BaseEntity {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                 .append("id", getId())
                 .append("childid", getChildid())
+                .append("schoolid", getSchoolid())
+                .append("classid", getClassid())
                 .append("fathername", getFathername())
                 .append("fphone", getFphone())
                 .append("foffphone", getFoffphone())
diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml
index e311d116b..b577ea6c6 100644
--- a/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml
+++ b/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml
@@ -7,6 +7,8 @@
     <resultMap type="ByChildContactpeople" id="ByChildContactpeopleResult">
         <result property="id" column="id"/>
         <result property="childid" column="childid"/>
+        <result property="schoolid" column="schoolid"/>
+        <result property="classid" column="classid"/>
         <result property="fathername" column="fathername"/>
         <result property="fphone" column="fphone"/>
         <result property="foffphone" column="foffphone"/>
@@ -27,40 +29,42 @@
     </resultMap>
 
     <sql id="selectByChildContactpeopleVo">
-        select id, childid, fathername, fphone, foffphone, mothername, mphone, moffphone, grandfathername, gfgx, gfphone, gfoffphone, gfaddress, grandmothername, gmgx, gmphone, gmaddress, gmoffphone, create_time from by_child_contactpeople
+        select a.id, a.childid, a.fathername, a.fphone, a.foffphone, a.mothername, a.mphone, a.moffphone, a.grandfathername, a.gfgx, a.gfphone, a.gfoffphone, a.gfaddress, a.grandmothername, a.gmgx, a.gmphone, a.gmaddress, a.gmoffphone, a.create_time,b.schoolid, b.classid from by_child_contactpeople a left join by_child b on a.childid=b.id
     </sql>
 
     <select id="selectByChildContactpeopleList" parameterType="ByChildContactpeople"
             resultMap="ByChildContactpeopleResult">
         <include refid="selectByChildContactpeopleVo"/>
         <where>
-            <if test="childid != null ">and childid = #{childid}</if>
-            <if test="fathername != null  and fathername != ''">and fathername like concat('%', #{fathername}, '%')</if>
-            <if test="fphone != null  and fphone != ''">and fphone = #{fphone}</if>
-            <if test="foffphone != null  and foffphone != ''">and foffphone = #{foffphone}</if>
-            <if test="mothername != null  and mothername != ''">and mothername like concat('%', #{mothername}, '%')</if>
-            <if test="mphone != null  and mphone != ''">and mphone = #{mphone}</if>
-            <if test="moffphone != null  and moffphone != ''">and moffphone = #{moffphone}</if>
-            <if test="grandfathername != null  and grandfathername != ''">and grandfathername like concat('%',
+            <if test="childid != null ">and a.childid = #{childid}</if>
+            <if test="schoolid != null ">and b.schoolid = #{schoolid}</if>
+            <if test="classid != null  and classid != ''">and b.classid = #{classid}</if>
+            <if test="fathername != null  and fathername != ''">and a.fathername like concat('%', #{fathername}, '%')</if>
+            <if test="fphone != null  and fphone != ''">and a.fphone = #{fphone}</if>
+            <if test="foffphone != null  and foffphone != ''">and a.foffphone = #{foffphone}</if>
+            <if test="mothername != null  and mothername != ''">and a.mothername like concat('%', #{mothername}, '%')</if>
+            <if test="mphone != null  and mphone != ''">and a.mphone = #{mphone}</if>
+            <if test="moffphone != null  and moffphone != ''">and a.moffphone = #{moffphone}</if>
+            <if test="grandfathername != null  and grandfathername != ''">and a.grandfathername like concat('%',
                 #{grandfathername}, '%')
             </if>
-            <if test="gfgx != null  and gfgx != ''">and gfgx = #{gfgx}</if>
-            <if test="gfphone != null  and gfphone != ''">and gfphone = #{gfphone}</if>
-            <if test="gfoffphone != null  and gfoffphone != ''">and gfoffphone = #{gfoffphone}</if>
-            <if test="gfaddress != null  and gfaddress != ''">and gfaddress = #{gfaddress}</if>
-            <if test="grandmothername != null  and grandmothername != ''">and grandmothername like concat('%',
+            <if test="gfgx != null  and gfgx != ''">and a.gfgx = #{gfgx}</if>
+            <if test="gfphone != null  and gfphone != ''">and a.gfphone = #{gfphone}</if>
+            <if test="gfoffphone != null  and gfoffphone != ''">and a.gfoffphone = #{gfoffphone}</if>
+            <if test="gfaddress != null  and gfaddress != ''">and a.gfaddress = #{gfaddress}</if>
+            <if test="grandmothername != null  and grandmothername != ''">and a.grandmothername like concat('%',
                 #{grandmothername}, '%')
             </if>
-            <if test="gmgx != null  and gmgx != ''">and gmgx = #{gmgx}</if>
-            <if test="gmphone != null  and gmphone != ''">and gmphone = #{gmphone}</if>
-            <if test="gmaddress != null  and gmaddress != ''">and gmaddress = #{gmaddress}</if>
-            <if test="gmoffphone != null  and gmoffphone != ''">and gmoffphone = #{gmoffphone}</if>
+            <if test="gmgx != null  and gmgx != ''">and a.gmgx = #{gmgx}</if>
+            <if test="gmphone != null  and gmphone != ''">and a.gmphone = #{gmphone}</if>
+            <if test="gmaddress != null  and gmaddress != ''">and a.gmaddress = #{gmaddress}</if>
+            <if test="gmoffphone != null  and gmoffphone != ''">and a.gmoffphone = #{gmoffphone}</if>
         </where>
     </select>
 
     <select id="selectByChildContactpeopleById" parameterType="Long" resultMap="ByChildContactpeopleResult">
         <include refid="selectByChildContactpeopleVo"/>
-        where id = #{id}
+        where a.id = #{id}
     </select>
 
     <insert id="insertByChildContactpeople" parameterType="ByChildContactpeople">