diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/dept/controller/ProDeptRoleController.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/dept/controller/ProDeptRoleController.java index 1eadd96..0d2e530 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/dept/controller/ProDeptRoleController.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/dept/controller/ProDeptRoleController.java @@ -12,6 +12,7 @@ import com.bonus.system.api.domain.MapVo; import com.bonus.system.api.domain.SysUser; import com.bonus.system.dept.dao.ProDeptRoleDao; import com.bonus.system.dept.entity.EightRoleBean; +import com.bonus.system.dept.entity.EightRoleVo; import com.bonus.system.dept.entity.ProDeptRoleBean; import com.bonus.system.dept.entity.ProDeptRoleDo; import com.bonus.system.dept.service.ProDeptRoleService; @@ -243,8 +244,8 @@ public class ProDeptRoleController extends BaseController { @Log(title = "项目部管理->项目部角色管理->查询八大员内部详情", businessType = BusinessType.QUERY) public TableDataInfo getOrgEightRoleDetail(EightRoleBean bean) { try{ - startPage(); - return getDataTable(proDeptRoleService.getOrgEightRoleDetail(bean)); + List orgEightRoleDetail = proDeptRoleService.getOrgEightRoleDetail(bean); + return endPage(orgEightRoleDetail); }catch (Exception e){ log.error(e.toString(),e); } diff --git a/bonus-modules/bonus-system/src/main/resources/mapper/dept/ProDeptRoleMapper.xml b/bonus-modules/bonus-system/src/main/resources/mapper/dept/ProDeptRoleMapper.xml index 5c325a1..298e4fd 100644 --- a/bonus-modules/bonus-system/src/main/resources/mapper/dept/ProDeptRoleMapper.xml +++ b/bonus-modules/bonus-system/src/main/resources/mapper/dept/ProDeptRoleMapper.xml @@ -222,8 +222,9 @@ sys_organization so LEFT JOIN sys_organization so2 ON so2.id = so.parent_id AND so2.is_active = '1' - LEFT JOIN ( SELECT org_id, COUNT( department_role_id ) AS roleNum FROM sys_department_role sdr WHERE - sdr.is_active = 1 AND department_role_id != 9 GROUP BY org_id ) mm ON mm.org_id = so.id + LEFT JOIN ( SELECT org_id, COUNT( department_role_id ) AS roleNum FROM sys_department_role sdr + INNER JOIN sys_department_user sdu ON sdu.department_id = sdr.id + WHERE sdr.is_active = 1 AND department_role_id != 9 GROUP BY org_id ) mm ON mm.org_id = so.id LEFT JOIN ( SELECT org_id, @@ -283,7 +284,7 @@ sdr.reviewer_status, sd.id AS deptRoleId, sd.`value` AS deptRoleName, - GROUP_CONCAT( DISTINCT su.user_name ) AS userName + IF(sdr.reviewer_status = 1,GROUP_CONCAT( DISTINCT su.user_name ),null) AS userName FROM sys_organization so LEFT JOIN sys_dict sd ON sd.type = 'deptRole'