4 Commits 57bb96c1d7 ... 74449d3ecb

Autor SHA1 Nachricht Datum
  lijt 74449d3ecb Merge remote-tracking branch 'origin/master' vor 1 Jahr
  lijt f85e213d0d 业务类型bug修改 vor 1 Jahr
  lijt d9fa6a95b0 报告归档-关联发票,单个开票金额和总开票金额的一致 vor 1 Jahr
  lijt 9f644490df 签字注师2 需求更改 vor 1 Jahr

+ 5 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/invoice/service/CwFinanceInvoiceService.java

@@ -564,7 +564,11 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
                 queryWrapper.eq("fi.status","5"); // 发票申请流程已通过
                 queryWrapper.orderByDesc("fi.create_date");
                 queryWrapper.eq("fi.invalid_status","0"); // 未作废
-                return cwFinanceInvoiceMapper.getByIds(queryWrapper);
+                List<CwFinanceInvoiceDTO> list = cwFinanceInvoiceMapper.getByIds(queryWrapper);
+                for (int i = 0; i < list.size(); i++) {
+                    list.get(i).setAccountDetail(list.get(i).getFinanceInvoiceBaseDTOList().get(i).getAccount());
+                }
+                return list;
             }
         }
         return new ArrayList<>();

+ 7 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/mapper/CwProjectBusinessTypeMapper.java

@@ -12,6 +12,7 @@ import com.jeeplus.test.cw.workClientInfo.service.dto.CwManageLevelTypeDTO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @Mapper
@@ -24,6 +25,12 @@ public interface CwProjectBusinessTypeMapper extends BaseMapper<CwProjectBusines
     public List<CwProjectBusinessTypeDTO> getList();
 
     IPage<CwProjectBusinessTypeDTO> findList1(Page<CwProjectBusinessTypeDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwProjectBusinessType>wrapper);
+
+    //是否显示下边的子集修改
+    void updateIsShowByIds(@Param("ids") List<String> ids, @Param("isShow") String isShow);
+
+        //查询子集数据
+    List<CwProjectBusinessType> selectByParentIds(@Param("ids") List<String> ids);
 }
 
 

+ 20 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/mapper/xml/CwManageLevelTypeMapper.xml

@@ -36,6 +36,16 @@
         cw_pbt.is_show,
         cw_pbt.sort_mark
     </sql>
+    <update id="updateIsShowByIds" parameterType="java.util.List">
+        UPDATE cw_project_business_type
+        SET is_show = #{isShow}
+        WHERE id IN
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+
 
     <select id="findList" resultMap="BaseResultMap">
         select
@@ -86,4 +96,14 @@
         from cw_project_business_type cw_pbt
         ${ew.customSqlSegment}
     </select>
+    <select id="selectByParentIds"
+            resultType="com.jeeplus.test.cw.projectBusinessType.domain.CwProjectBusinessType">
+        SELECT *
+        FROM cw_project_business_type
+        WHERE parent_id IN
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+
+    </select>
 </mapper>

+ 24 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectBusinessType/service/CwProjectBusinessTypeService.java

@@ -2,6 +2,7 @@ package com.jeeplus.test.cw.projectBusinessType.service;
 
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -22,6 +23,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -75,6 +77,28 @@ public class CwProjectBusinessTypeService extends ServiceImpl<CwProjectBusinessT
             }
         }
         this.saveOrUpdate(cwProjectBusinessType);
+        //查询数据下边是否有子集
+        LambdaQueryWrapper<CwProjectBusinessType> cl2 = new LambdaQueryWrapper<>();
+        cl2.eq(CwProjectBusinessType::getParentId,cwProjectBusinessType.getId());
+        List<CwProjectBusinessType> cwProjectBusinessTypes = cwProjectBusinessTypeMapper.selectList(cl2);
+        ArrayList<String> list = new ArrayList<>();
+        if (ObjectUtil.isAllEmpty(cwProjectBusinessTypes)){
+            return ResponseEntity.ok("保存成功");
+        }else {
+            for (CwProjectBusinessType projectBusinessType : cwProjectBusinessTypes) {
+                list.add(projectBusinessType.getId());
+            }
+           List<CwProjectBusinessType>list1= cwProjectBusinessTypeMapper.selectByParentIds(list);
+            if (ObjectUtil.isAllEmpty(list1)){
+                cwProjectBusinessTypeMapper.updateIsShowByIds(list,cwProjectBusinessType.getIsShow());
+            }else {
+                for (CwProjectBusinessType projectBusinessType : list1) {
+                    list.add(projectBusinessType.getId());
+                }
+                cwProjectBusinessTypeMapper.updateIsShowByIds(list,cwProjectBusinessType.getIsShow());
+            }
+        }
+
         return ResponseEntity.ok("保存成功");
     }
 

