Merge remote-tracking branch 'origin/lixuetao' into lixuetao
This commit is contained in:
@@ -3,8 +3,6 @@ package com.adc.da.sys.controller;
|
||||
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.excel.poi.excel.entity.result.ExcelImportResult;
|
||||
import com.adc.da.excel.poi.excel.entity.result.ExcelVerifyHanlderErrorResult;
|
||||
import com.adc.da.sys.constant.SysConstants;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.iservice.IUserEoService;
|
||||
@@ -12,7 +10,6 @@ import com.adc.da.sys.util.EncryptUtil;
|
||||
import com.adc.da.sys.util.RSAUtil;
|
||||
import com.adc.da.sys.vo.UserImportVO;
|
||||
import com.adc.da.sys.vo.UserVO;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import com.adc.da.util.utils.FileUtil;
|
||||
@@ -25,31 +22,22 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.aspectj.weaver.tools.cache.SimpleCacheFactory.path;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/sys/user")
|
||||
@Api(tags = {"Sys-用户管理"})
|
||||
|
||||
@@ -33,6 +33,7 @@ public interface UserEODao extends BaseMapper<UserEO> {
|
||||
|
||||
List<UserVO> getUserByIdList(@Param("userIdList") List<String> userIdList);
|
||||
|
||||
List<UserVO> getUserByIdListNodel(@Param("userIdList") List<String> userIdList);
|
||||
// 根据account获取未逻辑删除的UserEO
|
||||
UserEO getUserEOByAccountNotDeleted(String account);
|
||||
|
||||
@@ -41,4 +42,6 @@ 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);
|
||||
|
||||
UserEO selectUserByIdNodel(String userId);
|
||||
}
|
||||
|
||||
@@ -144,6 +144,11 @@ public class UserEOServiceImpl implements IUserEoService {
|
||||
return dao.getUserByIdList(userIdList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserVO> getUserByIdListNodel(List<String> userIdList){
|
||||
return dao.getUserByIdListNodel(userIdList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> list(int pageNo, int pageSize, String account, String roleName) {
|
||||
IPage page = new Page();
|
||||
@@ -271,6 +276,11 @@ public class UserEOServiceImpl implements IUserEoService {
|
||||
return dao.allList(account,roleName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserEO getUserByIdNodel(String userId) {
|
||||
return dao.selectUserByIdNodel(userId);
|
||||
}
|
||||
|
||||
void checkExcel(List<UserImportVO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
throw new AdcDaBaseException("数据不能为空");
|
||||
|
||||
@@ -43,6 +43,14 @@ public interface IUserEoService {
|
||||
|
||||
List<UserVO> getUserByIdList(List<String> userIdList);
|
||||
|
||||
/**
|
||||
* 不考虑 删除的情况
|
||||
* 因流程中 人员被删除,但是审批历史中人要 回显正确
|
||||
* @param userIdList
|
||||
* @return
|
||||
*/
|
||||
List<UserVO> getUserByIdListNodel(List<String> userIdList);
|
||||
|
||||
IPage<Map<String, Object>> list(int pageNo, int pageSize, String account, String roleName);
|
||||
|
||||
void delete(String ids);
|
||||
@@ -56,5 +64,11 @@ public interface IUserEoService {
|
||||
public void importExcelUser(List<UserImportVO> list);
|
||||
|
||||
List<Map<String, Object>> allList(String account, String roleName);
|
||||
|
||||
/**
|
||||
* 不考虑 删除的情况
|
||||
* 因流程中 人员被删除,但是审批历史中人要 回显正确
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
UserEO getUserByIdNodel(String userId);
|
||||
}
|
||||
|
||||
@@ -186,6 +186,55 @@
|
||||
where users.del_flag != 1
|
||||
and users.usid=#{usid}
|
||||
</select>
|
||||
<select id="selectUserByIdNodel" resultType="com.adc.da.sys.entity.UserEO">
|
||||
select
|
||||
users.usid,
|
||||
users.usname,
|
||||
users.account,
|
||||
r.id as r_id,
|
||||
r.data_scope as r_data_scope,
|
||||
r.del_flag as r_delFlag,
|
||||
r.is_default as r_is_default,
|
||||
r.name as r_name,
|
||||
o.id as o_id,
|
||||
o.org_code as o_org_code,
|
||||
o.org_name as o_org_name,
|
||||
o.sup_org_code as o_sup_org_code,
|
||||
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 TR_USER_ORG uo on users.usid = uo.user_id
|
||||
left join TS_ORG o on uo.org_id = o.id
|
||||
where users.usid=#{usid}
|
||||
</select>
|
||||
|
||||
<select id="getUserByIdListNodel" resultType="com.adc.da.sys.vo.UserVO">
|
||||
|
||||
select
|
||||
users.usid,
|
||||
users.usname,
|
||||
users.account,
|
||||
r.id as r_id,
|
||||
r.data_scope as r_data_scope,
|
||||
r.del_flag as r_delFlag,
|
||||
r.is_default as r_is_default,
|
||||
r.name as r_name,
|
||||
o.id as o_id,
|
||||
o.org_code as o_org_code,
|
||||
o.org_name as o_org_name,
|
||||
o.sup_org_code as o_sup_org_code,
|
||||
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 TR_USER_ORG uo on users.usid = uo.user_id
|
||||
left join TS_ORG o on uo.org_id = o.id
|
||||
where users.usid in
|
||||
<foreach collection="userIdList" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user