Просмотр исходного кода

权限问题、测试问题修改

liujh лет назад: 3
Родитель
Сommit
14d8dec70b

+ 1 - 1
zd-common/zd-common-core/src/main/java/com/zd/common/core/domain/per/PerPrefix.java

@@ -572,7 +572,7 @@ public class PerPrefix {
     /**
      * 气瓶资格管理
      */
-    public static final String AIRBOTTLE_QUALIFICATIONAPPLYMANAGE = "airbottle:qualificationApplyManage:";
+    public static final String AIRBOTTLE_QUALIFICATIONAPPLYMANAGE = "airbottle:qualificationApplyManage:";//资格申请
     public static final String AIRBOTTLE_QUALIFICATIONMANAGE = "airbottle:qualificationManage:";//资格管理
     public static final String AIRBOTTLE_QUALIFICATIONAUDITMANAGE = "airbottle:qualificationAuditManage:";//资格审核
 

+ 6 - 9
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/controller/QpQualificationApplyManageController.java

@@ -1,5 +1,6 @@
 package com.zd.airbottle.controller;
 
+import com.zd.airbottle.domain.QpFlowDetail;
 import com.zd.airbottle.domain.QpQualificationApply;
 import com.zd.airbottle.domain.QpQualificationApplyRecord;
 import com.zd.airbottle.domain.vo.QpAirGoodsConfigRelationVo;
@@ -186,20 +187,16 @@ public class QpQualificationApplyManageController extends BaseController
             audit=true;
         }
 
