Browse Source

功能调整

wangqiang 1 year ago
parent
commit
7de841a67b

+ 1 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/contractRegistration/mapper/ContractFilePaperMapper.java

@@ -19,6 +19,7 @@ public interface ContractFilePaperMapper extends BaseMapper<ContractFilePaper> {
      * @param id
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     ContractFilePaper selectFilePaperByContractInfoId(String id);
     @InterceptorIgnore(tenantLine = "true")
     ContractFilePaper getById(String id);

+ 1 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java

@@ -45,6 +45,7 @@ public interface OfficeMapper extends TreeMapper <Office> {
      *
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     public List <OfficeDTO> findList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
     /**

+ 10 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -33,7 +33,16 @@ public interface UserMapper extends BaseMapper <User> {
      * @return
      */
     @InterceptorIgnore(tenantLine = "true")
-    List<UserDTO> findList1(@Param("dto") UserDTO dto);
+    List<UserDTO> findList1(@Param("dto") UserDTO dto, @Param("companyId")String companyId);
+
+    /**
+     * 获取用户列表
+     *
+     *
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<UserDTO> findAllList(@Param("dto") UserDTO dto, @Param("companyId")String companyId);
 
     //过滤部门条件
     @InterceptorIgnore(tenantLine = "true")

+ 52 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -446,6 +446,9 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
 				LEFT JOIN sys_office o ON o.id = a.office_id
 		WHERE
 			post.NAME = '签字注师2'
+            <if test="companyId != null and companyId != '' ">
+                AND a.company_id = #{companyId}
+            </if>
 		  AND post.del_flag = 0
     </select>
 
@@ -458,5 +461,54 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
     <select id="isUpdatePassword" resultType="string">
 		select up_password from sys_user where del_flag = '0' and id = #{userId}
 	</select>
+    <select id="findAllList" 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_id AS "createBy.id",
+        a.create_time,
+        a.update_by_id AS "updateBy.id",
+        a.update_time,
+        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_post AS post
+        LEFT JOIN sys_user_post AS user_post ON user_post.post_id = post.id
+        LEFT JOIN sys_user AS a ON a.id = user_post.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
+        <if test="companyId != null and companyId != '' ">
+             a.company_id = #{companyId}
+        </if>
+        AND post.del_flag = 0
+    </select>
 
 </mapper>

+ 3 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -61,10 +61,12 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
      */
     public List <OfficeDTO> findList(String tenantId, String parentId) {
         QueryWrapper queryWrapper = new QueryWrapper ( );
-
+        // 查询岗位用户信息
+        List<String> offId = userService.findOffId();
         queryWrapper.like ( StringUtils.isNotBlank ( parentId ), "a.parent_ids", "," + parentId + "," );
         queryWrapper.eq ( StringUtils.isNotBlank ( tenantId ), "a.tenant_id", tenantId );
         queryWrapper.eq ( "a.del_flag", 0 );
+        queryWrapper.in ( "a.id", offId );
         queryWrapper.orderByAsc ( "a.sort" );
         return baseMapper.findList ( queryWrapper );
     }

+ 36 - 2
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -437,7 +437,12 @@ public class UserService extends ServiceImpl <UserMapper, User> {
      * @return
      */
     public IPage <UserDTO> findPage1(UserDTO dto, Page <UserDTO> page) {
-        List <UserDTO> list1 = baseMapper.findList1(dto);
+        OfficeDTO officeDTO = dto.getCompanyDTO();
+        String companyId = "";
+        if (null != officeDTO){
+            companyId = officeDTO.getId();
+        }
+        List <UserDTO> list1 = baseMapper.findList1(dto,companyId);
         // 将List<UserDTO>数据设置到Page对象中
         page.setRecords(list1);
         return  page;
@@ -462,7 +467,36 @@ public class UserService extends ServiceImpl <UserMapper, User> {
      */
     public List<String> findOffId() {
         UserDTO dto = new UserDTO();
-        List <UserDTO> list1 = baseMapper.findList1(dto);
+        OfficeDTO officeDTO = dto.getCompanyDTO();
+        String companyId = "";
+        if (null != officeDTO){
+            companyId = officeDTO.getId();
+        }
+        List <UserDTO> list1 = baseMapper.findList1(dto,companyId);
+        List<String> list = new ArrayList<>();
+        list1.forEach(li->{
+            list.add(li.getOfficeDTO().getId());
+        });
+        list1.forEach(li->{
+            list.add(li.getCompanyDTO().getId());
+        });
+        return  list;
+    }
+
+    /**
+     * 岗位分页检索
+     * @param
+     * @param
+     * @return
+     */
+    public List<String> findAllOffId() {
+        UserDTO dto = new UserDTO();
+        OfficeDTO officeDTO = dto.getCompanyDTO();
+        String companyId = "";
+        if (null != officeDTO){
+            companyId = officeDTO.getId();
+        }
+        List <UserDTO> list1 = baseMapper.findAllList(dto,companyId);
         List<String> list = new ArrayList<>();
         list1.forEach(li->{
             list.add(li.getOfficeDTO().getId());