|
|
@@ -118,7 +118,7 @@ public class SysUserController extends BaseController {
|
|
|
@GetMapping("/dictionlist")
|
|
|
public R<List<SysUser>> list2(SysUser user) {
|
|
|
try {
|
|
|
- if (ObjectUtil.isEmpty(user.getOrgId())){
|
|
|
+ if (ObjectUtil.isEmpty(user.getOrgId())) {
|
|
|
user.setOrgId(SecurityUtils.getLoginUser().getOrgId());
|
|
|
}
|
|
|
return R.ok(userService.selectSyncUserList(user));
|
|
|
@@ -127,6 +127,16 @@ public class SysUserController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // @RequiresPermissions("system:user:list")
|
|
|
+ @GetMapping("/userListData")
|
|
|
+ public R<List<SysUser>> userListData(SysUser user) {
|
|
|
+ if (ObjectUtil.isEmpty(user.getOrgId())) {
|
|
|
+ user.setOrgId(SecurityUtils.getLoginUser().getOrgId());
|
|
|
+ }
|
|
|
+ return R.ok(userService.selectUserListData(user));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取当前用户信息
|
|
|
@@ -182,7 +192,7 @@ public class SysUserController extends BaseController {
|
|
|
SysUser user = userService.selectUserById(SecurityUtils.getUserId());
|
|
|
SysOrg org = orgMapper.selectOne(new LambdaQueryWrapper<SysOrg>()
|
|
|
.eq(SysOrg::getId, user.getOrgId())
|
|
|
- .select(SysOrg::getType,SysOrg::getShortName));
|
|
|
+ .select(SysOrg::getType, SysOrg::getShortName));
|
|
|
if (ObjectUtil.isNotEmpty(org)) {
|
|
|
user.setOrgType(org.getType());
|
|
|
user.setOrgShortName(org.getShortName());
|
|
|
@@ -485,29 +495,29 @@ public class SysUserController extends BaseController {
|
|
|
@RequiresPermissions("system:user:export")
|
|
|
@PostMapping("/export")
|
|
|
public void export(SysUser user, HttpServletResponse response) {
|
|
|
- List<UserExport> list=null;
|
|
|
+ List<UserExport> list = null;
|
|
|
Set<String> excludeColumnFiledNames = new HashSet<String>();
|
|
|
|
|
|
//如果导出模板
|
|
|
- if(user.getTemplate()!=null&&user.getTemplate()){
|
|
|
+ if (user.getTemplate() != null && user.getTemplate()) {
|
|
|
excludeColumnFiledNames.add("lastIp");
|
|
|
excludeColumnFiledNames.add("lastTime");
|
|
|
list = new ArrayList<>();
|
|
|
- }else{
|
|
|
- list= userService.down(user);
|
|
|
+ } else {
|
|
|
+ list = userService.down(user);
|
|
|
if (ObjectUtil.isEmpty(list)) {
|
|
|
throw new RuntimeException("导出数据为空!");
|
|
|
}
|
|
|
- AtomicInteger xh= new AtomicInteger();
|
|
|
+ AtomicInteger xh = new AtomicInteger();
|
|
|
xh.getAndIncrement();
|
|
|
- list.forEach(e->{
|
|
|
- if (e.getIsManager()==null) {
|
|
|
+ list.forEach(e -> {
|
|
|
+ if (e.getIsManager() == null) {
|
|
|
e.setIsManager("N");
|
|
|
}
|
|
|
e.setXh(String.valueOf(xh.getAndIncrement()));
|
|
|
});
|
|
|
|
|
|
- if(list.size()>10000){
|
|
|
+ if (list.size() > 10000) {
|
|
|
throw new RuntimeException("导出数据量过大(单次导出限量10000条数据),请填写条件分批导出");
|
|
|
}
|
|
|
}
|
|
|
@@ -540,10 +550,10 @@ public class SysUserController extends BaseController {
|
|
|
}
|
|
|
list = list.stream().filter(e -> "Y".equals(e.getIsManager())).collect(Collectors.toList());
|
|
|
|
|
|
- AtomicInteger xh= new AtomicInteger();
|
|
|
+ AtomicInteger xh = new AtomicInteger();
|
|
|
xh.getAndIncrement();
|
|
|
- list.forEach(e->{
|
|
|
- if (e.getIsManager()==null) {
|
|
|
+ list.forEach(e -> {
|
|
|
+ if (e.getIsManager() == null) {
|
|
|
e.setIsManager("N");
|
|
|
}
|
|
|
e.setXh(String.valueOf(xh.getAndIncrement()));
|
|
|
@@ -583,7 +593,7 @@ public class SysUserController extends BaseController {
|
|
|
@Override
|
|
|
public void invoke(UserExport user, AnalysisContext analysisContext) {
|
|
|
// System.out.println("解析数据为:" + user.toString());
|
|
|
- if(user.getName()!=null) {
|
|
|
+ if (user.getName() != null) {
|
|
|
list.add(user);
|
|
|
}
|
|
|
}
|