From d23401c039dfabb566fbca7ff37b5bdb68700698 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 8 Dec 2021 16:08:56 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=86=E6=9E=90=E3=80=91=E5=90=84=E5=88=86=E7=B1=BB=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=95=B0=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../govissue/IssueProjectCategoryDictDTO.java | 93 +++++++++++++++++++ .../form/CategoryProjectFormDTO.java | 4 +- .../form/ProjectAnalysisFormDTO.java | 4 +- .../form/ProjectCategoryTotalFormDTO.java | 2 + .../result/CategoryProjectResultDTO.java | 2 +- .../result/ProjectCategoryTotalResultDTO.java | 4 +- .../controller/GovProjectController.java | 5 +- .../evaluationindex/EvaluationIndexDao.java | 8 ++ .../dataaggre/dao/govissue/IssueDao.java | 7 ++ .../EvaluationIndexService.java | 7 ++ .../impl/EvaluationIndexServiceImpl.java | 11 +++ .../service/govissue/GovIssueService.java | 7 ++ .../govissue/impl/GovIssueServiceImpl.java | 10 ++ .../service/govproject/GovProjectService.java | 2 +- .../impl/GovProjectServiceImpl.java | 31 ++++++- .../evaluationindex/EvaluationIndexDao.xml | 13 +++ .../resources/mapper/govissue/IssueDao.xml | 12 +++ 17 files changed, 209 insertions(+), 13 deletions(-) create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java new file mode 100644 index 0000000000..4555a86cd2 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dataaggre.dto.govissue; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueProjectCategoryDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id, 产品默认default + */ + private String customerId; + + /** + * 上级分类ID 顶级此列存储0 + */ + private String pid; + + /** + * 所有上级分类ID,用逗号分开 + */ + private String pids; + + /** + * 上级分类编码 + */ + private String parentCategoryCode; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 分类类别1,2,3,4.... + */ + private String categoryType; + + /** + * 排序 + */ + private Integer sort; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + + /** + * 颜色 + */ + private String colour; + + +} \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/CategoryProjectFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/CategoryProjectFormDTO.java index 726d01dbce..38335e8223 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/CategoryProjectFormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/CategoryProjectFormDTO.java @@ -24,8 +24,8 @@ public class CategoryProjectFormDTO implements Serializable { @NotBlank(message = "组织ID不能为空", groups = {Category.class}) private String dateId; //一级分类Id - @NotBlank(message = "分类Id不能为空", groups = {Category.class}) - private String categoryId; + @NotBlank(message = "分类Code不能为空", groups = {Category.class}) + private String categoryCode; //页码 @Min(1) private Integer pageNo = 1; diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectAnalysisFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectAnalysisFormDTO.java index 9689899cc4..1cf8e85373 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectAnalysisFormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectAnalysisFormDTO.java @@ -25,8 +25,8 @@ public class ProjectAnalysisFormDTO implements Serializable { @NotBlank(message = "话题或事件发起人Id不能为空", groups = {Analysis.class}) private String userId; //一级分类Id集合 - @NotNull(message = "分类Id集合不能为空", groups = {Analysis.class}) - private List categoryIdList; + @NotNull(message = "分类Code集合不能为空", groups = {Analysis.class}) + private List categoryCodeList; public interface Analysis extends CustomerClientShowGroup { } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectCategoryTotalFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectCategoryTotalFormDTO.java index eddd513d1c..66d4e983b8 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectCategoryTotalFormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectCategoryTotalFormDTO.java @@ -24,6 +24,8 @@ public class ProjectCategoryTotalFormDTO implements Serializable { @NotBlank(message = "日维度ID不能为空", groups = {Project.class}) private String dateId; + private String customerId; + public interface Project extends CustomerClientShowGroup { } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java index 6f24967aba..b6cd54a88c 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java @@ -27,7 +27,7 @@ public class CategoryProjectResultDTO implements Serializable { //项目编码[目前没这个功能 默认为空] private String projectCode = ""; //一级分类Id集合 - private List categoryIds; + private List categoryCodes; //一级分类名称集合 private List categoryNames; //来源:议题issue 项目立项:agency 事件:resi_event【控制电机查看时里边三个按钮的显示】 diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java index 1d95b68175..fabbad4ddf 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java @@ -14,8 +14,8 @@ public class ProjectCategoryTotalResultDTO implements Serializable { //组织Id private String agencyId; - //一级分类Id - private String categoryId; + //一级分类Code + private String categoryCode; //一级分类名称 private String categoryName; //分类下项目总数 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java index 396f14543d..3039785f12 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java @@ -91,9 +91,10 @@ public class GovProjectController { * @author sun */ @PostMapping("projectcategorylist") - public Result projectCategoryList(@RequestBody ProjectCategoryTotalFormDTO formDTO) { + public Result> projectCategoryList(@LoginUser TokenDto tokenDto, @RequestBody ProjectCategoryTotalFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, ProjectCategoryTotalFormDTO.Project.class); - return new Result().ok(govProjectService.projectCategoryList(formDTO)); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(govProjectService.projectCategoryList(formDTO)); } /** diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java index 138ff3d449..5afe394900 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java @@ -21,6 +21,8 @@ import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO; +import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -103,4 +105,10 @@ public interface EvaluationIndexDao { */ String selectAgencyNameByAgencyId(@Param("agencyId")String agencyId); + /** + * @Description 按dateId查询组织下一级分类项目总数统计 + * @author sun + */ + List projectCategoryList(ProjectCategoryTotalFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java index 1e85e06366..6727a2d2d4 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java @@ -18,6 +18,7 @@ package com.epmet.dataaggre.dao.govissue; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.VotingIssueListFormDTO; @@ -74,4 +75,10 @@ public interface IssueDao extends BaseDao { Integer selectIssueCount(@Param("gridIds") List gridIds,@Param("issueType")String issueType); List selectShiftProjectIssueList(@Param("customerId") String customerId, @Param("gridId") String gridId); + + /** + * @Description 查询客户下分类信息 + * @author sun + **/ + List getCategoryList(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java index 67468e32de..bd5cfd6886 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java @@ -6,6 +6,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO; +import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO; import java.util.List; @@ -86,4 +88,9 @@ public interface EvaluationIndexService { */ ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId); + /** + * @Description 按dateId查询组织下一级分类项目总数统计 + * @author sun + */ + List projectCategoryList(ProjectCategoryTotalFormDTO formDTO); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index abb0f137f5..e3f1b246af 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -11,6 +11,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO; +import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO; +import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO; import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService; import com.epmet.dataaggre.service.opercrm.CustomerRelation; import lombok.extern.slf4j.Slf4j; @@ -206,4 +208,13 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { return resultDTO; } + /** + * @Description 按dateId查询组织下一级分类项目总数统计 + * @author sun + */ + @Override + public List projectCategoryList(ProjectCategoryTotalFormDTO formDTO) { + return evaluationIndexDao.projectCategoryList(formDTO); + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java index 5159bda48f..65e768ccf5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java @@ -1,6 +1,7 @@ package com.epmet.dataaggre.service.govissue; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; import com.epmet.dataaggre.dto.govissue.form.AllIssueFormDTO; import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO; @@ -45,4 +46,10 @@ public interface GovIssueService { List closedIssueList(ClosedIssueListFormDTO fromDTO); List selectShiftProjectIssueList(String customerId,String gridId,Integer pageNo,Integer pageSize); + + /** + * @Description 查询客户下一级分类信息 + * @author sun + **/ + List categoryList(String customerId); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java index 7b68d96332..db987e0b5c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.dataaggre.constant.DataSourceConstant; import com.epmet.dataaggre.constant.IssueConstant; import com.epmet.dataaggre.dao.govissue.IssueApplicationDao; import com.epmet.dataaggre.dao.govissue.IssueDao; +import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; import com.epmet.dataaggre.dto.govissue.form.AllIssueFormDTO; import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO; import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO; @@ -323,4 +324,13 @@ public class GovIssueServiceImpl implements GovIssueService { return issueDao.selectShiftProjectIssueList(customerId, gridId); } + /** + * @Description 查询客户下一级分类信息 + * @author sun + **/ + @Override + public List categoryList(String customerId) { + return issueDao.getCategoryList(customerId); + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java index 035e9d5400..41d6b64379 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java @@ -72,7 +72,7 @@ public interface GovProjectService { * @Description 赋能平台【项目分类分析】各分类项目数图表 * @author sun */ - ProjectCategoryTotalResultDTO projectCategoryList(ProjectCategoryTotalFormDTO formDTO); + List projectCategoryList(ProjectCategoryTotalFormDTO formDTO); /** * @Description 赋能平台【项目处理分析】分类下项目列表 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java index 9f594e6b70..ff484007b3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java @@ -12,6 +12,7 @@ import com.epmet.dataaggre.constant.ProjectConstant; import com.epmet.dataaggre.dao.govproject.ProjectDao; import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectMonthResultDTO; import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO; +import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; import com.epmet.dataaggre.dto.govproject.ProjectDTO; @@ -19,6 +20,7 @@ import com.epmet.dataaggre.dto.govproject.form.*; import com.epmet.dataaggre.dto.govproject.result.*; import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; import com.epmet.dataaggre.service.datastats.DataStatsService; +import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService; import com.epmet.dataaggre.service.govissue.GovIssueService; import com.epmet.dataaggre.service.govorg.GovOrgService; import com.epmet.dataaggre.service.govproject.GovProjectService; @@ -56,6 +58,8 @@ public class GovProjectServiceImpl implements GovProjectService { private ResiGroupService resiGroupService; @Autowired private DataStatsService dataStatsService; + @Autowired + private EvaluationIndexService evaluationIndexService; /** * @Description 查询项目信息 @@ -334,11 +338,32 @@ public class GovProjectServiceImpl implements GovProjectService { /** * @Description 赋能平台【项目分类分析】各分类项目数图表 - * @author sun +, * @author sun */ @Override - public ProjectCategoryTotalResultDTO projectCategoryList(ProjectCategoryTotalFormDTO formDTO) { - return null; + public List projectCategoryList(ProjectCategoryTotalFormDTO formDTO) { + List resultList = new ArrayList<>(); + //1.查询客户下一级分类信息 + List categoryList = govIssueService.categoryList(formDTO.getCustomerId()); + + //2.按dateId查询组织下一级分类项目总数 + List list = evaluationIndexService.projectCategoryList(formDTO); + + //3.封装数据并返回 + categoryList.forEach(ca -> { + ProjectCategoryTotalResultDTO dto = new ProjectCategoryTotalResultDTO(); + dto.setAgencyId(formDTO.getAgencyId()); + dto.setCategoryCode(ca.getCategoryCode()); + dto.setCategoryName(ca.getCategoryName()); + list.forEach(l -> { + if (ca.getCategoryCode().equals(l.getCategoryCode())) { + dto.setTotal(l.getTotal()); + } + }); + resultList.add(dto); + }); + + return resultList; } /** diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml index afa7e56c2d..117e6c537b 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml @@ -182,4 +182,17 @@ AND DEL_FLAG = 0 + + diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml index 185816c9bb..239e846aa9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml @@ -124,4 +124,16 @@ order by i.SHIFTED_TIME desc + + + \ No newline at end of file