diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
index a7da3d564b..b3083d658e 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
@@ -7,4 +7,8 @@ package com.epmet.dataaggre.constant;
public interface OrgConstant {
String AGENCY = "agency";
String GRID = "grid";
+ String PROVINCE = "province";
+ String CITY = "city";
+ String DISTRICT = "district";
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
index 82315c125f..14bfa2c51b 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
@@ -33,6 +33,14 @@ public class AgencyGovrnFormDTO implements Serializable {
* 街道解决占比:street
*/
private String type;
+ /**
+ * 组织级别
+ */
+ private String level;
+ /**
+ * 组织地区码
+ */
+ private String areaCode;
public interface Agency extends CustomerClientShowGroup {}
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
index 7e5407a8ef..d760cd834f 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
@@ -28,6 +28,8 @@ public class GovrnRatioFormDTO implements Serializable {
* 日维度Id[日期,不传值默认查前一天的【格式:20210101】]
*/
private String dateId;
+ private String areaCode;
+ private String level;
public interface AgencyGrid extends CustomerClientShowGroup {}
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java
new file mode 100644
index 0000000000..6542b8eb1c
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java
@@ -0,0 +1,161 @@
+/**
+ * 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.evaluationindex;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 基层治理-治理能力排行数据(按月统计)
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+@Data
+public class ScreenGovernRankDataDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID 主键
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 年Id
+ */
+ private String yearId;
+
+ /**
+ * 月份Id
+ */
+ private String monthId;
+
+ /**
+ * 数据更新至:yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 组织类别 agency:组织;部门:department;网格:grid
+ */
+ private String orgType;
+
+ /**
+ * 组织Id 可以为网格,机关id
+ */
+ private String orgId;
+
+ /**
+ * 上级组织Id
+ */
+ private String parentId;
+
+ /**
+ * 组织名称
+ */
+ private String orgName;
+
+ /**
+ * 响应率
+ */
+ private BigDecimal responseRatio;
+
+ /**
+ * 解决率
+ */
+ private BigDecimal resolvedRatio;
+
+ /**
+ * 自治率
+ */
+ private BigDecimal governRatio;
+
+ /**
+ * 满意率
+ */
+ private BigDecimal satisfactionRatio;
+
+ /**
+ * 响应数
+ */
+ private Integer responseCount;
+ /**
+ * 项目转入次数
+ */
+ private Integer transferCount;
+ /**
+ * 解决项目数
+ */
+ private Integer resolvedCount;
+ /**
+ * 已关闭项目数
+ */
+ private Integer closedCount;
+ /**
+ * 自治项目数
+ */
+ private Integer governCount;
+ /**
+ * 满意项目数
+ */
+ private Integer satisfactionCount;
+ /**
+ * 已关闭项目(由议题转的项目)数
+ */
+ private Integer closedProjectCount;
+
+ /**
+ * 删除标识 0未删除;1已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
index 5b6ba190ef..d157058b2e 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
@@ -25,6 +25,7 @@ import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.DimGridEntity;
+import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -242,4 +243,14 @@ public interface DataStatsDao {
* @author sun
*/
List getGridGovern(@Param("gridIds") List gridIds, @Param("dateId") String dateId);
+
+ /**
+ * 根据组织Id查询事件治理指数
+ * @author zhaoqifeng
+ * @date 2021/6/25 15:08
+ * @param agencyIds
+ * @param dateId
+ * @return com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity
+ */
+ List getAgencyGovernDaily(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
}
\ No newline at end of file
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 3391ee5fee..392ec5991a 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
@@ -20,6 +20,7 @@ package com.epmet.dataaggre.dao.evaluationindex;
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 org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -56,4 +57,14 @@ public interface EvaluationIndexDao {
* @author sun
*/
List getSubGridList(@Param("agencyId") String agencyId);
+
+ /**
+ * 根据组织Id查询治理指数
+ * @author zhaoqifeng
+ * @date 2021/6/25 16:36
+ * @param agencyIds
+ * @param dateId
+ * @return java.util.List
+ */
+ ScreenGovernRankDataDailyDTO getGovernRankList(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
new file mode 100644
index 0000000000..d709731f77
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
@@ -0,0 +1,174 @@
+/**
+ * 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.entity.datastats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 组织的治理指数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_agency_govern_daily")
+public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至:yyyyMMdd;
+ */
+ private String dateId;
+
+ /**
+ * 组织id
+ */
+ private String agencyId;
+
+ /**
+ * agency_id所属的机关级别(社区级:community,
+乡(镇、街道)级:street,
+区县级: district,
+市级: city
+省级:province)
+ */
+ private String level;
+
+ /**
+ * 组织i所属的组织id
+ */
+ private String pid;
+
+ /**
+ * 组织i所有上级id
+ */
+ private String pids;
+
+ /**
+ * 界面展示:问题解决总数=1+2+3+4+5+6+7+8
+ */
+ private Integer problemResolvedCount;
+
+ /**
+ * 界面展示:党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数
+ */
+ private BigDecimal groupSelfGovernRatio;
+
+ /**
+ * 界面展示:网格自治占比=GRID_SELF_GOVERN_PROJECT_TOTAL/PROBLEM_RESOLVED_COUNT;此列存储的是小数
+ */
+ 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;
+
+ /**
+ * 2、当前组织内,话题关闭无需解决数
+ */
+ private Integer topicUnResolvedCount;
+
+ /**
+ * 3、当前组织内,议题关闭已解决数
+ */
+ private Integer issueResolvedCount;
+
+ /**
+ * 4、当前组织内,议题关闭无需解决数
+ */
+ private Integer issueUnResolvedCount;
+
+ /**
+ * 5、当前组织内:来源于议题的项目:结案已解决数
+ */
+ private Integer issueProjectResolvedCount;
+
+ /**
+ * 6、当前组织内:来源于议题的项目:结案无需解决数
+ */
+ private Integer issueProjectUnResolvedCount;
+
+ /**
+ * 7、当前组织内:项目立项,结案已解决数;默认为0,
+ */
+ private Integer approvalProjectResolvedCount;
+
+ /**
+ * 8、当前组织内:项目立项,结案无需解决数;默认为0,
+ */
+ private Integer approvalProjectUnResolvedCount;
+
+ /**
+ * 9、当前组织内,未出小组即未转议题的:话题关闭已解决数
+ */
+ private Integer inGroupTopicResolvedCount;
+
+ /**
+ * 10、当前组织内,未出小组即未转议题的:话题关闭无需解决数
+ */
+ private Integer inGroupTopicUnResolvedCount;
+
+ /**
+ * 未出当前网格的,结案项目数
+ */
+ private Integer gridSelfGovernProjectTotal;
+
+ /**
+ * 当前组织内结案的项目中:由社区结案的项目总数
+ */
+ private Integer communityClosedCount;
+
+ /**
+ * 当前组织内结案的项目中:由街道结案的项目总数
+ */
+ private Integer streetClosedCount;
+
+ /**
+ * 当前组织内结案的项目中:由区直部门结案的项目总数
+ */
+ private Integer districtDeptClosedCount;
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
index 9f2d0ca357..fd3115d370 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
@@ -11,10 +11,12 @@ import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
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.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.DimGridEntity;
+import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import lombok.extern.slf4j.Slf4j;
@@ -1105,6 +1107,7 @@ public class DataStatsServiceImpl implements DataStatsService {
public AgencyGovrnResultDTO agencyGovrn(AgencyGovrnFormDTO formDTO) {
AgencyGovrnResultDTO resultDTO = new AgencyGovrnResultDTO();
resultDTO.setAgencyId(formDTO.getAgencyId());
+ resultDTO.setLevel(formDTO.getLevel());
NumberFormat numberFormat = NumberFormat.getInstance();
numberFormat.setMaximumFractionDigits(NumConstant.THREE);
@@ -1114,6 +1117,42 @@ public class DataStatsServiceImpl implements DataStatsService {
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setDateId(format.format(yesterday));
}
+ if (OrgConstant.PROVINCE.equals(formDTO.getLevel()) || OrgConstant.CITY.equals(formDTO.getLevel()) || OrgConstant.DISTRICT.equals(formDTO.getLevel())) {
+ if (StringUtils.isNotBlank(formDTO.getAreaCode())) {
+
+ List subAgencyIds = indexService.getAgencyByAreaCodeAgencyId(formDTO.getAgencyId(), formDTO.getAreaCode());
+ if (CollectionUtils.isEmpty(subAgencyIds)) {
+ subAgencyIds = new ArrayList<>();
+ }
+ subAgencyIds.add(formDTO.getAgencyId());
+ List list = dataStatsDao.getAgencyGovernDaily(subAgencyIds, formDTO.getDateId());
+ if (CollectionUtils.isNotEmpty(list)) {
+ //问题解决总数
+ Integer problemResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getProblemResolvedCount).sum();
+ //未出小组即未转议题的:话题关闭已解决数
+ Integer inGroupTopicResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getInGroupTopicResolvedCount).sum();
+ //未出小组即未转议题的:话题关闭无需解决数
+ Integer inGroupTopicUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getInGroupTopicUnResolvedCount).sum();
+ //未出当前网格的,结案项目数
+ Integer gridSelfGovernProjectTotal = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getGridSelfGovernProjectTotal).sum();
+ //由社区结案的项目总数
+ Integer communityClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getCommunityClosedCount).sum();
+ //由街道结案的项目总数
+ Integer streetClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getStreetClosedCount).sum();
+ //由区直部门结案的项目总数
+ Integer districtDeptClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity ::getDistrictDeptClosedCount).sum();
+
+ resultDTO.setProblemResolvedCount(problemResolvedCount);
+ resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount));
+ resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, problemResolvedCount));
+ resultDTO.setCommunityResolvedRatio(getPercentage(communityClosedCount, problemResolvedCount));
+ resultDTO.setStreetResolvedRatio(getPercentage(streetClosedCount, problemResolvedCount));
+ resultDTO.setDistrictDeptResolvedRatio(getPercentage(districtDeptClosedCount, problemResolvedCount));
+
+ return resultDTO;
+ }
+ }
+ }
//1.按日期查询当前组织事件治理指数
List agencyIds = new ArrayList<>();
agencyIds.add(formDTO.getAgencyId());
@@ -1152,6 +1191,17 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultList;
}
List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ if (StringUtils.isNotBlank(formDTO.getAreaCode())) {
+ List subAgencies = indexService.getSubAgencyList(formDTO.getAgencyId(), formDTO.getAreaCode());
+ agencyIds = subAgencies.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
+ subAgencyList = subAgencies.stream().map(item -> {
+ DimAgencyEntity entity = new DimAgencyEntity();
+ entity.setId(item.getAgencyId());
+ entity.setAgencyName(item.getAgencyName());
+ entity.setLevel(item.getLevel());
+ return entity;
+ }).collect(Collectors.toList());
+ }
//2.按日期查询所有下级组织的事件治理指数
List list = dataStatsDao.getAgencyGovern(agencyIds, formDTO.getDateId());
@@ -1318,6 +1368,17 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setDateId(format.format(yesterday));
}
+ if (OrgConstant.PROVINCE.equals(formDTO.getLevel()) || OrgConstant.CITY.equals(formDTO.getLevel()) || OrgConstant.DISTRICT.equals(formDTO.getLevel())) {
+ if (StringUtils.isNotBlank(formDTO.getAreaCode())) {
+ ScreenGovernRankDataDailyDTO governData = indexService.getGovernRank(formDTO.getOrgId(), formDTO.getAreaCode(), formDTO.getDateId());
+ resultDTO.setGovernRatio(getPercentage(governData.getGovernCount(), governData.getClosedCount()));
+ resultDTO.setResolvedRatio(getPercentage(governData.getResolvedCount(), governData.getClosedCount()));
+ resultDTO.setResponseRatio(getPercentage(governData.getResponseCount(), governData.getTransferCount()));
+ resultDTO.setSatisfactionRatio(getPercentage(governData.getSatisfactionCount(), governData.getClosedProjectCount()));
+ return resultDTO;
+ }
+ }
+
//1.按类型、日期查询治理指数下响应解决满意自治四个统计率
GovrnRatioResultDTO dto = indexService.governRatio(formDTO);
if (null != dto) {
@@ -1329,4 +1390,15 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultDTO;
}
+ private String getPercentage(Integer countInt, Integer totalInt) {
+ if (NumConstant.ZERO == totalInt) {
+ return "0%";
+ }
+ BigDecimal count = new BigDecimal(countInt);
+ BigDecimal total = new BigDecimal(totalInt);
+ BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED);
+ BigDecimal ratio = count.multiply(hundred).divide(total, NumConstant.ONE, RoundingMode.HALF_UP);
+ return ratio.toString().concat("%");
+ }
+
}
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 cb5e1fb553..fe6fef6bfc 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
@@ -4,6 +4,7 @@ import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
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 java.util.List;
@@ -37,4 +38,15 @@ public interface EvaluationIndexService {
* @author sun
*/
List getSubGridList(String agencyId);
+
+ /**
+ * 根据组织ID获取治理指数
+ * @author zhaoqifeng
+ * @date 2021/6/25 16:33
+ * @param agencyId
+ * @param areaCode
+ * @param dateId
+ * @return java.util.List
+ */
+ ScreenGovernRankDataDailyDTO getGovernRank(String agencyId, String areaCode, String dateId);
}
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 cfe929ee26..96c86d7d53 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
@@ -9,13 +9,16 @@ import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
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.service.evaluationindex.EvaluationIndexService;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -67,4 +70,24 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
return evaluationIndexDao.getSubGridList(agencyId);
}
+ /**
+ * 根据组织ID获取治理指数
+ *
+ * @param agencyId
+ * @param areaCode
+ * @param dateId
+ * @return java.util.List
+ * @author zhaoqifeng
+ * @date 2021/6/25 16:33
+ */
+ @Override
+ public ScreenGovernRankDataDailyDTO getGovernRank(String agencyId, String areaCode, String dateId) {
+ List agencyIdList = getAgencyByAreaCodeAgencyId(agencyId, areaCode);
+ if (CollectionUtils.isEmpty(agencyIdList)) {
+ agencyIdList = new ArrayList<>();
+ }
+ agencyIdList.add(agencyId);
+ return evaluationIndexDao.getGovernRankList(agencyIdList, dateId);
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
index 1178ae153b..204b82442e 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
@@ -660,5 +660,30 @@
ORDER BY problem_resolved_count DESC
+
+ SELECT
+ AGENCY_ID,
+ `LEVEL`,
+ PROBLEM_RESOLVED_COUNT,
+ GROUP_SELF_GOVERN_RATIO,
+ GRID_SELF_GOVERN_RATIO,
+ COMMUNITY_CLOSED_RATIO,
+ STREET_CLOSED_RATIO,
+ DISTRICT_DEPT_CLOSED_RATIO,
+ IN_GROUP_TOPIC_RESOLVED_COUNT,
+ IN_GROUP_TOPIC_UN_RESOLVED_COUNT,
+ GRID_SELF_GOVERN_PROJECT_TOTAL,
+ COMMUNITY_CLOSED_COUNT,
+ STREET_CLOSED_COUNT,
+ DISTRICT_DEPT_CLOSED_COUNT
+ FROM
+ fact_grid_govern_daily
+ WHERE
+ DEL_FLAG = '0'
+ AND DATE_ID = #{dateId}
+
+ AGENCY_ID = #{agencyId}
+
+
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 c3a5c39d6a..af8d39f643 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
@@ -77,5 +77,24 @@
del_flag = '0'
AND parent_agency_id = #{agencyId}
+
+ SELECT
+ SUM(RESPONSE_COUNT) AS responseCount,
+ SUM(TRANSFER_COUNT) AS transferCount,
+ SUM(RESOLVED_COUNT) AS resolvedCount,
+ SUM(CLOSED_COUNT) AS closedCount,
+ SUM(GOVERN_COUNT) AS governCount,
+ SUM(SATISFACTION_PROJECT_COUNT) AS satisfactionProjectCount,
+ SUM(CLOSED_PROJECT_COUNT) AS closedProjectCount
+ FROM
+ screen_govern_rank_data_daily
+ WHERE
+ DEL_FLAG = '0'
+
+ ORG_ID = #{agencyId}
+
+ AND ORG_TYPE = 'agency'
+ AND DATE_ID = #{dateId}
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyGroupTotalFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyGroupTotalFormDTO.java
index 0c47f9dfac..76f12be516 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyGroupTotalFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyGroupTotalFormDTO.java
@@ -52,37 +52,37 @@ public class AgencyGroupTotalFormDTO implements Serializable {
/**
* 周ID
*/
- private String weekId;
+ private String weekId = "";
/**
* 月份ID
*/
- private String monthId;
+ private String monthId = "";
/**
* 季度ID
*/
- private String quarterId;
+ private String quarterId = "";
/**
* 年ID
*/
- private String yearId;
+ private String yearId = "";
/**
* 当前组织及下级小组总数
*/
- private Integer groupTotal;
+ private Integer groupTotal = 0;
/**
* 当前组织及下级楼院小组总数
*/
- private Integer ordinaryTotal;
+ private Integer ordinaryTotal = 0;
/**
* 当前组织及下级支部小组总数
*/
- private Integer branchTotal;
+ private Integer branchTotal = 0;
}
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyHotTopicFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyHotTopicFormDTO.java
index 865d118b89..6583407543 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyHotTopicFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyHotTopicFormDTO.java
@@ -52,37 +52,37 @@ public class AgencyHotTopicFormDTO implements Serializable {
/**
* 周ID
*/
- private String weekId;
+ private String weekId = "";
/**
* 月ID
*/
- private String monthId;
+ private String monthId = "";
/**
* 季度ID
*/
- private String quarterId;
+ private String quarterId = "";
/**
* 年ID
*/
- private String yearId;
+ private String yearId = "";
/**
* 话题总数
*/
- private Integer topicTotal;
+ private Integer topicTotal = 0;
/**
* 话题状态【热议中:hot_discuss】
*/
- private String status;
+ private String status = "";
/**
* 状态话题数量
*/
- private Integer topicCount;
+ private Integer topicCount = 0;
}
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyRegUserFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyRegUserFormDTO.java
index c488150a62..d6a3063eeb 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyRegUserFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyRegUserFormDTO.java
@@ -29,7 +29,7 @@ public class AgencyRegUserFormDTO implements Serializable {
@Data
public static class DataList {
-
+ BigDecimal bi = new BigDecimal(0);
/**
* 客户id
*/
@@ -48,62 +48,62 @@ public class AgencyRegUserFormDTO implements Serializable {
/**
*
*/
- private String weekId;
+ private String weekId = "";
/**
*
*/
- private String yearId;
+ private String yearId = "";
/**
* 注册用户总数
*/
- private Integer regTotal;
+ private Integer regTotal = 0;
/**
* 居民总数
*/
- private Integer resiTotal;
+ private Integer resiTotal = 0;
/**
* 热心居民总数
*/
- private Integer warmHeartedTotal;
+ private Integer warmHeartedTotal = 0;
/**
* 党员总数
*/
- private Integer partymemberTotal;
+ private Integer partymemberTotal = 0;
/**
* 本日注册居民日增量
*/
- private Integer regIncr;
+ private Integer regIncr = 0;
/**
* 本日热心居民日增量
*/
- private Integer warmIncr;
+ private Integer warmIncr = 0;
/**
* 本日党员认证日增量
*/
- private Integer partymemberIncr;
+ private Integer partymemberIncr = 0;
/**
* 居民总数占比
*/
- private BigDecimal resiProportion;
+ private BigDecimal resiProportion = bi;
/**
* 党员总数占比
*/
- private BigDecimal partymemberProportion;
+ private BigDecimal partymemberProportion = bi;
/**
* 热心居民占比
*/
- private BigDecimal warmHeartedProportion;
+ private BigDecimal warmHeartedProportion = bi;
}
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java
index 6de6fd913f..046b947bec 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java
@@ -1,7 +1,9 @@
package com.epmet.dto.basereport.form;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
+import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
@@ -13,6 +15,8 @@ import java.util.List;
public class AgencyTopicIssueFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
+ public interface AgencyTopicIssueForm extends CustomerClientShowGroup{}
+
/**
* 为true时需要删除历史数据
*/
@@ -20,11 +24,11 @@ public class AgencyTopicIssueFormDTO implements Serializable {
/**
* 数据集合对象
*/
+ @NotEmpty(message = "数据集合对象不能为空",groups = AgencyTopicIssueForm.class)
private List dataList;
@Data
- public class DataList implements Serializable {
- private static final long serialVersionUID = 1L;
+ public static class DataList{
/**
* 客户Id
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java
index db7b9f4942..6bb5eac899 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java
@@ -1,7 +1,9 @@
package com.epmet.dto.basereport.form;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
+import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -14,6 +16,8 @@ import java.util.List;
public class AgencyTopicStatusFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
+ public interface AgencyTopicStatusForm extends CustomerClientShowGroup{}
+
/**
* 为true时需要删除历史数据
*/
@@ -21,11 +25,11 @@ public class AgencyTopicStatusFormDTO implements Serializable {
/**
* 数据集合对象
*/
+ @NotEmpty(message = "数据集合对象不能为空",groups = AgencyTopicStatusForm.class)
private List dataList;
@Data
- public class DataList implements Serializable {
- private static final long serialVersionUID = 1L;
+ public static class DataList {
/**
* 客户Id
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridGroupTotalFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridGroupTotalFormDTO.java
index 506f8a9797..8fb2dc7e25 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridGroupTotalFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridGroupTotalFormDTO.java
@@ -52,37 +52,37 @@ public class GridGroupTotalFormDTO implements Serializable {
/**
* 周ID
*/
- private String weekId;
+ private String weekId = "";
/**
* 月份ID
*/
- private String monthId;
+ private String monthId = "";
/**
* 季度ID
*/
- private String quarterId;
+ private String quarterId = "";
/**
* 年ID
*/
- private String yearId;
+ private String yearId = "";
/**
* 网格下小组总数
*/
- private Integer groupTotal;
+ private Integer groupTotal = 0;
/**
* 网格下楼院小组总数
*/
- private Integer ordinaryTotal;
+ private Integer ordinaryTotal = 0;
/**
* 网格下支部小组总数
*/
- private Integer branchTotal;
+ private Integer branchTotal = 0;
}
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridHotTopicFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridHotTopicFormDTO.java
index a46847f10b..3fd04fa2f6 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridHotTopicFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridHotTopicFormDTO.java
@@ -52,37 +52,37 @@ public class GridHotTopicFormDTO implements Serializable {
/**
* 周ID
*/
- private String weekId;
+ private String weekId = "";
/**
* 月ID
*/
- private String monthId;
+ private String monthId = "";
/**
* 季度ID
*/
- private String quarterId;
+ private String quarterId = "";
/**
* 年ID
*/
- private String yearId;
+ private String yearId = "";
/**
* 话题总数
*/
- private Integer topicTotal;
+ private Integer topicTotal = 0;
/**
* 话题状态【热议中:hot_discuss】
*/
- private String status;
+ private String status = "";
/**
* 状态话题数量
*/
- private Integer topicCount;
+ private Integer topicCount = 0;
}
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java
index 5c6d2621a4..4fd03e434b 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java
@@ -1,7 +1,9 @@
package com.epmet.dto.basereport.form;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
+import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -14,6 +16,8 @@ import java.util.List;
public class GridIssueFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
+ public interface GridIssueForm extends CustomerClientShowGroup{}
+
/**
* 为true时需要删除历史数据
*/
@@ -21,11 +25,11 @@ public class GridIssueFormDTO implements Serializable {
/**
* 数据集合对象
*/
+ @NotEmpty(message = "数据集合对象不能为空",groups = GridIssueForm.class)
private List dataList;
@Data
- public class DataList implements Serializable {
- private static final long serialVersionUID = 1L;
+ public static class DataList{
/**
* 客户ID
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridRegUserFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridRegUserFormDTO.java
index 0885763751..e2b85792ea 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridRegUserFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridRegUserFormDTO.java
@@ -30,7 +30,7 @@ public class GridRegUserFormDTO implements Serializable {
@Data
public static class DataList {
-
+ BigDecimal bi = new BigDecimal(0);
/**
* 客户id
*/
@@ -54,62 +54,62 @@ public class GridRegUserFormDTO implements Serializable {
/**
* 周维度Id
*/
- private String weekId;
+ private String weekId = "";
/**
* 年维度Id
*/
- private String yearId;
+ private String yearId = "";
/**
* 注册用户总数
*/
- private Integer regTotal;
+ private Integer regTotal = 0;
/**
* 居民总数
*/
- private Integer resiTotal;
+ private Integer resiTotal = 0;
/**
* 热心居民总数
*/
- private Integer warmHeartedTotal;
+ private Integer warmHeartedTotal = 0;
/**
* 党员总数
*/
- private Integer partymemberTotal;
+ private Integer partymemberTotal = 0;
/**
* 本日注册居民日增量
*/
- private Integer regIncr;
+ private Integer regIncr = 0;
/**
* 本日热心居民日增量
*/
- private Integer warmIncr;
+ private Integer warmIncr = 0;
/**
* 本日党员认证日增量
*/
- private Integer partymemberIncr;
+ private Integer partymemberIncr = 0;
/**
* 居民总数占比
*/
- private BigDecimal resiProportion;
+ private BigDecimal resiProportion = bi;
/**
* 党员总数占比
*/
- private BigDecimal partymemberProportion;
+ private BigDecimal partymemberProportion = bi;
/**
* 热心居民占比
*/
- private BigDecimal warmHeartedProportion;
+ private BigDecimal warmHeartedProportion = bi;
}
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java
index a0f9b4eefd..bd40463640 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java
@@ -1,7 +1,9 @@
package com.epmet.dto.basereport.form;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
+import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -14,6 +16,8 @@ import java.util.List;
public class GridTopicIssueFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
+ public interface GridTopicIssueForm extends CustomerClientShowGroup{}
+
/**
* 为true时需要删除历史数据
*/
@@ -21,11 +25,11 @@ public class GridTopicIssueFormDTO implements Serializable {
/**
* 数据集合对象
*/
+ @NotEmpty(message = "数据集合对象不能为空",groups = GridTopicIssueForm.class)
private List dataList;
@Data
- public class DataList implements Serializable {
- private static final long serialVersionUID = 1L;
+ public static class DataList{
/**
* 客户Id
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java
index 4e19bc1125..519ea28a37 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java
@@ -1,7 +1,9 @@
package com.epmet.dto.basereport.form;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
+import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -14,6 +16,8 @@ import java.util.List;
public class GridTopicStatusFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
+ public interface GridTopicStatusForm extends CustomerClientShowGroup{}
+
/**
* 为true时需要删除历史数据
*/
@@ -21,11 +25,11 @@ public class GridTopicStatusFormDTO implements Serializable {
/**
* 数据集合对象
*/
+ @NotEmpty(message = "数据集合对象不能为空",groups = GridTopicStatusForm.class)
private List dataList;
@Data
- public class DataList implements Serializable {
- private static final long serialVersionUID = 1L;
+ public static class DataList{
/**
* 客户Id
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java
index 1db8161221..f8990a9a8f 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java
@@ -94,64 +94,75 @@ public class BaseReportController {
}
/**
+ * @Description 网格状态话题数据-008
* @Param formDTO
- * @Description 网格状态话题数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 3:09 下午
*/
@PostMapping("gridtopicstatus")
public Result gridTopicStatus(@RequestBody GridTopicStatusFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, GridTopicStatusFormDTO.GridTopicStatusForm.class);
baseReportService.gridTopicStatus(formDTO);
return new Result();
}
/**
+ * @Description 组织状态话题数据-007
* @Param formDTO
- * @Description 组织状态话题数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 3:09 下午
*/
@PostMapping("agencytopicstatus")
public Result agencyTopicStatus(@RequestBody AgencyTopicStatusFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, AgencyTopicStatusFormDTO.AgencyTopicStatusForm.class);
baseReportService.agencyTopicStatus(formDTO);
return new Result();
}
/**
+ * @Description 网格话题转议题数据-006
* @Param formDTO
- * @Description 网格话题转议题数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 1:51 下午
*/
@PostMapping("gridtopicissue")
public Result gridTopicIssue(@RequestBody GridTopicIssueFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, GridTopicIssueFormDTO.GridTopicIssueForm.class);
baseReportService.gridTopicIssue(formDTO);
return new Result();
}
/**
+ * @Description 组织话题转议题数据-005
* @Param formDTO
- * @Description 组织话题转议题数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 1:50 下午
*/
@PostMapping("agencytopicissue")
public Result agencyTopicIssue(@RequestBody AgencyTopicIssueFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, AgencyTopicIssueFormDTO.AgencyTopicIssueForm.class);
baseReportService.agencyTopicIssue(formDTO);
return new Result();
}
/**
+ * @Description 网格议题数据-004
* @Param formDTO
- * @Description 网格议题数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 1:50 下午
*/
@PostMapping("gridissue")
public Result gridIssue(@RequestBody GridIssueFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, GridIssueFormDTO.GridIssueForm.class);
baseReportService.gridIssue(formDTO);
return new Result();
}
/**
+ * @Description 组织议题数据-003
* @Param formDTO
- * @Description 组织议题数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 1:50 下午
*/
@PostMapping("agencyissue")
public Result agencyIssue(@RequestBody AgencyIssueFormDTO formDTO) {
@@ -161,9 +172,10 @@ public class BaseReportController {
}
/**
+ * @Description 网格项目数据-002
* @Param formDTO
- * @Description 网格项目数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 1:50 下午
*/
@PostMapping("gridproject")
public Result gridProject(@RequestBody GridProjectFormDTO formDTO) {
@@ -173,9 +185,10 @@ public class BaseReportController {
}
/**
+ * @Description 组织项目数据-001
* @Param formDTO
- * @Description 组织项目数据
- * @author sun
+ * @author zxc
+ * @date 2021/6/25 1:50 下午
*/
@PostMapping("agencyproject")
public Result agencyProject(@RequestBody AgencyProjectFormDTO formDTO) {
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java
index bb9b5a2c9d..66a80a58fe 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java
@@ -138,4 +138,90 @@ public interface BaseReportDao {
* @date 2021/6/25 10:54 上午
*/
void insertAgencyIssue(@Param("list")List dataList);
+
+ /**
+ * @Description 删除网格议题数据
+ * @Param customerId
+ * @Param dateId
+ * @author zxc
+ * @date 2021/6/25 2:00 下午
+ */
+ int delGridIssue(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * @Description 新增网格议题数据
+ * @Param dataList
+ * @author zxc
+ * @date 2021/6/25 2:00 下午
+ */
+ void insertGridIssue(@Param("list")List dataList);
+
+ /**
+ * @Description 删除组织话题转议题数据
+ * @Param customerId
+ * @Param dateId
+ * @author zxc
+ * @date 2021/6/25 2:13 下午
+ */
+ int delAgencyTopicIssue(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * @Description 新增组织话题转议题数据
+ * @Param dataList
+ * @author zxc
+ * @date 2021/6/25 2:14 下午
+ */
+ void insertAgencyTopicIssue(@Param("list")List dataList);
+
+ /**
+ * @Description 删除网格话题转议题数据
+ * @Param customerId
+ * @Param dateId
+ * @author zxc
+ * @date 2021/6/25 2:41 下午
+ */
+ int delGridTopicIssue(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * @Description 新增网格话题转议题数据
+ * @Param dataList
+ * @author zxc
+ * @date 2021/6/25 2:41 下午
+ */
+ void insertGridTopicIssue(@Param("list")List dataList);
+
+ /**
+ * @Description 删除组织状态话题数据
+ * @Param customerId
+ * @Param dateId
+ * @author zxc
+ * @date 2021/6/25 3:17 下午
+ */
+ int delAgencyTopicStatus(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * @Description 增加组织状态话题数据
+ * @Param dataList
+ * @author zxc
+ * @date 2021/6/25 3:18 下午
+ */
+ void insertAgencyTopicStatus(@Param("list")List dataList);
+
+ /**
+ * @Description 删除网格状态话题数据
+ * @Param customerId
+ * @Param dateId
+ * @author zxc
+ * @date 2021/6/25 3:30 下午
+ */
+ int delGridTopicStatus(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * @Description 增加网格状态话题数据
+ * @Param dataList
+ * @author zxc
+ * @date 2021/6/25 3:30 下午
+ */
+ void insertGridTopicStatus(@Param("list")List dataList);
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java
index b1bf097f58..50b5f3579d 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java
@@ -53,56 +53,56 @@ public interface BaseReportService {
/**
* @Param formDTO
- * @Description 网格状态话题数据
+ * @Description 网格状态话题数据-008
* @author sun
*/
void gridTopicStatus(GridTopicStatusFormDTO formDTO);
/**
* @Param formDTO
- * @Description 组织状态话题数据
+ * @Description 组织状态话题数据-007
* @author sun
*/
void agencyTopicStatus(AgencyTopicStatusFormDTO formDTO);
/**
* @Param formDTO
- * @Description 网格话题转议题数据
+ * @Description 网格话题转议题数据-006
* @author sun
*/
void gridTopicIssue(GridTopicIssueFormDTO formDTO);
/**
* @Param formDTO
- * @Description 组织话题转议题数据
+ * @Description 组织话题转议题数据-005
* @author sun
*/
void agencyTopicIssue(AgencyTopicIssueFormDTO formDTO);
/**
* @Param formDTO
- * @Description 网格议题数据
+ * @Description 网格议题数据-004
* @author sun
*/
void gridIssue(GridIssueFormDTO formDTO);
/**
* @Param formDTO
- * @Description 组织议题数据
+ * @Description 组织议题数据-003
* @author sun
*/
void agencyIssue(AgencyIssueFormDTO formDTO);
/**
* @Param formDTO
- * @Description 网格项目数据
+ * @Description 网格项目数据-002
* @author sun
*/
void gridProject(GridProjectFormDTO formDTO);
/**
* @Param formDTO
- * @Description 组织项目数据
+ * @Description 组织项目数据-001
* @author sun
*/
void agencyProject(AgencyProjectFormDTO formDTO);
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
index e93b4eba0c..8377391764 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
@@ -349,6 +349,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setSatisfactionCount(dto.getCount());
+ entity.setClosedProjectCount(dto.getSum());
}
}));
}
@@ -360,6 +362,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal selfCount = new BigDecimal(grid.getCount());
if (grid.getSum() != NumConstant.ZERO) {
entity.setGovernRatio(selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setGovernCount(grid.getCount());
+ entity.setClosedCount(grid.getSum());
}
}));
}
@@ -372,6 +376,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResponseCount(dto.getCount());
+ entity.setTransferCount(dto.getSum());
}
}));
}
@@ -384,6 +390,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResolvedCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
@@ -423,6 +431,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setSatisfactionCount(dto.getCount());
+ entity.setClosedProjectCount(dto.getSum());
}
}));
}
@@ -435,6 +445,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResponseCount(dto.getCount());
+ entity.setTransferCount(dto.getSum());
}
}));
}
@@ -446,6 +458,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setGovernCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
@@ -458,6 +472,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResolvedCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
@@ -496,6 +512,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setSatisfactionCount(dto.getCount());
+ entity.setClosedProjectCount(dto.getSum());
}
}));
}
@@ -508,6 +526,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResponseCount(dto.getCount());
+ entity.setTransferCount(dto.getSum());
}
}));
}
@@ -519,6 +539,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setGovernCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
@@ -531,6 +553,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResolvedCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
@@ -569,6 +593,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setSatisfactionCount(dto.getCount());
+ entity.setClosedProjectCount(dto.getSum());
}
}));
}
@@ -581,6 +607,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResponseCount(dto.getCount());
+ entity.setTransferCount(dto.getSum());
}
}));
}
@@ -592,6 +620,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setGovernCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
@@ -604,6 +634,8 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResolvedCount(dto.getCount());
+ entity.setClosedCount(dto.getSum());
}
}));
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java
index db2753e51e..b00c8cace6 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java
@@ -142,62 +142,107 @@ public class BaseReportServiceImpl implements BaseReportService {
/**
* @Param formDTO
- * @Description 网格状态话题数据
+ * @Description 网格状态话题数据-008
* @author sun
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void gridTopicStatus(GridTopicStatusFormDTO formDTO) {
-
+ if (formDTO.getIsFirst()) {
+ int deleteNum;
+ do {
+ deleteNum = baseReportDao.delGridTopicStatus(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId());
+ } while (deleteNum > NumConstant.ZERO);
+ }
+ List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ baseReportDao.insertGridTopicStatus(p);
+ });
}
/**
* @Param formDTO
- * @Description 组织状态话题数据
+ * @Description 组织状态话题数据-007
* @author sun
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void agencyTopicStatus(AgencyTopicStatusFormDTO formDTO) {
-
+ if (formDTO.getIsFirst()) {
+ int deleteNum;
+ do {
+ deleteNum = baseReportDao.delAgencyTopicStatus(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId());
+ } while (deleteNum > NumConstant.ZERO);
+ }
+ List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ baseReportDao.insertAgencyTopicStatus(p);
+ });
}
/**
* @Param formDTO
- * @Description 网格话题转议题数据
+ * @Description 网格话题转议题数据-006
* @author sun
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void gridTopicIssue(GridTopicIssueFormDTO formDTO) {
-
+ if (formDTO.getIsFirst()) {
+ int deleteNum;
+ do {
+ deleteNum = baseReportDao.delGridTopicIssue(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId());
+ } while (deleteNum > NumConstant.ZERO);
+ }
+ List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ baseReportDao.insertGridTopicIssue(p);
+ });
}
/**
* @Param formDTO
- * @Description 组织话题转议题数据
+ * @Description 组织话题转议题数据-005
* @author sun
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void agencyTopicIssue(AgencyTopicIssueFormDTO formDTO) {
-
+ if (formDTO.getIsFirst()) {
+ int deleteNum;
+ do {
+ deleteNum = baseReportDao.delAgencyTopicIssue(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId());
+ } while (deleteNum > NumConstant.ZERO);
+ }
+ List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ baseReportDao.insertAgencyTopicIssue(p);
+ });
}
/**
* @Param formDTO
- * @Description 网格议题数据
+ * @Description 网格议题数据-004
* @author sun
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void gridIssue(GridIssueFormDTO formDTO) {
-
+ if (formDTO.getIsFirst()) {
+ int deleteNum;
+ do {
+ deleteNum = baseReportDao.delGridIssue(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId());
+ } while (deleteNum > NumConstant.ZERO);
+ }
+ List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ baseReportDao.insertGridIssue(p);
+ });
}
/**
* @Param formDTO
- * @Description 组织议题数据
+ * @Description 组织议题数据-003
* @author sun
*/
@Override
@@ -217,7 +262,7 @@ public class BaseReportServiceImpl implements BaseReportService {
/**
* @Param formDTO
- * @Description 网格项目数据
+ * @Description 网格项目数据-002
* @author sun
*/
@Override
@@ -237,7 +282,7 @@ public class BaseReportServiceImpl implements BaseReportService {
/**
* @Param formDTO
- * @Description 组织项目数据
+ * @Description 组织项目数据-001
* @author sun
*/
@Override
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml
index b9daa49495..5bd8912385 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml
@@ -133,27 +133,227 @@
+ DELETE
+ FROM
+ fact_group_total_grid_daily
+ WHERE
+ customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+ insert into fact_group_total_grid_daily
+ (
+ id,
+ customer_id,
+ agency_id,
+ grid_id,
+ date_id,
+ week_id,
+ month_id,
+ quarter_id,
+ year_id,
+ group_total,
+ ordinary_total,
+ branch_total,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.agencyId},
+ #{item.gridId},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.groupTotal},
+ #{item.ordinaryTotal},
+ #{item.branchTotal},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ now(),
+ 'BASE_REPORT',
+ now()
+ )
+
+ DELETE
+ FROM
+ fact_group_total_agency_daily
+ WHERE
+ customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+ insert into fact_group_total_agency_daily
+ (
+ id,
+ customer_id,
+ agency_id,
+ pid,
+ date_id,
+ week_id,
+ month_id,
+ quarter_id,
+ year_id,
+ group_total,
+ ordinary_total,
+ branch_total,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.agencyId},
+ #{item.pid},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.groupTotal},
+ #{item.ordinaryTotal},
+ #{item.branchTotal},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ now(),
+ 'BASE_REPORT',
+ now()
+ )
+
+ DELETE
+ FROM
+ fact_topic_hotdiscuss_grid_daily
+ WHERE
+ customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+ insert into fact_topic_hotdiscuss_grid_daily
+ (
+ id,
+ customer_id,
+ agency_id,
+ grid_id,
+ date_id,
+ week_id,
+ month_id,
+ quarter_id,
+ year_id,
+ topic_total,
+ status,
+ topic_count,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.agencyId},
+ #{item.gridId},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.topicTotal},
+ #{item.status},
+ #{item.topicCount},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ now(),
+ 'BASE_REPORT',
+ now()
+ )
+
+ DELETE
+ FROM
+ fact_topic_hotdiscuss_agency_daily
+ WHERE
+ customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+ insert into fact_topic_hotdiscuss_agency_daily
+ (
+ id,
+ customer_id,
+ agency_id,
+ pid,
+ date_id,
+ week_id,
+ month_id,
+ quarter_id,
+ year_id,
+ topic_total,
+ status,
+ topic_count,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.agencyId},
+ #{item.pid},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.topicTotal},
+ #{item.status},
+ #{item.topicCount},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ now(),
+ 'BASE_REPORT',
+ now()
+ )
+
@@ -406,4 +606,326 @@
)
+
+
+
+ INSERT INTO fact_issue_grid_daily
+ (ID,
+ CUSTOMER_ID,
+ AGENCY_ID,
+ GRID_ID,
+ YEAR_ID,
+ QUARTER_ID,
+ MONTH_ID,
+ WEEK_ID,
+ DATE_ID,
+ ISSUE_INCR,
+ ISSUE_TOTAL,
+ SHIFT_PROJECT_INCR,
+ SHIFT_PROJECT_TOTAL,
+ SHIFT_PROJECT_PERCENT,
+ VOTING_INCR,
+ VOTING_TOTAL,
+ VOTING_PERCENT,
+ CLOSED_INCR,
+ CLOSED_RESOLVED_INCR,
+ CLOSED_UNRESOLVED_INCR,
+ CLOSED_TOTAL,
+ CLOSED_RESOLVED_TOTAL,
+ CLOSED_UNRESOLVED_TOTAL,
+ CLOSED_PERCENT,
+ CLOSED_RESOLVED_PERCENT,
+ CLOSED_UNRESOLVED_PERCENT,
+ CLOSED_CASE_INCR,
+ CLOSED_CASE_RESOLVED_INCR,
+ CLOSED_CASE_UNRESOLVED_INCR,
+ CLOSED_CASE_TOTAL,
+ CLOSED_CASE_RESOLVED_TOTAL,
+ CLOSED_CASE_UNRESOLVED_TOTAL,
+ CLOSED_CASE_RESOLVED_PERCENT,
+ CLOSED_CASE_UNRESOLVED_PERCENT,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ DEL_FLAG,
+ UPDATED_TIME)
+ VALUES
+
+ (
+ REPLACE(UUID(), '-', ''),
+ #{i.customerId},
+ #{i.agencyId},
+ #{i.gridId},
+ #{i.yearId},
+ #{i.quarterId},
+ #{i.monthId},
+ #{i.weekId},
+ #{i.dateId},
+ #{i.issueIncr},
+ #{i.issueTotal},
+ #{i.shiftProjectIncr},
+ #{i.shiftProjectTotal},
+ #{i.shiftProjectPercent},
+ #{i.votingIncr},
+ #{i.votingTotal},
+ #{i.votingPercent},
+ #{i.closedIncr},
+ #{i.closedResolvedIncr},
+ #{i.closedUnresolvedIncr},
+ #{i.closedTotal},
+ #{i.closedResolvedTotal},
+ #{i.closedUnresolvedTotal},
+ #{i.closedPercent},
+ #{i.closedResolvedPercent},
+ #{i.closedUnresolvedPercent},
+ #{i.closedCaseIncr},
+ #{i.closedCaseResolvedIncr},
+ #{i.closedCaseUnresolvedIncr},
+ #{i.closedCaseTotal},
+ #{i.closedCaseResolvedTotal},
+ #{i.closedCaseUnresolvedTotal},
+ #{i.closedCaseResolvedPercent},
+ #{i.closedCaseUnresolvedPercent},
+ 0,
+ 'BASE_REPORT',
+ NOW(),
+ 'BASE_REPORT',
+ 0,
+ NOW()
+ )
+
+
+
+
+
+ DELETE FROM fact_issue_grid_daily
+ WHERE customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+
+
+
+
+ DELETE FROM fact_topic_issue_agency_daily
+ WHERE customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+
+
+
+
+ INSERT INTO fact_topic_issue_agency_daily
+ (
+ ID,
+ CUSTOMER_ID,
+ PID,
+ AGENCY_ID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ ISSUE_TOTAL,
+ ISSUE_INCR,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ )
+ values
+
+ (
+ REPLACE(UUID(), '-', ''),
+ #{i.customerId},
+ #{i.pid},
+ #{i.agencyId},
+ #{i.dateId},
+ #{i.weekId},
+ #{i.monthId},
+ #{i.quarterId},
+ #{i.yearId},
+ #{i.issueTotal},
+ #{i.issueIncr},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ NOW(),
+ 'BASE_REPORT',
+ NOW()
+ )
+
+
+
+
+
+ INSERT INTO fact_topic_issue_grid_daily
+ (
+ ID,
+ CUSTOMER_ID,
+ AGENCY_ID,
+ GRID_ID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ ISSUE_INCR,
+ ISSUE_TOTAL,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ )
+ values
+
+ (
+ REPLACE(UUID(), '-', ''),
+ #{i.customerId},
+ #{i.agencyId},
+ #{i.gridId},
+ #{i.dateId},
+ #{i.weekId},
+ #{i.monthId},
+ #{i.quarterId},
+ #{i.yearId},
+ #{i.issueIncr},
+ #{i.issueTotal},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ NOW(),
+ 'BASE_REPORT',
+ NOW()
+ )
+
+
+
+
+
+ DELETE FROM fact_topic_issue_grid_daily
+ WHERE customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+
+
+
+
+ DELETE FROM fact_topic_status_agency_daily
+ WHERE customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+
+
+
+
+ INSERT INTO fact_topic_status_agency_daily
+ (
+ ID,
+ CUSTOMER_ID,
+ AGENCY_ID,
+ PID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ TOPIC_STATUS_ID,
+ TOPIC_COUNT,
+ TOPIC_PROPORTION,
+ TOPIC_INCREMENT,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ )
+ values
+
+ (
+ REPLACE(UUID(), '-', ''),
+ #{i.customerId},
+ #{i.agencyId},
+ #{i.pid},
+ #{i.dateId},
+ #{i.weekId},
+ #{i.monthId},
+ #{i.quarterId},
+ #{i.yearId},
+ #{i.topicStatusId},
+ #{i.topicCount},
+ #{i.topicProportion},
+ #{i.topicIncrement},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ NOW(),
+ 'BASE_REPORT',
+ NOW()
+ )
+
+
+
+
+
+ INSERT INTO fact_topic_status_grid_daily
+ (
+ ID,
+ CUSTOMER_ID,
+ AGENCY_ID,
+ GRID_ID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ TOPIC_STATUS_ID,
+ TOPIC_COUNT,
+ TOPIC_PROPORTION,
+ TOPIC_INCREMENT,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ )
+ values
+
+ (
+ REPLACE(UUID(), '-', ''),
+ #{i.customerId},
+ #{i.agencyId},
+ #{i.gridId},
+ #{i.dateId},
+ #{i.weekId},
+ #{i.monthId},
+ #{i.quarterId},
+ #{i.yearId},
+ #{i.topicStatusId},
+ #{i.topicCount},
+ #{i.topicProportion},
+ #{i.topicIncrement},
+ 0,
+ 0,
+ 'BASE_REPORT',
+ NOW(),
+ 'BASE_REPORT',
+ NOW()
+ )
+
+
+
+
+
+ DELETE FROM fact_topic_status_grid_daily
+ WHERE customer_id = #{customerId}
+ AND date_id = #{dateId}
+ LIMIT 1000
+