[修改] 获取当前人领导
This commit is contained in:
@@ -4,10 +4,8 @@ import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.excel.poi.excel.ExcelImportUtil;
|
||||
import com.adc.da.excel.poi.excel.entity.ImportParams;
|
||||
import com.adc.da.sys.constant.SysConstants;
|
||||
import com.adc.da.sys.dao.mysql.UserOrgEODao;
|
||||
import com.adc.da.sys.entity.OrgEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.entity.UserOrgEO;
|
||||
import com.adc.da.sys.service.iservice.IUserEoService;
|
||||
import com.adc.da.sys.util.EncryptUtil;
|
||||
import com.adc.da.sys.util.RSAUtil;
|
||||
@@ -17,7 +15,6 @@ import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import com.adc.da.util.utils.FileUtil;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
@@ -26,7 +23,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -40,7 +36,6 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -53,9 +48,6 @@ public class UserEOController extends BaseController<UserEO> {
|
||||
@Resource
|
||||
private IUserEoService userEOService;
|
||||
|
||||
@Autowired
|
||||
private UserOrgEODao userOrgEODao;
|
||||
|
||||
@Value("${isPassEncrypted}")
|
||||
private boolean isPassEncrypted;
|
||||
|
||||
@@ -121,22 +113,7 @@ public class UserEOController extends BaseController<UserEO> {
|
||||
|
||||
|
||||
userEOService.save(eo);
|
||||
//保存部门
|
||||
LambdaQueryWrapper<UserOrgEO> userOrgEOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
userOrgEOLambdaQueryWrapper.eq(UserOrgEO::getUserId,eo.getUsid());
|
||||
userOrgEODao.delete(userOrgEOLambdaQueryWrapper);
|
||||
String orgId = eo.getOrgId();
|
||||
if (StringUtils.isNotEmpty(orgId)){
|
||||
String[] split = orgId.split(",");
|
||||
List<UserOrgEO> userOrgEOS = new ArrayList<>();
|
||||
for (String s : split) {
|
||||
UserOrgEO userOrgEO = new UserOrgEO();
|
||||
userOrgEO.setUserId(eo.getUsid());
|
||||
userOrgEO.setOrgId(s);
|
||||
userOrgEOS.add(userOrgEO);
|
||||
}
|
||||
userOrgEODao.insertBatch(userOrgEOS);
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@@ -245,7 +222,7 @@ public class UserEOController extends BaseController<UserEO> {
|
||||
@ApiOperation(value = "查询自己领导")
|
||||
@GetMapping("getOwnLeader")
|
||||
public ResponseMessage getOwnLeader(String userId){
|
||||
UserEO userEoById = userEOService.getUserEoById(userId);
|
||||
UserVO userEoById = userEOService.getUserEoById(userId);
|
||||
List<OrgEO> orgEOList = userEoById.getOrgEOList();
|
||||
List<UserEO> leaderList = userEOService.getOwnLeader(orgEOList);
|
||||
return Result.success(leaderList);
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface UserEODao extends BaseMapper<UserEO> {
|
||||
|
||||
List<Map<String, Object>> allList( @Param("account") String account, @Param("roleName") String roleName);
|
||||
|
||||
UserEO getUserEoById(@Param("usid") String usid);
|
||||
UserVO getUserEoById(@Param("usid") String usid);
|
||||
|
||||
UserEO selectUserByIdNodel(String userId);
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ public class UserEOServiceImpl implements IUserEoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserEO getUserEoById(String usid) {
|
||||
UserEO userEO = dao.getUserEoById(usid);
|
||||
public UserVO getUserEoById(String usid) {
|
||||
UserVO userEO = dao.getUserEoById(usid);
|
||||
return userEO;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface IUserEoService {
|
||||
|
||||
UserEO getUserById(String usid);
|
||||
|
||||
UserEO getUserEoById(String usid);
|
||||
UserVO getUserEoById(String usid);
|
||||
|
||||
List<UserVO> getUserByIdList(List<String> userIdList);
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getUserEoById" resultType="com.adc.da.sys.entity.UserEO">
|
||||
<select id="getUserEoById" resultMap="UserDetailMap">
|
||||
select
|
||||
users.usid,
|
||||
users.usname,
|
||||
@@ -201,9 +201,9 @@
|
||||
o.bmdm_14 as o_bmdm14
|
||||
from TS_USER users
|
||||
left join TR_USER_ROLE ur on users.usid = ur.user_id
|
||||
left join TS_ROLE r on ur.role_id = r.id
|
||||
left join TS_ROLE r on ur.role_id = r.id and r.del_flag = 0
|
||||
left join TR_USER_ORG uo on users.usid = uo.user_id
|
||||
left join TS_ORG o on uo.org_id = o.org_code
|
||||
left join TS_ORG o on uo.org_id = o.org_code and o.status = 1
|
||||
where users.del_flag != 1
|
||||
and users.usid=#{usid}
|
||||
</select>
|
||||
@@ -262,7 +262,7 @@
|
||||
<where>
|
||||
uo.org_id in
|
||||
<foreach collection="Vo" item="item" open="(" separator="," close=")">
|
||||
#{item.Id}
|
||||
#{item.id}
|
||||
</foreach>
|
||||
and (u.level_id=5 or u.level_id=9) and u.employee_type_id = 1
|
||||
</where>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -184,7 +184,7 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getUserEoById" resultType="com.adc.da.sys.entity.UserEO">
|
||||
<select id="getUserEoById" resultMap="UserDetailMap">
|
||||
select
|
||||
users.usid,
|
||||
users.usname,
|
||||
@@ -201,9 +201,9 @@
|
||||
o.bmdm_14 as o_bmdm14
|
||||
from TS_USER users
|
||||
left join TR_USER_ROLE ur on users.usid = ur.user_id
|
||||
left join TS_ROLE r on ur.role_id = r.id
|
||||
left join TS_ROLE r on ur.role_id = r.id and r.del_flag = 0
|
||||
left join TR_USER_ORG uo on users.usid = uo.user_id
|
||||
left join TS_ORG o on uo.org_id = o.org_code
|
||||
left join TS_ORG o on uo.org_id = o.org_code and o.status = 1
|
||||
where users.del_flag != 1
|
||||
and users.usid=#{usid}
|
||||
</select>
|
||||
@@ -262,7 +262,7 @@
|
||||
<where>
|
||||
uo.org_id in
|
||||
<foreach collection="Vo" item="item" open="(" separator="," close=")">
|
||||
#{item.Id}
|
||||
#{item.id}
|
||||
</foreach>
|
||||
and (u.level_id=5 or u.level_id=9) and u.employee_type_id = 1
|
||||
</where>
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user