-        /*//待审核或者驳回
-        if(0 == qpQualificationApply.getLeadAuditStatus() || 2 == qpQualificationApply.getLeadAuditStatus()){
+        //待审核或者驳回
+       /* if(0 == qpQualificationApply.getLeadAuditStatus() || 2 == qpQualificationApply.getLeadAuditStatus()){
             if(sysUser.getUserId().equals(qpQualificationApply.getAdminId()) ) {
                 audit=true;
             }
-        } */
+        } else */
             if(1 == qpQualificationApply.getLeadAuditStatus()){
             //查询登录用户是否有实验中心审核资格
-            QpFlowDetailVO qpFlowDetail = new QpFlowDetailVO();
-            //qpFlowDetail.setUserType(2L);//1实验室 2实验中心
-            qpFlowDetail.setUserId(sysUser.getUserId());//登录人id
-            //qpFlowDetail.setFlowType(1);//资格申请
-            List<QpFlowDetailVO> flowDetailList = qpFlowDetailService.selectQpFlowDetailList(qpFlowDetail);
-            if(flowDetailList.size()>0){
+            QpFlowDetail flowDetail = qpFlowDetailService.selectZgCenterByUserIdIs(sysUser.getUserId());
+            if(flowDetail!=null){
                 audit=true;
             }
         }

+ 7 - 17
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/controller/QpUsegasApplyManageController.java

@@ -1,6 +1,7 @@
 package com.zd.airbottle.controller;
 
 import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.zd.airbottle.domain.QpFlowDetail;
 import com.zd.airbottle.domain.QpUsegasApply;
 import com.zd.airbottle.domain.QpUsegasAuditRecord;
 import com.zd.airbottle.domain.vo.QpFlowDetailVO;
@@ -165,28 +166,17 @@ public class QpUsegasApplyManageController extends BaseController
         //判断当前的登录用户是否该实验室负责人
         if(sysUser.getUserId().equals(qpUsegasApply.getAdminId()) ) {
             isAdmin=true;
+            audit=true;
         }
-        if(0 == qpUsegasApply.getLeadAuditStaus() || 2 == qpUsegasApply.getLeadAuditStaus()){
-                /*//查询是否有审核资格
-                QpFlowDetailVO qpFlowDetail = new QpFlowDetailVO();
-                qpFlowDetail.setUserType(1L);//1实验室 2实验中心
-                qpFlowDetail.setUserIds(sysUser.getUserId());//登录人id
-                qpFlowDetail.setFlowType(2);//用气申请
-                List<QpFlowDetailVO> flowDetailList = qpFlowDetailService.selectQpFlowDetailList(qpFlowDetail);
-                if(flowDetailList.size()>0){
-                    audit=true;
-                }*/
+        /*if(0 == qpUsegasApply.getLeadAuditStaus() || 2 == qpUsegasApply.getLeadAuditStaus()){
             if(sysUser.getUserId().equals(qpUsegasApply.getAdminId()) ) {
                 audit=true;
             }
-        }else if(1 == qpUsegasApply.getLeadAuditStaus()){
+        }else */
+        if(1 == qpUsegasApply.getLeadAuditStaus()){
             //查询登录用户是否有实验中心审核资格
-            QpFlowDetailVO qpFlowDetail = new QpFlowDetailVO();
-            //qpFlowDetail.setUserType(2L);//1实验室 2实验中心
-            qpFlowDetail.setUserId(sysUser.getUserId());//登录人id
-            //qpFlowDetail.setFlowType(2);//用气申请
-            List<QpFlowDetailVO> flowDetailList = qpFlowDetailService.selectQpFlowDetailList(qpFlowDetail);
-            if(flowDetailList.size()>0){
+            QpFlowDetail flowDetail = qpFlowDetailService.selectYqCenterByUserIdIs(sysUser.getUserId());
+            if(flowDetail!=null){
                 audit=true;
             }
         }

+ 16 - 21
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/LabNotifyplan.java

@@ -67,12 +67,12 @@ public class LabNotifyplan extends BaseEntity
     /** 发布人id */
     @Excel(name = "发布人id")
     @ApiModelProperty(value = "发布人id")
-    private Long createUserid;
+    private Long userId;
     /** 发布人姓名 */
     @Excel(name = "发布人姓名")
     @Length(message = "发布人姓名长度不能超过50")
     @ApiModelProperty(value = "发布人姓名")
-    private String createUsername;
+    private String createBy;
     /** 修改人id */
     @Excel(name = "修改人id")
     @ApiModelProperty(value = "修改人id")
@@ -163,24 +163,19 @@ public class LabNotifyplan extends BaseEntity
     {
         return status;
     }
-    public void setCreateUserid(Long createUserid)
-    {
-        this.createUserid = createUserid;
-    }
 
-    public Long getCreateUserid()
-    {
-        return createUserid;
-    }
-    public void setCreateUsername(String createUsername)
-    {
-        this.createUsername = createUsername;
-    }
+    @Override
+    public Long getUserId() {        return userId;    }
+
+    @Override
+    public void setUserId(Long userId) {        this.userId = userId;    }
+
+    @Override
+    public String getCreateBy() {        return createBy;    }
+
+    @Override
+    public void setCreateBy(String createBy) {        this.createBy = createBy;    }
 
-    public String getCreateUsername()
-    {
-        return createUsername;
-    }
     public void setUpdateUserid(Long updateUserid)
     {
         this.updateUserid = updateUserid;
@@ -215,12 +210,12 @@ public class LabNotifyplan extends BaseEntity
                 .append("company", getCompany())
                 .append("conAbstract", getConAbstract())
                 .append("status", getStatus())
-                .append("createUserid", getCreateUserid())
-                .append("createUsername", getCreateUsername())
+                .append("userId", getUserId())
+                .append("createBy", getCreateBy())
                 .append("createTime", getCreateTime())
                 .append("updateUserid", getUpdateUserid())
                 .append("updateUsername", getUpdateUsername())
                 .append("updateTime", getUpdateTime())
                 .toString();
     }
-}
+}

+ 5 - 15
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabNotifyplanServiceImpl.java

@@ -138,7 +138,7 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
      * @return
      */
     @Override
-    @DataScope(deptAlias = "t" , permi = PerPrefix.LABORATORY_NOTIFYPLAN)
+    @DataScope(deptAlias = "d" , userAlias = "u", permi = PerPrefix.LABORATORY_NOTIFYPLAN)
     public List<LabNotifyplanVO> selectLabNotifyplanListVO(LabNotifyplanVO labNotifyplan, HttpServletRequest request) {
         List<LabNotifyplanVO> list =labNotifyplanMapper.selectLabNotifyplanListVO(labNotifyplan);
         InputStream intstream =null;
@@ -215,7 +215,7 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
      * @return
      */
     @Override
-    @DataScope(deptAlias = "t" , permi = PerPrefix.LABORATORY_WORKNOTIFYPLAN)
+    @DataScope(deptAlias = "d" ,userAlias = "u", permi = PerPrefix.LABORATORY_WORKNOTIFYPLAN)
     public List<LabNotifyplanVO> selectLabWorkNotifyplanListVO(LabNotifyplanVO labNotifyplan, HttpServletRequest request) {
         List<LabNotifyplanVO> list =labNotifyplanMapper.selectLabNotifyplanListVO(labNotifyplan);
         InputStream intstream =null;
@@ -296,11 +296,11 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
     {
         //添加创建人
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
-        labNotifyplan.setCreateUserid(sysUser.getUserId());
-        labNotifyplan.setCreateUsername(sysUser.getNickName());
+        labNotifyplan.setUserId(sysUser.getUserId());
+        labNotifyplan.setCreateBy(sysUser.getNickName());
         labNotifyplan.setCreateTime(new Date());
         labNotifyplan.setDeptId(sysUser.getDeptId());
-        labNotifyplan.setDeptName(sysUser.getDeptName());
+        labNotifyplan.setDeptName(sysUser.getDept().getDeptName());
 
         InputStream intstream=null;
         try {
@@ -415,17 +415,7 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
                             List<LabNotifyplanExcelVO> excelList = util.importExcel(intstream);
                             list.get(0).setExcelList(excelList);
                             intstream.close();
-
-                            //list.get(0).setContent(excelList.get(0).getContent());
-                            //list.get(0).setCompany(excelList.get(0).getCompany());
-
-                            //String ss = sdf.format(Date.parse(excelList.get(0).getCreateDate()));
-                            /*Date date = (Date) sdf.parse("Sat Jan 01 10:20:00 CST 2022");
-                            String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);*/
-                            //System.out.println(DateUtils.dateTime("YYYY-mm-dd HH:mm",excelList.get(0).getCreateDate()));
-                            //list.get(0).setCreateTime(formatStr);
                         }
-
             }
         } catch (IOException e) {
             //e.printStackTrace();

+ 56 - 54
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabNotifyplanMapper.xml

@@ -17,8 +17,8 @@
         <result property="status"    column="status"    />
         <result property="deptId"    column="dept_id"    />
         <result property="deptName"    column="dept_name"    />
-        <result property="createUserid"    column="create_userid"    />
-        <result property="createUsername"    column="create_username"    />
+        <result property="userId"    column="user_id"    />
+        <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateUserid"    column="update_userid"    />
         <result property="updateUsername"    column="update_username"    />
@@ -38,8 +38,8 @@
         <result property="status"    column="status"    />
         <result property="deptId"    column="dept_id"    />
         <result property="deptName"    column="dept_name"    />
-        <result property="createUserid"    column="create_userid"    />
-        <result property="createUsername"    column="create_username"    />
+        <result property="userId"    column="user_id"    />
+        <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateUserid"    column="update_userid"    />
         <result property="updateUsername"    column="update_username"    />
@@ -48,73 +48,75 @@
 
     <sql id="selectLabNotifyplanVo">
         select id, title, notify_type, type, content_name, content_url, content, company,con_abstract,
-               status,dept_id,dept_name, create_userid, user_id,create_username,
-               create_time, update_userid, update_username, update_time, DATE_FORMAT(create_time,'%Y-%m-%d %H:%i') time from
-               (select t.*,t.create_userid user_id from lab_notifyplan t) t
+               status,dept_id,dept_name, user_id,create_by,
+               create_time, update_userid, update_username, update_time, DATE_FORMAT(create_time,'%Y-%m-%d %H:%i') time
+        from lab_notifyplan t
     </sql>
     <sql id="selectLabNotifyplanListVo">
         select t.id, t.title, t.notify_type, t.type, t.content_name, t.content_url, t.content,
-               t.company,t.con_abstract, t.status,t.dept_id,t.dept_name, t.create_userid,user_id,
-               t.create_username, t.create_time, t.update_userid, t.update_username, t.update_time ,DATE_FORMAT(t.create_time,'%Y-%m-%d %H:%i') time
-        from  (select t.*,t.create_userid user_id from lab_notifyplan t) as t
+               t.company,t.con_abstract, t.status,t.dept_id,t.dept_name, t.user_id,
+               t.create_by, t.create_time, t.update_userid, t.update_username, t.update_time ,DATE_FORMAT(t.create_time,'%Y-%m-%d %H:%i') time
+        from  lab_notifyplan  t
+        left join   sys_dept d on   t.dept_id=d.dept_id
+        left join   sys_user u on  t.user_id=u.user_id
     </sql>
     <select id="selectLabNotifyplanList" parameterType="com.zd.laboratory.domain.LabNotifyplan" resultMap="LabNotifyplanResult">
         <include refid="selectLabNotifyplanVo"/>
         <where>
-            <if test="title != null  and title != ''"> and title  like concat('%', #{title}, '%')</if>
-            <if test="notifyType != null "> and notify_type = #{notifyType}</if>
-            <if test="type != null "> and type = #{type}</if>
-            <if test="contentName != null  and contentName != ''"> and content_name like concat('%', #{contentName}, '%')</if>
-            <if test="contentUrl != null  and contentUrl != ''"> and content_url = #{contentUrl}</if>
-            <if test="content != null  and content != ''"> and content = #{content}</if>
-            <if test="company != null  and company != ''"> and company = #{company}</if>
-            <if test="conAbstract != null  and conAbstract != ''"> and con_abstract = #{conAbstract}</if>
-            <if test="status != null "> and status = #{status}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="deptName != null "> and dept_name = #{deptName}</if>
-            <if test="createUserid != null "> and create_userid = #{createUserid}</if>
-            <if test="createUsername != null  and createUsername != ''"> and create_username like concat('%', #{createUsername}, '%')</if>
-            <if test="updateUserid != null "> and update_userid = #{updateUserid}</if>
-            <if test="updateUsername != null  and updateUsername != ''"> and update_username like concat('%', #{updateUsername}, '%')</if>
+            <if test="title != null  and title != ''"> and t.title  like concat('%', #{title}, '%')</if>
+            <if test="notifyType != null "> and t.notify_type = #{notifyType}</if>
+            <if test="type != null "> and t.type = #{type}</if>
+            <if test="contentName != null  and contentName != ''"> and t.content_name like concat('%', #{contentName}, '%')</if>
+            <if test="contentUrl != null  and contentUrl != ''"> and t.content_url = #{contentUrl}</if>
+            <if test="content != null  and content != ''"> and t.content = #{content}</if>
+            <if test="company != null  and company != ''"> and t.company = #{company}</if>
+            <if test="conAbstract != null  and conAbstract != ''"> and t.con_abstract = #{conAbstract}</if>
+            <if test="status != null "> and t.status = #{status}</if>
+            <if test="deptId != null "> and t.dept_id = #{deptId}</if>
+            <if test="deptName != null "> and t.dept_name = #{deptName}</if>
+            <if test="userId != null "> and t.user_id = #{userId}</if>
+            <if test="createBy != null  and createBy != ''"> and t.create_by like concat('%', #{createBy}, '%')</if>
+            <if test="updateUserid != null "> and t.update_userid = #{updateUserid}</if>
+            <if test="updateUsername != null  and updateUsername != ''"> and t.update_username like concat('%', #{updateUsername}, '%')</if>
         </where>
-        order by create_time desc
+        order by t.create_time desc
     </select>
 
     <select id="selectLabNotifyplanListVO" parameterType="com.zd.laboratory.domain.vo.LabNotifyplanVO" resultMap="LabNotifyplanResultVO">
-        <include refid="selectLabNotifyplanVo"/>
+        <include refid="selectLabNotifyplanListVo"/>
         <where>
-            <if test="title != null  and title != ''"> and title  like concat('%', #{title}, '%')</if>
-            <if test="notifyType != null "> and notify_type = #{notifyType}</if>
-            <if test="type != null "> and type = #{type}</if>
-            <if test="contentName != null  and contentName != ''"> and content_name like concat('%', #{contentName}, '%')</if>
-            <if test="contentUrl != null  and contentUrl != ''"> and content_url = #{contentUrl}</if>
-            <if test="content != null  and content != ''"> and content = #{content}</if>
-            <if test="company != null  and company != ''"> and company  like concat('%', #{company}, '%')</if>
-            <if test="conAbstract != null  and conAbstract != ''"> and con_abstract  like concat('%', #{conAbstract}, '%')</if>
-            <if test="status != null "> and status = #{status}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="deptName != null "> and dept_name = #{deptName}</if>
-            <if test="createUserid != null "> and create_userid = #{createUserid}</if>
-            <if test="createUsername != null  and createUsername != ''"> and create_username like concat('%', #{createUsername}, '%')</if>
-            <if test="updateUserid != null "> and update_userid = #{updateUserid}</if>
-            <if test="updateUsername != null  and updateUsername != ''"> and update_username like concat('%', #{updateUsername}, '%')</if>
+            <if test="title != null  and title != ''"> and t.title  like concat('%', #{title}, '%')</if>
+            <if test="notifyType != null "> and t.notify_type = #{notifyType}</if>
+            <if test="type != null "> and t.type = #{type}</if>
+            <if test="contentName != null  and contentName != ''"> and t.content_name like concat('%', #{contentName}, '%')</if>
+            <if test="contentUrl != null  and contentUrl != ''"> and t.content_url = #{contentUrl}</if>
+            <if test="content != null  and content != ''"> and t.content = #{content}</if>
+            <if test="company != null  and company != ''"> and t.company  like concat('%', #{company}, '%')</if>
+            <if test="conAbstract != null  and conAbstract != ''"> and t.con_abstract  like concat('%', #{conAbstract}, '%')</if>
+            <if test="status != null "> and t.status = #{status}</if>
+            <if test="deptId != null "> and t.dept_id = #{deptId}</if>
+            <if test="deptName != null "> and t.dept_name = #{deptName}</if>
+            <if test="userId != null "> and t.user_id = #{userId}</if>
+            <if test="createBy != null  and createBy != ''"> and t.create_by like concat('%', #{createBy}, '%')</if>
+            <if test="updateUserid != null "> and t.update_userid = #{updateUserid}</if>
+            <if test="updateUsername != null  and updateUsername != ''"> and t.update_username like concat('%', #{updateUsername}, '%')</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
-                and str_to_date(date_format(create_time,'%Y-%m-%d'),'%Y-%m-%d') &gt;= str_to_date(#{beginTime},'%Y-%m-%d')
+                and str_to_date(t.date_format(create_time,'%Y-%m-%d'),'%Y-%m-%d') &gt;= str_to_date(#{beginTime},'%Y-%m-%d')
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-                and str_to_date(date_format(create_time,'%Y-%m-%d'),'%Y-%m-%d') &lt;= str_to_date(#{endTime},'%Y-%m-%d')
+                and str_to_date(t.date_format(create_time,'%Y-%m-%d'),'%Y-%m-%d') &lt;= str_to_date(#{endTime},'%Y-%m-%d')
             </if>
             <if test="searchValue != null and searchValue != ''">
                 and (
-                title like concat('%', #{searchValue}, '%') or
-                company like concat('%', #{searchValue}, '%') or
-                create_username like concat('%', #{searchValue}, '%')
+                t.title like concat('%', #{searchValue}, '%') or
+                t.company like concat('%', #{searchValue}, '%') or
+                t.create_by like concat('%', #{searchValue}, '%')
                 )
             </if>
             <!-- 数据范围过滤  -->
             ${params.dataScope}
         </where>
-        order by create_time desc
+        order by t.create_time desc
     </select>
 
     <select id="selectLabNotifyplanById"  resultMap="LabNotifyplanResultVO">
@@ -147,9 +149,9 @@
 
             <if test="deptName != null">dept_name,</if>
 
-            <if test="createUserid != null">create_userid,</if>
+            <if test="userId != null">user_id,</if>
 
-            <if test="createUsername != null">create_username,</if>
+            <if test="createBy != null">create_by,</if>
 
             <if test="createTime != null">create_time,</if>
 
@@ -172,8 +174,8 @@
             <if test="status != null">#{status},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="deptName != null">#{deptName},</if>
-            <if test="createUserid != null">#{createUserid},</if>
-            <if test="createUsername != null">#{createUsername},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateUserid != null">#{updateUserid},</if>
             <if test="updateUsername != null">#{updateUsername},</if>
@@ -195,8 +197,8 @@
             <if test="status != null">status = #{status},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptName != null">dept_name = #{deptName},</if>
-            <if test="createUserid != null">create_userid = #{createUserid},</if>
-            <if test="createUsername != null">create_username = #{createUsername},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateUserid != null">update_userid = #{updateUserid},</if>
             <if test="updateUsername != null">update_username = #{updateUsername},</if>

+ 23 - 4
zd-modules/zd-modules-system/src/main/java/com/zd/system/controller/SysUserController.java

@@ -11,9 +11,9 @@ import com.zd.common.core.domain.per.PerFun;
 import com.zd.common.core.domain.per.PerPrefix;
 import com.zd.common.core.utils.file.ImageUtils;
 import com.zd.common.security.utils.DictUtils;
+import com.zd.system.api.RemoteDeptService;
 import com.zd.system.api.RemoteFileService;
-import com.zd.system.api.domain.SelectUserVO;
-import com.zd.system.api.domain.SysFile;
+import com.zd.system.api.domain.*;
 import com.zd.system.api.laboratory.RemoteSubQueryService;
 import com.zd.system.api.model.SimpleUserVO;
 import com.zd.system.domain.SysLogoConfig;
@@ -39,8 +39,6 @@ import com.zd.common.log.annotation.Log;
 import com.zd.common.log.enums.BusinessType;
 import com.zd.common.security.annotation.InnerAuth;
 import com.zd.common.security.annotation.PreAuthorize;
-import com.zd.system.api.domain.SysRole;
-import com.zd.system.api.domain.SysUser;
 import com.zd.system.api.model.LoginUser;
 
 /**
@@ -75,6 +73,8 @@ public class SysUserController extends BaseController {
     private RemoteFileService remoteFileService;
     @Autowired
     private ISysLogoConfigService sysLogoConfigService;
+    @Autowired
+    private ISysDeptService deptService;
 
 
     /**
@@ -550,6 +550,25 @@ public class SysUserController extends BaseController {
     public List<SysUser> selectUserListByNotWhite(String nickName) {
         if(StrUtil.isBlank(nickName)) return Collections.EMPTY_LIST;
         SysUser user = new SysUser();
+
+        //获取当前登录用户信息
+        Long userId = SecurityUtils.getUserId();
+        SysUser sysUser = userService.selectUserById(userId);
+
+        /*SysDept sysDept = deptService.selectDeptById(sysUser.getDept().getDeptId());
+        Long deptId =null;
+        //查询登录用户所属的院校
+        if("0".equals(sysDept.getAncestors())){
+            deptId=sysDept.getDeptId();
+        }else{
+            deptId=Long.valueOf(sysDept.getAncestors().split(",")[1]);
+        }
+        List<SysDept> deptList = deptService.selectChildrenDeptListById(deptId);
+        List<Long> postIds= new ArrayList<>();
+        for (int i=0;i<deptList.size();i++){
+            postIds.add(deptList.get(i).getDeptId()) ;
+        }*/
+
         user.setUserType("11");//用户身份 11教职工 22学生
         user.setNickName(nickName);
         List<SysUser> list = userService.selectUserListByNotWhite(user);

+ 2 - 0
zd-modules/zd-modules-system/src/main/java/com/zd/system/service/ISysDeptService.java

@@ -152,4 +152,6 @@ public interface ISysDeptService {
     Map<String, Object> queryDeptSignByUserId(Long userId);
 
     List<SysDept> selectDeptListByCollege(SysDept sysDept);
+
+    List<SysDept> selectChildrenDeptListById(Long deptId);
 }

+ 5 - 0
zd-modules/zd-modules-system/src/main/java/com/zd/system/service/impl/SysDeptServiceImpl.java

@@ -437,6 +437,11 @@ public class SysDeptServiceImpl implements ISysDeptService {
         return deptMapper.selectDeptListByCollege(dept);
     }
 
+    @Override
+    public List<SysDept> selectChildrenDeptListById(Long deptId) {
+        return deptMapper.selectChildrenDeptListById(deptId);
+    }
+
     /**
      * 递归列表
      */

+ 1 - 1
zd-modules/zd-modules-system/src/main/java/com/zd/system/service/impl/SysUserServiceImpl.java

@@ -1068,7 +1068,7 @@ public class SysUserServiceImpl implements ISysUserService {
      * @return
      */
     @Override
-    @DataScope(deptAlias = "d", userAlias = "u")
+    //@DataScope(deptAlias = "d", userAlias = "u")
     public List<SysUser> selectUserListByNotWhite(SysUser sysUser) {
         return userMapper.selectUserListByNotWhite(sysUser);
     }

+ 5 - 1
zd-modules/zd-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -139,7 +139,7 @@
             AND u.user_type = #{userType}
         </if>
         <if test="userType == null or userType == ''">
-            AND u.user_type != '00'
+            AND u.user_type != '00' AND u.user_type != '33'
         </if>
         <if test="status != null and status != ''">
             AND u.status = #{status}
@@ -776,6 +776,10 @@
             AND u.user_id IN
             <foreach item="item" collection="ids" separator="," open="(" close=")" index="">'${item}'</foreach>
         </if>
+        <if test="ids!=null and ids.size > 0">
+            AND u.user_id IN
+            <foreach item="item" collection="ids" separator="," open="(" close=")" index="">'${item}'</foreach>
+        </if>
         <if test="major != null and major != ''">
             AND u.major like concat('%', #{major}, '%')
         </if>