From 513dd6fdef2b53faa02e3cad74aa9b307a6f2e3a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 May 2021 21:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactGridGovernDailyEntity.java | 41 +++++++++++- .../GovernGridClosedTotalCommonDTO.java | 64 +++++++++++++++++++ .../extract/ProjectInfoDTO.java | 15 +++++ .../impl/FactGridGovernDailyServiceImpl.java | 55 ++++++++++++++-- 4 files changed, 169 insertions(+), 6 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/ProjectInfoDTO.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java index ae45d7aa7d..22fa2b2b67 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java @@ -79,7 +79,22 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { */ private BigDecimal gridSelfGovernRatio; - /** + /** + * 界面展示:社区解决占比=COMMUNITY_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数 + */ + private BigDecimal communityClosedRatio; + + /** + * 界面展示:街道解决占比=STREET_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数 + */ + private BigDecimal streetClosedRatio; + + /** + * 界面展示:区直部门解决占比=DISTRICT_DEPT_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数 + */ + private BigDecimal districtDeptClosedRatio; + + /** * 1、当前网格内,话题关闭已解决数 */ private Integer topicResolvedCount; @@ -155,15 +170,36 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { private Integer gridSelfGovernProjectTotal; + /** + * 当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数 + */ + private Integer communityClosedCount; + + /** + * 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 + */ + private Integer streetClosedCount; + + /** + * 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 + */ + private Integer districtDeptClosedCount; + + public FactGridGovernDailyEntity() { this.customerId = StrConstant.EPMETY_STR; this.dateId = StrConstant.EPMETY_STR; this.gridId = StrConstant.EPMETY_STR; this.pid = StrConstant.EPMETY_STR; this.pids = StrConstant.EPMETY_STR; + //界面展示 this.problemResolvedCount = NumConstant.ZERO; this.groupSelfGovernRatio=BigDecimal.ZERO; this.gridSelfGovernProjectTotal=NumConstant.ZERO; + this.communityClosedRatio=BigDecimal.ZERO; + this.streetClosedRatio=BigDecimal.ZERO; + this.districtDeptClosedRatio=BigDecimal.ZERO; + this.topicResolvedCount=NumConstant.ZERO; this.topicUnResolvedCount=NumConstant.ZERO; this.issueResolvedCount=NumConstant.ZERO; @@ -179,5 +215,8 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { this.fromAgencyResolvedInGridCount=NumConstant.ZERO; this.fromAgencyUnResolvedInGridCount=NumConstant.ZERO; this.gridSelfGovernProjectTotal=NumConstant.ZERO; + this.communityClosedCount=NumConstant.ZERO; + this.streetClosedCount=NumConstant.ZERO; + this.districtDeptClosedCount=NumConstant.ZERO; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java new file mode 100644 index 0000000000..fcc4193885 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java @@ -0,0 +1,64 @@ +package com.epmet.entity.evaluationindex.extract; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/5/26 15:47 + */ +@Data +public class GovernGridClosedTotalCommonDTO implements Serializable { + private static final long serialVersionUID = 7717094992132062415L; + private String gridId; + /** + * 11、来源于议题的项目,未出网格结案并且已解决的项目数 + */ + private Integer fromIssueResolvedInGridCount; + + /** + * 12、来源于议题的项目,未出网格结案并且无需解决的项目数 + */ + private Integer fromIssueUnResolvedInGridCount; + + /** + * 13、来源于项目立项的项目,未出网格结案,并且已解决的项目数;因现在网格不能立项,所以此列默认为0 + */ + private Integer fromAgencyResolvedInGridCount; + + /** + * 14、来源于项目立项的项目,未出网格结案,并且无需解决的项目数;因现在网格不能立项,所以此列默认为0 + */ + private Integer fromAgencyUnResolvedInGridCount; + + /** + * 当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数 + */ + private Integer communityClosedCount; + + /** + * 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 + */ + private Integer streetClosedCount; + + /** + * 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 + */ + private Integer districtDeptClosedCount; + + public GovernGridClosedTotalCommonDTO(){ + this.gridId = StrConstant.EPMETY_STR; + this.fromIssueResolvedInGridCount=NumConstant.ZERO; + this.fromIssueUnResolvedInGridCount=NumConstant.ZERO; + this.fromAgencyResolvedInGridCount=NumConstant.ZERO; + this.fromAgencyUnResolvedInGridCount=NumConstant.ZERO; + this.communityClosedCount=NumConstant.ZERO; + this.streetClosedCount=NumConstant.ZERO; + this.districtDeptClosedCount=NumConstant.ZERO; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/ProjectInfoDTO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/ProjectInfoDTO.java new file mode 100644 index 0000000000..0b1eb1af59 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/ProjectInfoDTO.java @@ -0,0 +1,15 @@ +package com.epmet.entity.evaluationindex.extract; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/5/26 18:00 + */ +@Data +public class ProjectInfoDTO implements Serializable { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java index 4f5483e7b4..84c4addeea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java @@ -24,6 +24,7 @@ import com.epmet.constant.ProjectConstant; import com.epmet.dao.evaluationindex.extract.FactGridGovernDailyDao; import com.epmet.dto.org.GridInfoDTO; import com.epmet.entity.evaluationindex.extract.FactGridGovernDailyEntity; +import com.epmet.entity.evaluationindex.extract.GovernGridClosedTotalCommonDTO; import com.epmet.entity.evaluationindex.extract.GovernGridTotalCommonDTO; import com.epmet.service.evaluationindex.extract.todata.FactGridGovernDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService; @@ -42,6 +43,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 网格的治理指数,按天统计 @@ -86,6 +88,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl gridIds=gridInfoDTOList.stream().map(GridInfoDTO::getGridId).collect(Collectors.toList()); List insertEntityList=this.constructFactGridGovernDailyEntityList(customerId,dateId,gridInfoDTOList); // log.info(JSON.toJSONString(insertEntityList,true)); @@ -102,7 +105,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl approvalProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.UNRESOLVED); Map inGroupTopicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ONE_STR); Map inGroupTopicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ONE_STR); - + Map dtoMap=getGovernGridClosedTotalCommonDTOMap(customerId,gridIds); for(FactGridGovernDailyEntity insertEntity:insertEntityList){ //1、当前网格内,话题关闭已解决数 @@ -154,18 +157,24 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl getGovernGridClosedTotalCommonDTOMap(String customerId, List gridIds) { + Map resultMap=new HashMap<>(); + for(String gridId:gridIds){ + + } + return resultMap; + } + /** * 构造要插入的数据,每个网格一天一条数据,初始赋值0 *