From bcf940114c229f939cf447f56777d31a547a24c1 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Tue, 24 May 2022 18:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/common/controller/CensusController.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 6c4cf907..201fa721 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 @@ -7,6 +7,8 @@ import io.renren.common.utils.Result; import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resourceBrowse.service.ResourceBrowseService; +import io.renren.modules.sys.dto.SysDeptDTO; +import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -39,6 +41,8 @@ public class CensusController { private TAbilityApplicationService tAbilityApplicationService; @Autowired private ResourceBrowseService resourceBrowseService; + @Autowired + private SysDeptService sysDeptService; @Value("${census.type}") private String[] censusTypes; // 需要进行统计的资源类型 @@ -192,10 +196,12 @@ public class CensusController { db.stream().flatMap(index_ -> Arrays.stream(index_.split(";"))).filter(index_ -> StringUtils.isNotEmpty(index_)).collect(Collectors.toSet()); return type; }).thenAccept(type -> { + SysDeptDTO deptDTO = sysDeptService.get(deptId); result.add(new HashMap() { { put("provide", type); put("deptId", deptId); + put("deptName", deptDTO.getName()); } }); }); @@ -224,10 +230,12 @@ public class CensusController { db.stream().flatMap(index_ -> Arrays.stream(index_.split(";"))).filter(index_ -> StringUtils.isNotEmpty(index_)).collect(Collectors.toSet()); return type; }).thenAccept(type -> { + SysDeptDTO deptDTO = sysDeptService.get(deptId); result.add(new HashMap() { { put("provide", type); put("deptId", deptId); + put("deptName", deptDTO.getName()); } }); });