|
@@ -1,8 +1,9 @@
|
|
|
package org.jeecg.modules.system.service.impl;
|
|
|
|
|
|
-import java.util.*;
|
|
|
-
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import io.netty.util.internal.StringUtil;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.constant.CacheConstant;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
@@ -19,10 +20,7 @@ import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-
|
|
|
-import io.netty.util.internal.StringUtil;
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
|
* <p>
|
|
@@ -261,6 +259,20 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
|
|
return baseMapper.getDepartByUsernameByOrg(username,orgCode);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<SysDepart> queryMyDeptList() {
|
|
|
+ LambdaQueryWrapper<SysDepart> query = new LambdaQueryWrapper<SysDepart>();
|
|
|
+ query.eq(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
|
|
+ query.eq(SysDepart::getOrgType, 2);
|
|
|
+ query.orderByAsc(SysDepart::getDepartOrder);
|
|
|
+
|
|
|
+ LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
|
|
+ SysDepart sysDepart= this.baseMapper.selectById(sysUser.getOrgCode());
|
|
|
+ query.like(SysDepart::getOrgCode,sysDepart.getOrgCode());
|
|
|
+ List<SysDepart> list = this.list(query);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* <p>
|
|
|
* 根据关键字搜索相关的部门数据
|