|  | @@ -1,17 +1,29 @@
 | 
	
		
			
				|  |  |  package com.ozs.web.controller.system;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.io.InputStream;
 | 
	
		
			
				|  |  | +import java.util.ArrayList;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.Map;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
	
		
			
				|  |  | +import com.baomidou.mybatisplus.core.metadata.IPage;
 | 
	
		
			
				|  |  | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
	
		
			
				|  |  | +import com.ozs.common.core.domain.vo.SysUserVo;
 | 
	
		
			
				|  |  | +import com.ozs.common.utils.AppendUtils;
 | 
	
		
			
				|  |  |  import com.ozs.common.utils.file.FileUtils;
 | 
	
		
			
				|  |  | +import com.ozs.service.entity.BaseCameraManagement;
 | 
	
		
			
				|  |  | +import com.ozs.service.entity.BaseRailwayManagement;
 | 
	
		
			
				|  |  | +import com.ozs.service.entity.MsgAlarm;
 | 
	
		
			
				|  |  | +import com.ozs.service.entity.vo.MsgAlarmVo;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.ArrayUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  | +import org.springframework.util.ObjectUtils;
 | 
	
		
			
				|  |  |  import org.springframework.validation.annotation.Validated;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  import org.springframework.web.multipart.MultipartFile;
 | 
	
	
		
			
				|  | @@ -53,15 +65,56 @@ public class SysUserController extends BaseController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private ISysPostService postService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +//    /**
 | 
	
		
			
				|  |  | +//     * 获取用户列表
 | 
	
		
			
				|  |  | +//     */
 | 
	
		
			
				|  |  | +//    @PreAuthorize("@ss.hasPermi('system:user:list')")
 | 
	
		
			
				|  |  | +//    @PostMapping("/list")
 | 
	
		
			
				|  |  | +//    public TableDataInfo list(@RequestBody SysUser user) {
 | 
	
		
			
				|  |  | +//        startPage();
 | 
	
		
			
				|  |  | +//        List<SysUser> list = userService.selectUserList(user);
 | 
	
		
			
				|  |  | +//        return getDataTable(list);
 | 
	
		
			
				|  |  | +//    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 获取用户列表
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  | +     * @param sysUserVo
 | 
	
		
			
				|  |  | +     * @return
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('system:user:list')")
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "获取用户列表")
 | 
	
		
			
				|  |  |      @PostMapping("/list")
 | 
	
		
			
				|  |  | -    public TableDataInfo list(@RequestBody SysUser user) {
 | 
	
		
			
				|  |  | -        startPage();
 | 
	
		
			
				|  |  | -        List<SysUser> list = userService.selectUserList(user);
 | 
	
		
			
				|  |  | -        return getDataTable(list);
 | 
	
		
			
				|  |  | +    public AjaxResult list(@RequestBody SysUserVo sysUserVo) {
 | 
	
		
			
				|  |  | +        LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<SysUser>();
 | 
	
		
			
				|  |  | +        if (!ObjectUtils.isEmpty(sysUserVo.getUserName())) {
 | 
	
		
			
				|  |  | +            wrapper.like(SysUser::getUserName, sysUserVo.getUserName());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (!ObjectUtils.isEmpty(sysUserVo.getNickName())) {
 | 
	
		
			
				|  |  | +            wrapper.like(SysUser::getNickName, sysUserVo.getNickName());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (!ObjectUtils.isEmpty(sysUserVo.getPhoneNum())) {
 | 
	
		
			
				|  |  | +            wrapper.like(SysUser::getPhoneNum, sysUserVo.getPhoneNum());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (!ObjectUtils.isEmpty(sysUserVo.getDeptId())) {
 | 
	
		
			
				|  |  | +            wrapper.eq(SysUser::getDeptId, sysUserVo.getDeptId());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (!ObjectUtils.isEmpty(sysUserVo.getStatus())) {
 | 
	
		
			
				|  |  | +            wrapper.eq(SysUser::getStatus, sysUserVo.getStatus());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +       
 | 
	
		
			
				|  |  | +        IPage<SysUser> page = userService.page(new Page<>(sysUserVo.getPageNum(), sysUserVo.getPageSize()), wrapper);
 | 
	
		
			
				|  |  | +        if(!ObjectUtils.isEmpty(page) && !ObjectUtils.isEmpty(page.getRecords())){
 | 
	
		
			
				|  |  | +            List<SysUser> dto1 = page.getRecords().stream().map(o -> {
 | 
	
		
			
				|  |  | +                SysDept sysDept = deptService.selectDeptById(o.getDeptId());
 | 
	
		
			
				|  |  | +                if (!ObjectUtils.isEmpty(sysDept)) {
 | 
	
		
			
				|  |  | +                    o.setDeptName(sysDept.getDeptName());
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                return o;
 | 
	
		
			
				|  |  | +            }).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +            page.setRecords(dto1);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return AjaxResult.success(page);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Log(title = "用户管理", businessType = BusinessType.EXPORT)
 |