From e87d9f3de8d80ccdca1aaad4c5ff75abf9801428 Mon Sep 17 00:00:00 2001 From: fengjin <1435304038@qq.com> Date: 星期三, 16 十一月 2022 17:19:41 +0800 Subject: [PATCH] 1.添加智能质询访问表实体类 2.添加智能质询访问相关功能并统计数据 3.修改门户网搜索结果 --- flower_city/src/main/java/com/dg/core/controller/OrganizationController.java | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 44 insertions(+), 3 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java b/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java index 5524fdb..70ad5b8 100644 --- a/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java +++ b/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java @@ -54,7 +54,7 @@ @Authorization public TableDataInfo selectJurisdiction(@CurrentUser SysUser sysUser) { - return getOrganizations(sysUser.getDepartmentId()); + return getDataTable(iOrganizationChartService.selectConfigList(sysUser.getDepartmentId(),"",null)); } /** @@ -162,8 +162,34 @@ } + + /** * 通过父级id查询对应机构下的全部部门id + * @param departmentId + * @return + */ + @ApiOperation(value = "通过父级id查询对应机构下的全部部门") + @GetMapping("/getdepartment/id") + public TableDataInfo getOrganizationIds(@RequestParam(value = "department",required = false) String departmentId) + { + if(StringUtils.isEmpty(departmentId)) + { + return getDataTable("departmentId 不能为空"); + } + + List<String> ids=new ArrayList<>(); + List<String> getId=iOrganizationChartService.getIds(departmentId); + ids.addAll(getId); + return getDataTable(ids); + } + + + + + + /** + * 通过父级id查询对应机构下的全部部门 * @param departmentId * @return */ @@ -172,7 +198,17 @@ public TableDataInfo getOrganizations(@RequestParam(value = "department",required = false) String departmentId) { List<OrganizationChartEntity> ids=new ArrayList<>(); - List<OrganizationChartEntity> lists = iOrganizationChartService.selectParentList(departmentId,""); + List<OrganizationChartEntity> lists=null; + if(StringUtils.isEmpty(departmentId)) + { + lists= iOrganizationChartService.selectParentList(null,"1"); + + } + else + { + lists= iOrganizationChartService.selectParentList(departmentId,null); + } + if(lists.size()<1) { lists.add(iOrganizationChartService.selectConfigById(departmentId)); @@ -182,7 +218,12 @@ { return null; } - ids.add(iOrganizationChartService.selectConfigById(departmentId)); + + if(!StringUtils.isEmpty(departmentId)) + { + ids.add(iOrganizationChartService.selectConfigById(departmentId)); + } + return getDataTable(ids); } -- Gitblit v1.7.1