| | |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询机构列表 |
| | | */ |
| | | @ApiOperation(value = "查询可切换机构列表",response = OrganizationChartEntity.class) |
| | | @GetMapping("switch/getList") |
| | | public TableDataInfo switchGetList(@CurrentUser SysUser sysUser) |
| | | { |
| | | List<String> ids=new ArrayList<>(); |
| | | if(!StringUtils.isEmpty(sysUser.getMoreDepartmentIds())) |
| | | { |
| | | if(sysUser.getMoreDepartmentIds().indexOf(",")==-1) |
| | | { |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | else |
| | | { |
| | | String[] list=sysUser.getMoreDepartmentIds().split(","); |
| | | for (String id:list) |
| | | { |
| | | ids.add(id); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | |
| | | return getDataTable(iOrganizationChartService.selectConfigList("","",ids)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation("切换部门接口") |
| | | @GetMapping(value = "/switch/department") |
| | | public ResultData switchDepartment(@RequestParam(value = "departmentId",required = false) String departmentId, |
| | | @CurrentUser SysUser sysUse) |
| | | { |
| | | sysUse.setDepartmentId(departmentId); |
| | | return toAjax(IUserService.updateConfig(sysUse)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | automessage_guide_repair_order.guide_department_id=automessage_sys_user.department_id) as transactionEndNum, |
| | | (select role_name from automessage_role_management where automessage_role_management.id=role_ids) as roleName, |
| | | (select permission from automessage_role_management where automessage_role_management.id=role_ids) as permission, |
| | | |
| | | (SELECT GROUP_CONCAT(organization_name) FROM automessage_organization_chart WHERE id in (SELECT |
| | | substring_index(substring_index(more_department_ids,',', b.help_topic_id + 1), ',', -1) result |
| | | FROM |
| | | mysql.help_topic b |
| | | where |
| | | b.help_topic_id < (LENGTH(more_department_ids) - LENGTH(REPLACE(more_department_ids, ',', '')) + 1))) as department_name |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as department_name |
| | | FROM |
| | | automessage_sys_user |
| | | </sql> |