+ 220 - 173
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -100,22 +100,22 @@ public class UserController {
     @GetMapping("queryById")
     @ApiOperation(value = "查询用户")
     public ResponseEntity queryById(@RequestParam("id") String id) {
-        UserDTO userDTO = userService.get ( id );
+        UserDTO userDTO = userService.get(id);
         if (ObjectUtil.isNotEmpty(userDTO) && StringUtils.isNotBlank(userDTO.getPhoto())) {
             String lsUrl = UserUtils.getLsUrl(userDTO.getPhoto());
             userDTO.setPhoto(lsUrl);
         }
-        if(StringUtils.isNotBlank(userDTO.getManageOfficeIds())){
+        if (StringUtils.isNotBlank(userDTO.getManageOfficeIds())) {
             //获取当前人管理的部门id
-            List<String> manageOfficeIdList=Arrays.asList(userDTO.getManageOfficeIds().split(","));
+            List<String> manageOfficeIdList = Arrays.asList(userDTO.getManageOfficeIds().split(","));
             //查询这些部门信息
             List<String> officeNameList = officeService.getOfficeNameByIds(manageOfficeIdList);
             userDTO.setManageOfficeNameList(officeNameList);
         }
-        if(ObjectUtil.isNotEmpty(userDTO)) {
-            if(CollectionUtil.isNotEmpty(userDTO.getCertDTOList())){
-                userDTO.getCertDTOList().stream().forEach(item->{
-                    if (StringUtils.isNotBlank(item.getFileUrl())){
+        if (ObjectUtil.isNotEmpty(userDTO)) {
+            if (CollectionUtil.isNotEmpty(userDTO.getCertDTOList())) {
+                userDTO.getCertDTOList().stream().forEach(item -> {
+                    if (StringUtils.isNotBlank(item.getFileUrl())) {
                         String fileTemporaryLookUrl = this.getFileTemporaryLookUrl(item.getFileUrl());
                         item.setFileLsUrl(fileTemporaryLookUrl);
                     }
@@ -123,19 +123,19 @@ public class UserController {
             }
         }
         //根据office.id 查询部门的所有父节点信息
-        if(null != userDTO.getOfficeDTO() && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())){
+        if (null != userDTO.getOfficeDTO() && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())) {
             OfficeDTO office = officeService.getOfficeById(userDTO.getOfficeDTO().getId());
             //将office的父节点信息进行分割并查询赋值
-            if(null != office){
+            if (null != office) {
                 List<String> officeIdList = Arrays.asList(office.getParentIds().split(","));
                 Integer sort = 0;
-                if(null != officeIdList && officeIdList.size()>0){
+                if (null != officeIdList && officeIdList.size() > 0) {
                     for (String officeId : officeIdList) {
-                        if(StringUtils.isNotBlank(officeId) && !"0".equals(officeId)){
-                            sort ++ ;
+                        if (StringUtils.isNotBlank(officeId) && !"0".equals(officeId)) {
+                            sort++;
                             OfficeDTO officeChild = officeService.getOfficeById(officeId);
-                            if(null != officeChild) {
-                                switch (sort){
+                            if (null != officeChild) {
+                                switch (sort) {
                                     case 1:
                                         userDTO.setCompanyDTO(officeChild);
                                         break;
@@ -153,7 +153,7 @@ public class UserController {
             }
 
         }
-        return ResponseEntity.ok ( userDTO );
+        return ResponseEntity.ok(userDTO);
     }
 
     /**
@@ -167,20 +167,20 @@ public class UserController {
     @ApiOperation(value = "用户数据列表")
     //@PreAuthorize("hasAuthority('sys:user:list')")
     @GetMapping("list")
-    public ResponseEntity list(UserDTO userDTO, Page <UserDTO> page) throws Exception {
-        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+    public ResponseEntity list(UserDTO userDTO, Page<UserDTO> page) throws Exception {
+        QueryWrapper<UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition(userDTO, UserDTO.class);
         // 管理员查询不限制
         if (!UserUtils.getCurrentUserDTO().isAdmin()) {
             queryWrapper.isNull("a.is_admin");
-            if (ObjectUtil.isNotEmpty(userDTO)){
+            if (ObjectUtil.isNotEmpty(userDTO)) {
                 if (ObjectUtil.isNotEmpty(userDTO.getCompanyDTO()) && ObjectUtil.isNotEmpty(userDTO.getOfficeDTO())) {
                     OfficeDTO officeDTO = UserUtils.getCurrentUserDTO().getOfficeDTO();
                     if (StringUtils.isNotBlank(userDTO.getCertType())) {
                         //获取当前登陆人是否事中审公司人员
-                        if(officeDTO.getParentIds().contains("1615171302381182978")){
+                        if (officeDTO.getParentIds().contains("1615171302381182978")) {
 
                         }
-                    }else{
+                    } else {
                         // 当不是精确的部门查询时,再添加下面的筛选条件
                         if ((StringUtils.isNotBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isBlank(userDTO.getOfficeDTO().getId()))
                                 || "true".equals(userDTO.getSelectAll())) {
@@ -193,13 +193,13 @@ public class UserController {
                             String[] split = ids.split(",");
                             // split.length大于2,说明当前登录人所属部门是普通部门,展示部分人员信息
                             // 否则,当前登录人所属公共类部门(忘了叫什么类部门了,就是总经办那种部门),展示全部人员信息
-                            if(split.length>2){
+                            if (split.length > 2) {
                                 companyId = split[2];
                                 // 根据公司id,找到此公司下的所有部门
                                 List<Office> officeList = officeService.list(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
                                 Set officeIdSet = new HashSet();
                                 for (Office office : officeList) {
-                                    if(StringUtils.isNotBlank(office.getId())){
+                                    if (StringUtils.isNotBlank(office.getId())) {
                                         officeIdSet.add(office.getId());
                                     }
                                 }
@@ -207,18 +207,18 @@ public class UserController {
                                 // 拿到这些部门的id
                                 //List<String> officeIdList = officeList.stream().distinct().map(Office::getId).collect(Collectors.toList());
                                 // 拿到所有公有部门的id
-                                List<String> officePublicIdList = officeService.list(new LambdaQueryWrapper<Office>().eq(Office::getIsPublic,"1")).stream().map(Office::getId).collect(Collectors.toList());
+                                List<String> officePublicIdList = officeService.list(new LambdaQueryWrapper<Office>().eq(Office::getIsPublic, "1")).stream().map(Office::getId).collect(Collectors.toList());
                                 // 拿到直属公司的id
                                 officeIdList.add(companyId);
                                 // 最后得到的所有部门的id
                                 officeIdList.addAll(officePublicIdList);
                                 List<String> lastIds = officeIdList.stream().distinct().collect(Collectors.toList());
                                 // 添加筛选条件为这些部门的id
-                                queryWrapper.in("a.office_id",lastIds);
+                                queryWrapper.in("a.office_id", lastIds);
                             }
-                        } else if(StringUtils.isBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())) {
+                        } else if (StringUtils.isBlank(userDTO.getCompanyDTO().getId()) && StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())) {
                             // officeDTO.id不是空,companyDTO.id是空的话,说明前端组件点击的部门查询
-                            queryWrapper.eq("a.office_id",userDTO.getOfficeDTO().getId());
+                            queryWrapper.eq("a.office_id", userDTO.getOfficeDTO().getId());
                         }
                     }
                 }
@@ -227,29 +227,71 @@ public class UserController {
         if (ObjectUtil.isNotEmpty(userDTO)) {
             // 当certType传值时,获取拥有此资格证类型的人员
             if (StringUtils.isNotBlank(userDTO.getCertType())) {
-                queryWrapper.eq("sc.type",userDTO.getCertType());
+                queryWrapper.eq("sc.type", userDTO.getCertType());
             }
-            if(StringUtils.isNotBlank(userDTO.getMobile())){
-                queryWrapper.like("a.mobile",userDTO.getMobile());
+            if (StringUtils.isNotBlank(userDTO.getMobile())) {
+                queryWrapper.like("a.mobile", userDTO.getMobile());
             }
         }
-        IPage <UserDTO> result = userService.findPage ( page, queryWrapper );
+        IPage<UserDTO> result = userService.findPage(page, queryWrapper);
         //判断 如果是签字注师筛选,则获取签字注师的被选择次数
-        if(StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())){
+        if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
             List<UserDTO> userList = result.getRecords();
             for (UserDTO info : userList) {
                 if("潘中".equals(info.getName()) || "张宁".equals(info.getName()) || "孙文宝".equals(info.getName())){
                     info.setAccountantUserFlag(0);
-                }else{
+                } else {
                     info.setAccountantUserFlag(1);
                 }
                 Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
                 info.setAccountantUserCount(accountantUserCount);
             }
         }
-        return ResponseEntity.ok ( result );
+        return ResponseEntity.ok(result);
+    }
+
+
+    @GetMapping("list2")
+    public ResponseEntity list2(UserDTO userDTO, Page<UserDTO> page) throws Exception {
+        if (ObjectUtil.isNotEmpty(userDTO.getOfficeDTO().getId())||ObjectUtil.isNotEmpty(userDTO.getLoginName())){
+            IPage<UserDTO> result = userService.findPage2(userDTO);
+            //判断 如果是签字注师筛选,则获取签字注师的被选择次数
+            if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
+                List<UserDTO> userList = result.getRecords();
+                for (UserDTO info : userList) {
+                    if ("潘中".equals(info.getName())) {
+                        info.setAccountantUserFlag(0);
+                    } else {
+                        info.setAccountantUserFlag(1);
+                    }
+                    Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
+                    info.setAccountantUserCount(accountantUserCount);
+                }
+            }
+            result.setTotal(result.getRecords().size());
+            return ResponseEntity.ok(result);
+
+        }else {
+            IPage<UserDTO> result = userService.findPage1(userDTO,page);
+            //判断 如果是签字注师筛选,则获取签字注师的被选择次数
+            if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
+                List<UserDTO> userList = result.getRecords();
+                for (UserDTO info : userList) {
+                    if ("潘中".equals(info.getName())) {
+                        info.setAccountantUserFlag(0);
+                    } else {
+                        info.setAccountantUserFlag(1);
+                    }
+                    Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
+                    info.setAccountantUserCount(accountantUserCount);
+                }
+            }
+            result.setTotal(result.getRecords().size());
+            return ResponseEntity.ok(result);
+        }
     }
 
+
     /**
      * 保存用户
      *
@@ -263,15 +305,15 @@ public class UserController {
     @PostMapping("save")
     public ResponseEntity save(@Valid @RequestBody UserDTO userDTO) throws Exception {
         // 如果新密码为空,则不更换密码
-        if ( StrUtil.isNotBlank ( userDTO.getNewPassword ( ) ) ) {
-            userDTO.setPassword ( SecurityUtils.encryptPassword ( userDTO.getNewPassword ( ) ) );
+        if (StrUtil.isNotBlank(userDTO.getNewPassword())) {
+            userDTO.setPassword(SecurityUtils.encryptPassword(userDTO.getNewPassword()));
         }
-        if ( isCheckLoginName ( userDTO.getOldLoginName ( ),userDTO.getId(), userDTO.getLoginName ( ) ) ) {
-            return ResponseEntity.badRequest ( ).body ( "保存用户'" + userDTO.getLoginName ( ) + "'失败,登录名已存在!" );
+        if (isCheckLoginName(userDTO.getOldLoginName(), userDTO.getId(), userDTO.getLoginName())) {
+            return ResponseEntity.badRequest().body("保存用户'" + userDTO.getLoginName() + "'失败,登录名已存在!");
         }
         // 保存用户信息
-        userService.saveOrUpdate ( userDTO );
-        return ResponseEntity.ok ( "保存用户'" + userDTO.getLoginName ( ) + "'成功!" );
+        userService.saveOrUpdate(userDTO);
+        return ResponseEntity.ok("保存用户'" + userDTO.getLoginName() + "'成功!");
     }
 
     /**
@@ -287,7 +329,7 @@ public class UserController {
     @PostMapping("saveCertList")
     public ResponseEntity saveCertList(@Valid @RequestBody UserDTO userDTO) {
         userService.saveCertList(userDTO);
-        return ResponseEntity.ok ( "保存成功!" );
+        return ResponseEntity.ok("保存成功!");
     }
 
 
@@ -304,11 +346,11 @@ public class UserController {
     public ResponseEntity saveInfo(@RequestBody UserDTO userDTO) throws Exception {
         //修改用户信息
         //判断参数中手机号是否存在
-        if(StringUtils.isNotBlank(userDTO.getMobile())){
+        if (StringUtils.isNotBlank(userDTO.getMobile())) {
             //如果手机号存在,则根据手机号查询除当前更改人以外是否还存在手机号重复的情况,如果存在,则不允许更改
             List<UserDTO> userList = userService.getUserInfoByMobile(userDTO);
-            if (null != userList && userList.size()>0){
-                return ResponseEntity.badRequest ( ).body ( "修改个人资料失败! 该手机号已存在,无法修改!" );
+            if (null != userList && userList.size() > 0) {
+                return ResponseEntity.badRequest().body("修改个人资料失败! 该手机号已存在,无法修改!");
             }
         }
         return userService.updateInfo(userDTO);
@@ -323,26 +365,26 @@ public class UserController {
     @PreAuthorize("hasAuthority('sys:user:del')")
     @DeleteMapping("delete")
     public ResponseEntity delete(String ids) {
-        String idArray[] = ids.split ( "," );
-        StringBuffer msg = new StringBuffer ( );
+        String idArray[] = ids.split(",");
+        StringBuffer msg = new StringBuffer();
         boolean success = true;
         for (String id : idArray) {
-            UserDTO userDTO = userService.get ( id );
-            if ( UserUtils.getCurrentUserDTO ( ).getId ( ).equals ( userDTO.getId ( ) ) ) {
+            UserDTO userDTO = userService.get(id);
+            if (UserUtils.getCurrentUserDTO().getId().equals(userDTO.getId())) {
                 success = false;
-                msg.append ( "[" + userDTO.getLoginName ( ) + "]删除失败,不允许删除当前用户!<br/>" );
-            } else if ( userDTO.isAdmin () ) {
+                msg.append("[" + userDTO.getLoginName() + "]删除失败,不允许删除当前用户!<br/>");
+            } else if (userDTO.isAdmin()) {
                 success = false;
-                msg.append ( "[" + userDTO.getLoginName ( ) + "]删除失败,不允许删除超级管理员!<br/>" );//删除用户失败, 不允许删除超级管理员用户
+                msg.append("[" + userDTO.getLoginName() + "]删除失败,不允许删除超级管理员!<br/>");//删除用户失败, 不允许删除超级管理员用户
             } else {
-                msg.append ( "[" + userDTO.getLoginName ( ) + "]删除成功!<br/>" );
-                userService.deleteUser ( userDTO );//删除用户成功
+                msg.append("[" + userDTO.getLoginName() + "]删除成功!<br/>");
+                userService.deleteUser(userDTO);//删除用户成功
             }
         }
-        if ( success ) {
-            return ResponseEntity.ok ( msg.toString ( ) );
+        if (success) {
+            return ResponseEntity.ok(msg.toString());
         } else {
-            return ResponseEntity.badRequest ( ).body ( msg.toString ( ) );
+            return ResponseEntity.badRequest().body(msg.toString());
         }
     }
 
@@ -358,22 +400,22 @@ public class UserController {
     @PreAuthorize("hasAnyAuthority('sys:user:export')")
     @GetMapping("export")
     @ApiOperation(value = "导出用户excel")
-    public void exportFile(UserDTO userDTO, Page <UserDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
-        String fileName = options.getFilename ( );
-        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
-        List <UserDTO> result;
-        if ( ExportMode.current.equals ( options.getMode ( ) ) ) {
-            result = userService.findPage ( page, queryWrapper ).getRecords ( );
-        } else if ( ExportMode.selected.equals ( options.getMode ( ) ) ) {
-            result = userService.findPage ( page, queryWrapper ).getRecords ( ).stream ( ).filter ( userDTO1 ->
-                    options.getSelectIds ( ).contains ( userDTO1.getId ( ) )
-            ).collect ( Collectors.toList ( ) );
+    public void exportFile(UserDTO userDTO, Page<UserDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        QueryWrapper<UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition(userDTO, UserDTO.class);
+        List<UserDTO> result;
+        if (ExportMode.current.equals(options.getMode())) {
+            result = userService.findPage(page, queryWrapper).getRecords();
+        } else if (ExportMode.selected.equals(options.getMode())) {
+            result = userService.findPage(page, queryWrapper).getRecords().stream().filter(userDTO1 ->
+                    options.getSelectIds().contains(userDTO1.getId())
+            ).collect(Collectors.toList());
         } else {
-            page.setSize ( -1 );
-            page.setCurrent ( 0 );
-            result = userService.findPage ( page, queryWrapper ).getRecords ( );
+            page.setSize(-1);
+            page.setCurrent(0);
+            result = userService.findPage(page, queryWrapper).getRecords();
         }
-        EasyPoiUtil.exportExcel ( result, "用户数据",  options.getSheetName ( ), UserDTO.class, fileName, response );
+        EasyPoiUtil.exportExcel(result, "用户数据", options.getSheetName(), UserDTO.class, fileName, response);
     }
 
 
@@ -390,21 +432,21 @@ public class UserController {
         try {
             Integer successNum = 0;
             Integer failureNum = 0;
-            StringBuilder failureMsg = new StringBuilder ( );
-            List <UserDTO> list = EasyPoiUtil.importExcel ( file, 1, 2, UserDTO.class );
+            StringBuilder failureMsg = new StringBuilder();
+            List<UserDTO> list = EasyPoiUtil.importExcel(file, 1, 2, UserDTO.class);
             for (UserDTO user : list) {
                 try {
-                    if ( isCheckLoginNameNoCache ( "", user.getLoginName ( ) ) ) {
-                        user.setPassword ( SecurityUtils.encryptPassword ( "123456" ) );
-                        BeanValidators.validateWithException ( validator, user );
+                    if (isCheckLoginNameNoCache("", user.getLoginName())) {
+                        user.setPassword(SecurityUtils.encryptPassword("123456"));
+                        BeanValidators.validateWithException(validator, user);
                         //查询人员公司信息
-                        OfficeDTO company = officeService.getOfficeByName(user.getCompanyDTO().getName(),"");
-                        if(ObjectUtil.isNotEmpty(company)){
+                        OfficeDTO company = officeService.getOfficeByName(user.getCompanyDTO().getName(), "");
+                        if (ObjectUtil.isNotEmpty(company)) {
                             user.getCompanyDTO().setId(company.getId());
                         }
                         //查询人员部门信息
-                        OfficeDTO office = officeService.getOfficeByName(user.getOfficeDTO().getName(),user.getOfficeDTO().getParentName());
-                        if(ObjectUtil.isNotEmpty(office)){
+                        OfficeDTO office = officeService.getOfficeByName(user.getOfficeDTO().getName(), user.getOfficeDTO().getParentName());
+                        if (ObjectUtil.isNotEmpty(office)) {
                             user.getOfficeDTO().setId(office.getId());
                         }
                         user.setLoginFlag("1");
@@ -414,12 +456,12 @@ public class UserController {
                         userService.save(user1);
                         //人员角色添加
                         List<RoleDTO> roleDTOList = user.getRoleDTOList();
-                        if(roleDTOList.size()!=0){
-                            if(StrUtil.isNotEmpty(roleDTOList.get(0).getName())){
+                        if (roleDTOList.size() != 0) {
+                            if (StrUtil.isNotEmpty(roleDTOList.get(0).getName())) {
                                 RoleDTO role = roleService.getRoleByName(user.getRoleDTOList().get(0).getName());
-                                if(ObjectUtil.isNotEmpty(role)){
+                                if (ObjectUtil.isNotEmpty(role)) {
                                     roleDTOList.get(0).setId(role.getId());
-                                    userService.saveUserRole(user1.getId(),role.getId());
+                                    userService.saveUserRole(user1.getId(), role.getId());
                                 }
                             }
                         }
@@ -429,27 +471,27 @@ public class UserController {
                         userService.saveOrUpdate(userDTO);
                         successNum++;
                     } else {
-                        failureMsg.append ( "<br/>登录名 " + user.getLoginName ( ) + " 已存在; " );
+                        failureMsg.append("<br/>登录名 " + user.getLoginName() + " 已存在; ");
                         failureNum++;
                     }
                 } catch (ConstraintViolationException ex) {
-                    failureMsg.append ( "<br/>登录名 " + user.getLoginName ( ) + " 导入失败:" );
-                    List <String> messageList = BeanValidators.extractPropertyAndMessageAsList ( ex, ": " );
+                    failureMsg.append("<br/>登录名 " + user.getLoginName() + " 导入失败:");
+                    List<String> messageList = BeanValidators.extractPropertyAndMessageAsList(ex, ": ");
                     for (String message : messageList) {
-                        failureMsg.append ( message + "; " );
+                        failureMsg.append(message + "; ");
                         failureNum++;
                     }
                 } catch (Exception ex) {
                     failureNum++;
-                    failureMsg.append ( "<br/>登录名 " + user.getLoginName ( ) + " 导入失败:" + ex.getMessage ( ) );
+                    failureMsg.append("<br/>登录名 " + user.getLoginName() + " 导入失败:" + ex.getMessage());
                 }
             }
-            if ( failureNum > 0 ) {
-                failureMsg.insert ( 0, ",失败 " + failureNum + " 条用户,导入信息如下:" );
+            if (failureNum > 0) {
+                failureMsg.insert(0, ",失败 " + failureNum + " 条用户,导入信息如下:");
             }
-            return ResponseEntity.ok ( "已成功导入 " + successNum + " 条用户" + failureMsg );
+            return ResponseEntity.ok("已成功导入 " + successNum + " 条用户" + failureMsg);
         } catch (Exception e) {
-            return ResponseEntity.badRequest().body ( "导入用户失败!失败信息:" + e.getMessage ( ) );
+            return ResponseEntity.badRequest().body("导入用户失败!失败信息:" + e.getMessage());
         }
     }
 
@@ -459,23 +501,23 @@ public class UserController {
      * @param response
      * @return
      */
-    @PreAuthorize ("hasAnyAuthority('sys:user:import')")
+    @PreAuthorize("hasAnyAuthority('sys:user:import')")
     @GetMapping("import/template")
     @ApiOperation(value = "下载模板")
     public void importFileTemplate(HttpServletResponse response) {
         String fileName = "用户数据导入模板.xlsx";
         List<UserDTO> list = Lists.newArrayList();
-        list.add(UserUtils.getCurrentUserDTO ());
-        EasyPoiUtil.exportExcel ( list, "用户数据",  "用户数据", UserDTO.class, fileName, response );
+        list.add(UserUtils.getCurrentUserDTO());
+        EasyPoiUtil.exportExcel(list, "用户数据", "用户数据", UserDTO.class, fileName, response);
     }
 
 
-    private boolean isCheckLoginName(String oldLoginName,String oldLoginId, String loginName) {
+    private boolean isCheckLoginName(String oldLoginName, String oldLoginId, String loginName) {
         if (StringUtils.isNotBlank(loginName)) {
-            List<User> userList = userService.list(new QueryWrapper<User>().lambda().eq(User::getLoginName,loginName));
+            List<User> userList = userService.list(new QueryWrapper<User>().lambda().eq(User::getLoginName, loginName));
             if (CollectionUtil.isNotEmpty(userList)) {
-                for (User info: userList) {
-                    if(!info.getId().equals(oldLoginId)){
+                for (User info : userList) {
+                    if (!info.getId().equals(oldLoginId)) {
                         return true;
                     }
                 }
@@ -491,9 +533,9 @@ public class UserController {
 
     private boolean isCheckLoginNameNoCache(String oldLoginName, String loginName) {
         UserDTO userByLoginName = userService.getUserByLoginNameNoCache(loginName);
-        if ( loginName != null && loginName.equals ( oldLoginName ) ) {
+        if (loginName != null && loginName.equals(oldLoginName)) {
             return true;
-        } else if ( loginName != null && userByLoginName == null ) {
+        } else if (loginName != null && userByLoginName == null) {
             return true;
         }
         return false;
@@ -510,27 +552,27 @@ public class UserController {
     @PostMapping("imageUpload")
     @ApiOperation(value = "上传头像")
     public ResponseEntity imageUpload(MultipartFile file) throws IllegalStateException, IOException {
-        String userId = UserUtils.getCurrentUserDTO ( ).getId ( );
+        String userId = UserUtils.getCurrentUserDTO().getId();
         // 判断文件是否为空
-        if ( !file.isEmpty ( ) ) {
-            if ( fileProperties.isImage ( file.getOriginalFilename ( ) ) ) {
+        if (!file.isEmpty()) {
+            if (fileProperties.isImage(file.getOriginalFilename())) {
                 // 文件保存路径
-                String realPath = "attachment-file"+"/"+"user_avatar"+this.datePath()+"/"+ System.currentTimeMillis();
+                String realPath = "attachment-file" + "/" + "user_avatar" + this.datePath() + "/" + System.currentTimeMillis();
                 //文件原名称
                 String newName = file.getOriginalFilename();
-                this.uploadFile(file.getInputStream(),realPath,newName); // 文件上传到oss
+                this.uploadFile(file.getInputStream(), realPath, newName); // 文件上传到oss
                 String filePath = realPath + newName;
-                userService.updateAvatarById ( userId,filePath ); // 修改头像
+                userService.updateAvatarById(userId, filePath); // 修改头像
                 String url = aliyunUrl + "/" + realPath + newName;
                 String lsUrl = UserUtils.getLsUrl(url); // 获取头像临时地址
                 // 获取临时头像地址
-                return ResponseUtil.newInstance ( ).add ( "path", lsUrl ).ok ( "上传成功!" );
+                return ResponseUtil.newInstance().add("path", lsUrl).ok("上传成功!");
             } else {
-                return ResponseEntity.badRequest ( ).body ( "请上传图片!" );
+                return ResponseEntity.badRequest().body("请上传图片!");
             }
 
         } else {
-            return ResponseEntity.badRequest ( ).body ( "文件不存在!" );
+            return ResponseEntity.badRequest().body("文件不存在!");
         }
 
 
@@ -545,7 +587,7 @@ public class UserController {
     @GetMapping("info")
     @ApiOperation(value = "获取当前用户信息")
     public ResponseEntity infoData() {
-        return ResponseUtil.newInstance ( ).add ( "role", UserUtils.getRoleDTOList ( ) ).add ( "user", UserUtils.getCurrentUserDTO ( ) ).ok ( "获取个人信息成功!" );
+        return ResponseUtil.newInstance().add("role", UserUtils.getRoleDTOList()).add("user", UserUtils.getCurrentUserDTO()).ok("获取个人信息成功!");
     }
 
 
@@ -554,20 +596,20 @@ public class UserController {
     @RequestMapping("savePwd")
     @ApiOperation(value = "修改密码")
     public ResponseEntity savePwd(String oldPassword, String newPassword) {
-        UserDTO userDTO = UserUtils.getCurrentUserDTO ( );
-        if ( StrUtil.isNotBlank ( oldPassword ) && StrUtil.isNotBlank ( newPassword ) ) {
-            if ( SecurityUtils.validatePassword ( oldPassword, userDTO.getPassword ( ) ) ) {
-                User user = new User ( userDTO.getId ( ) );
-                user.setPassword ( SecurityUtils.encryptPassword ( newPassword ) );
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        if (StrUtil.isNotBlank(oldPassword) && StrUtil.isNotBlank(newPassword)) {
+            if (SecurityUtils.validatePassword(oldPassword, userDTO.getPassword())) {
+                User user = new User(userDTO.getId());
+                user.setPassword(SecurityUtils.encryptPassword(newPassword));
                 user.setUpPassword("1"); // 密码修改状态改为”已修改“
-                userService.updateById ( user );
-                UserUtils.deleteCache ( userDTO );
-                return ResponseEntity.ok ( "修改密码成功!" );
+                userService.updateById(user);
+                UserUtils.deleteCache(userDTO);
+                return ResponseEntity.ok("修改密码成功!");
             } else {
-                return ResponseEntity.badRequest ( ).body ( "修改密码失败,旧密码错误!" );
+                return ResponseEntity.badRequest().body("修改密码失败,旧密码错误!");
             }
         }
-        return ResponseEntity.badRequest ( ).body ( "参数错误!" );
+        return ResponseEntity.badRequest().body("参数错误!");
     }
 
     /*@DemoMode
@@ -615,79 +657,79 @@ public class UserController {
         /**
          * 修改的原因,在某些性能很差的服务器上该方法的执行速度可以提升十几倍。当然在性能优良的服务器上,两种方式耗时几无区别。
          */
-        Map map = new HashMap (  );
-        map.put ( "dictList", DictUtils.getDictMap ( ) ); //获取字典
-        map.put( "permissions", UserUtils.getPermissions ( ) );
-        map.put ( "menuList", MenuUtils.getMenus ( ) );
-        map.put ( "routerList", RouterUtils.getRoutersByMenu ( ) );
-        String res = new Gson ().toJson(map);
-        return ResponseEntity.ok ( res );
+        Map map = new HashMap();
+        map.put("dictList", DictUtils.getDictMap()); //获取字典
+        map.put("permissions", UserUtils.getPermissions());
+        map.put("menuList", MenuUtils.getMenus());
+        map.put("routerList", RouterUtils.getRoutersByMenu());
+        String res = new Gson().toJson(map);
+        return ResponseEntity.ok(res);
     }
 
     /**
      * 获取机构JSON数据。
      *
-     * @param extId 排除的ID
-     * @param type  类型(1:公司;2:部门)
+     * @param extId   排除的ID
+     * @param type    类型(1:公司;2:部门)
      * @param showAll 是否显示不可用数据 1 显示 0 隐藏
      * @return
      */
     @ApiLog("获取部门用户数据")
     @GetMapping("treeUserData")
     public ResponseEntity treeUserData(@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
-        List<OfficeDTO> list = officeWrapper.toDTO (officeService.list ());
+        List<OfficeDTO> list = officeWrapper.toDTO(officeService.list());
         for (OfficeDTO info :
                 list) {
             info.setTypeFlag(true);
         }
         //根据部门查询对应部门下的所有数据
-        List<OfficeDTO> officeDTOList = userService.disposeUserOffice(list,type);
+        List<OfficeDTO> officeDTOList = userService.disposeUserOffice(list, type);
         list.addAll(officeDTOList);
-        List rootTree = officeService.getRootTree (list, extId, type, showAll, "1");
-        return ResponseEntity.ok (rootTree);
+        List rootTree = officeService.getRootTree(list, extId, type, showAll, "1");
+        return ResponseEntity.ok(rootTree);
     }
 
     /**
      * 获取机构JSON数据。
      *
      * @param officeName 部门名称
-     * @param extId 排除的ID
-     * @param type  类型(1:公司;2:部门)
-     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @param extId      排除的ID
+     * @param type       类型(1:公司;2:部门)
+     * @param showAll    是否显示不可用数据 1 显示 0 隐藏
      * @return
      */
     @ApiLog("获取部门用户数据")
     @GetMapping("treeUserDataAllOffice")
-    public ResponseEntity treeUserDataAllOffice(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
-        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
-        if(list.size()>0){
+    public ResponseEntity treeUserDataAllOffice(@RequestParam(required = false) String officeName, @RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName(officeName);
+        if (list.size() > 0) {
             List<String> officeIds = Lists.newArrayList();
             for (OfficeDTO info : list) {
                 info.setTypeFlag(true);
                 officeIds.add(info.getId());
             }
             //根据部门查询对应部门下的所有数据
-            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds, type);
             list.addAll(officeDTOList);
         }
-        List rootTree = officeService.getRootTree (list, extId, type, showAll, "1");
-        return ResponseEntity.ok (rootTree);
+        List rootTree = officeService.getRootTree(list, extId, type, showAll, "1");
+        return ResponseEntity.ok(rootTree);
     }
 
     /**
      * 获取机构JSON数据。
      *
      * @param officeName 部门名称
-     * @param extId 排除的ID
-     * @param type  类型(1:公司;2:部门)
-     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @param extId      排除的ID
+     * @param type       类型(1:公司;2:部门)
+     * @param showAll    是否显示不可用数据 1 显示 0 隐藏
      * @return
      */
     @ApiLog("获取部门用户数据")
     @GetMapping("treeUserDataByOfficeName")
-    public ResponseEntity treeUserDataByOfficeName(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
-        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
-        if(list.size()>0){
+    public ResponseEntity treeUserDataByOfficeName(@RequestParam(required = false) String officeName, @RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName(officeName);
+        if (list.size() > 0) {
             List<String> officeIds = Lists.newArrayList();
             for (OfficeDTO info :
                     list) {
@@ -695,35 +737,35 @@ public class UserController {
                 officeIds.add(info.getId());
             }
             //根据部门查询对应部门下的所有数据
-            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds, type);
             list.addAll(officeDTOList);
         }
-        List rootTree = officeService.getofficeUserTree (officeName,list, extId, type, showAll);
-        return ResponseEntity.ok (rootTree);
+        List rootTree = officeService.getofficeUserTree(officeName, list, extId, type, showAll);
+        return ResponseEntity.ok(rootTree);
     }
 
     /**
      * 获取机构JSON数据。
      *
      * @param officeName 部门名称
-     * @param extId 排除的ID
-     * @param type  类型(1:公司;2:部门)
-     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @param extId      排除的ID
+     * @param type       类型(1:公司;2:部门)
+     * @param showAll    是否显示不可用数据 1 显示 0 隐藏
      * @return
      */
     @ApiLog("获取部门信息")
     @GetMapping("treeUserDataByOfficeList")
-    public ResponseEntity treeUserDataByOfficeList(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
-        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
-        if(list.size()>0){
+    public ResponseEntity treeUserDataByOfficeList(@RequestParam(required = false) String officeName, @RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName(officeName);
+        if (list.size() > 0) {
             List<String> officeIds = Lists.newArrayList();
             for (OfficeDTO info :
                     list) {
                 officeIds.add(info.getId());
             }
         }
-        List rootTree = officeService.getofficeUserTree (officeName,list, extId, type, showAll);
-        return ResponseEntity.ok (rootTree);
+        List rootTree = officeService.getofficeUserTree(officeName, list, extId, type, showAll);
+        return ResponseEntity.ok(rootTree);
     }
 
     /**
@@ -751,31 +793,33 @@ public class UserController {
     private String accessKeySecret;
     @Value("${config.accessory.aliyun.bucketName}")
     private String bucketName;
+
     /**
      * 阿里云获取临时文件查看url
+     *
      * @param url
      */
-    public String getFileTemporaryLookUrl(String url){
-        url = url.replace("amp;","");
+    public String getFileTemporaryLookUrl(String url) {
+        url = url.replace("amp;", "");
         String cons = "";
-        if (url.contains(aliyunUrl)){
+        if (url.contains(aliyunUrl)) {
             cons = aliyunUrl;
-        }else if (url.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+        } else if (url.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
             cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
-        }else {
+        } else {
             cons = aliyunDownloadUrl;
         }
         String key = "";
         String[] split = url.split(cons + "/");
-        if(split.length>1){
+        if (split.length > 1) {
             key = split[1];
-        }else{
+        } else {
             key = url;
         }
         // 指定过期时间为24小时。
-        Date expiration = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 );
+        Date expiration = new Date(new Date().getTime() + 1000 * 60 * 60 * 24);
         //初始化OSSClient
-        OSSClient ossClient = new OSSClient(endpoint,accessKeyId,accessKeySecret);
+        OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
         return ossClient.generatePresignedUrl(bucketName, key, expiration).toString();
     }
 
@@ -816,6 +860,7 @@ public class UserController {
 
     /**
      * 获取当前用户是否已经修改过密码
+     *
      * @return
      */
     @ApiLog("获取当前用户是否已经修改过密码")
@@ -830,7 +875,7 @@ public class UserController {
 
     public String uploadFile(InputStream inStream, String fileDir, String fileName) {
         //初始化OSSClient
-        OSSClient ossClient = new OSSClient(endpoint,accessKeyId,accessKeySecret);
+        OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
 //        long start = System.currentTimeMillis();
         //上传文件
         PutObjectResult putResult = ossClient.putObject(bucketName, fileDir + fileName, inStream);
@@ -847,22 +892,24 @@ public class UserController {
 //        log.info("上传文件到云服务器成功,文件名:{},耗时:{}ms",fileName,end-start);
         return ret;
     }
-    public String datePath(){
+
+    public String datePath() {
         Calendar date = Calendar.getInstance();
         String year = String.valueOf(date.get(Calendar.YEAR));
-        String month = String.valueOf(date.get(Calendar.MONTH)+1);
+        String month = String.valueOf(date.get(Calendar.MONTH) + 1);
         String day = String.valueOf(date.get(Calendar.DAY_OF_MONTH));
-        String path = "/"+year+"/"+month+"/"+day;
+        String path = "/" + year + "/" + month + "/" + day;
         return path;
     }
 
     /**
      * 查看签字注释2角色的用户
+     *
      * @return
      */
     @ApiLog("签字注师2")
     @GetMapping("list1")
-    public List<String> list1(){
+    public List<String> list1() {
         return userService.selectSignatureNaster();
     }
 }

+ 12 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -61,6 +61,14 @@ public interface UserMapper extends BaseMapper<User> {
     IPage <UserDTO> findList(Page <UserDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
     /**
+     * 获取岗位列表
+     *
+     *
+     * @return
+     */
+    List<UserDTO> findList1(@Param("dto") UserDTO dto);
+
+    /**
      * 按角色获取用户列表
      *
      * @param queryWrapper
@@ -251,4 +259,8 @@ public interface UserMapper extends BaseMapper<User> {
 
 
     List<String> selectSignatureNaster();
+
+
+    //过滤部门条件
+   List<UserDTO> findList2(String id, String loginName);
 }

+ 101 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -433,5 +433,106 @@
 	left join sys_user as us on us.id= user_role.user_id and us.del_flag = 0
 	where  role.name = '签字注师2' and role.del_flag = 0
 	</select>
+	<select id="findList1" resultType="com.jeeplus.sys.service.dto.UserDTO">
+		SELECT
+			a.id,
+			a.company_id AS "companyDTO.id",
+			a.office_id AS "officeDTO.id",
+			a.login_name AS "loginName",
+			a.is_admin AS "isAdmin",
+			a.PASSWORD,
+			a.NO,
+			a.NAME,
+			a.email,
+			a.phone,
+			a.mobile,
+			a.login_ip AS "loginIp",
+			a.login_date AS "loginDate",
+			a.remarks,
+			a.login_flag,
+			a.other_service_flag,
+			a.photo,
+			a.qr_code,
+			a.sign,
+			a.create_by AS "createBy.id",
+			a.create_date,
+			a.update_by AS "updateBy.id",
+			a.update_date,
+			a.manage_office_ids ,
+			c.NAME AS "companyDTO.name",
+			c.parent_id AS "companyDTO.parent.id",
+			c.parent_ids AS "companyDTO.parentIds",
+			o.NAME AS "officeDTO.name",
+			o.parent_id AS "officeDTO.parent.id",
+			o.parent_ids AS "officeDTO.parentIds",
+			o.is_public AS "officeDTO.isPublic",
+			a.roster_id
+		FROM
+			sys_role AS role
+				LEFT JOIN sys_user_role AS user_role ON user_role.role_id = role.id
+				LEFT JOIN sys_user AS a ON a.id = user_role.user_id
+				AND a.del_flag = 0
+				LEFT JOIN sys_cert sc ON a.id = sc.user_id
+				AND sc.del_flag = '0'
+				LEFT JOIN sys_office c ON c.id = a.company_id
+				LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE
+			role.NAME = '签字注师2'
+		  AND role.del_flag = 0
+	</select>
+	<select id="findList2" resultType="com.jeeplus.sys.service.dto.UserDTO">
 
+		SELECT
+			a.id,
+			a.company_id AS "companyDTO.id",
+			a.office_id AS "officeDTO.id",
+			a.login_name AS "loginName",
+			a.is_admin AS "isAdmin",
+			a.PASSWORD,
+			a.NO,
+			a.NAME,
+			a.email,
+			a.phone,
+			a.mobile,
+			a.login_ip AS "loginIp",
+			a.login_date AS "loginDate",
+			a.remarks,
+			a.login_flag,
+			a.other_service_flag,
+			a.photo,
+			a.qr_code,
+			a.sign,
+			a.create_by AS "createBy.id",
+			a.create_date,
+			a.update_by AS "updateBy.id",
+			a.update_date,
+			a.manage_office_ids ,
+			c.NAME AS "companyDTO.name",
+			c.parent_id AS "companyDTO.parent.id",
+			c.parent_ids AS "companyDTO.parentIds",
+			o.NAME AS "officeDTO.name",
+			o.parent_id AS "officeDTO.parent.id",
+			o.parent_ids AS "officeDTO.parentIds",
+			o.is_public AS "officeDTO.isPublic",
+			a.roster_id
+		FROM
+			sys_role AS role
+				LEFT JOIN sys_user_role AS user_role ON user_role.role_id = role.id
+				LEFT JOIN sys_user AS a ON a.id = user_role.user_id
+				AND a.del_flag = 0
+				LEFT JOIN sys_cert sc ON a.id = sc.user_id
+				AND sc.del_flag = '0'
+				LEFT JOIN sys_office c ON c.id = a.company_id
+				LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			AND role.NAME = '签字注师2'
+			<if test="id != null and id != '' ">
+				AND a.office_id = #{id}
+			</if>
+			<if test="loginName != null and loginName != '' ">
+				AND a.login_name LIKE CONCAT('%', #{loginName}, '%')
+			</if>
+			AND role.del_flag = 0
+		</where>
+	</select>
 </mapper>

+ 24 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -28,6 +28,7 @@ import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.service.mapstruct.UserWrapper;
 import com.jeeplus.sys.utils.UserUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.aspectj.weaver.ast.Var;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.http.ResponseEntity;
@@ -214,11 +215,34 @@ public class UserService  extends ServiceImpl<UserMapper, User> {
 	 * @return
 	 */
 	public IPage <UserDTO> findPage(Page <UserDTO> page, QueryWrapper queryWrapper) {
+
 		queryWrapper.eq ("a.del_flag", 0 ); // 排除已经删除
 		return  baseMapper.findList (page, queryWrapper);
 
 
 	}
+	/**
+	 * 角色分页检索
+	 * @param page
+	 * @param
+	 * @return
+	 */
+	public IPage <UserDTO> findPage1(UserDTO dto, Page <UserDTO> page) {
+		List <UserDTO> list1 = baseMapper.findList1(dto);
+		// 将List<UserDTO>数据设置到Page对象中
+		page.setRecords(list1);
+		return  page;
+	}
+
+	//根据部门进行过滤
+	public IPage<UserDTO> findPage2(UserDTO userDTO) {
+		Page<UserDTO> page = new Page<>();
+		List <UserDTO> list1 = baseMapper.findList2(userDTO.getOfficeDTO().getId(),userDTO.getLoginName());
+		page.setRecords(list1);
+		return page;
+	}
+
+
 
 	/**
 	 * 查询角色下关联的用户

+ 10 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/dto/UserDTO.java

@@ -200,6 +200,16 @@ public class  UserDTO extends BaseDTO {
     private String selectAll;
 
     /**
+     * 角色表id
+     */
+    private String roleId;
+    /**
+     * 角色表姓名
+     */
+    private String roleName;
+
+
+    /**
      * 拥有角色列表
      */
     @ApiModelProperty(hidden = true)