From 344486861242d260b4750f1314295a59e42c7ec2 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Wed, 25 May 2022 11:13:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=BB=9F=E8=AE=A1-=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=9B=BE=E8=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/CensusController.java | 7 ++ .../modules/resource/dao/ResourceDao.java | 7 ++ .../resource/service/ResourceService.java | 2 + .../service/impl/ResourceServiceImpl.java | 25 ++++--- .../resources/mapper/resource/ResourceDao.xml | 73 +++++++++++++++++++ 5 files changed, 104 insertions(+), 10 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index 3ec455a8..777e0330 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -320,6 +320,13 @@ public class CensusController { return new Result().ok(resourceService.applicationAreaCapabilitySet()); } + @GetMapping("/selectResourceListByAppArea") + @ApiOperation("资源图谱-应用领域-能力集-根据应用领域查能力") + @LogOperation("资源图谱-应用领域-能力集-根据应用领域查能力") + public Result selectResourceListByAppArea(@RequestParam String appArea) { + return new Result().ok(resourceService.selectResourceListByAppArea(appArea)); + } + @GetMapping("/selectResourceListByType") @ApiOperation("资源图谱-能力类型-能力集-根据类型查能力") @LogOperation("资源图谱-能力类型-能力集-根据类型查能力") diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index 82c3fd5c..2f8174e2 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -99,4 +99,11 @@ public interface ResourceDao extends BaseDao { List selectByType(@Param("type") String s); List selectTypeCountList(); + + List selectMaxAppArea(); + + List selectByAppArea(@Param("type") String s); + + List selectAppAreaCountList(); + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index 2d089eb8..343b33dd 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -72,4 +72,6 @@ public interface ResourceService extends CrudService deptList = resourceDao.selectTypeCountList(); - resultMap.put("typeList", deptList); + List typeList = resourceDao.selectTypeCountList(); + resultMap.put("typeList", typeList); return resultMap; } @Override public Object applicationAreaCapabilitySet() { HashMap resultMap = new HashMap<>(); - //List types = resourceDao.selectMaxAppArea(); - //List resourceList = resourceDao.selectByApparea(types.get(0)); - //HashMap maxdeptMap = new HashMap<>(); - //maxdeptMap.put("resourceList", resourceList); - //maxdeptMap.put("typeName", types.get(0)); - //resultMap.put("maxDept", maxdeptMap); - //List deptList = resourceDao.selectTypeCountList(); - //resultMap.put("typeList", deptList); + List types = resourceDao.selectMaxAppArea(); + List resourceList = resourceDao.selectByAppArea(types.get(0)); + HashMap maxAppAreaMap = new HashMap<>(); + maxAppAreaMap.put("resourceList", resourceList); + maxAppAreaMap.put("typeName", types.get(0)); + resultMap.put("maxAppArea", maxAppAreaMap); + List appAreaList = resourceDao.selectAppAreaCountList(); + resultMap.put("appAreaList", appAreaList); return resultMap; } @@ -537,4 +537,9 @@ public class ResourceServiceImpl extends CrudServiceImpl + + + + + + \ No newline at end of file