Browse Source

Merge branch 'dev_data_fusion' into develop

dev_shibei_match
sunyuchao 4 years ago
parent
commit
a985e87cc8
  1. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
  2. 8
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
  3. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
  4. 161
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java
  5. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  6. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
  7. 174
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
  8. 72
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  9. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
  10. 23
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
  11. 25
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  12. 19
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
  13. 14
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyGroupTotalFormDTO.java
  14. 14
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyHotTopicFormDTO.java
  15. 26
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyRegUserFormDTO.java
  16. 8
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java
  17. 8
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java
  18. 14
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridGroupTotalFormDTO.java
  19. 14
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridHotTopicFormDTO.java
  20. 8
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java
  21. 26
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridRegUserFormDTO.java
  22. 8
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java
  23. 8
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java
  24. 45
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java
  25. 86
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java
  26. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java
  27. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
  28. 71
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java
  29. 522
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml

4
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";
}

8
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 {}
}

2
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 {}
}

161
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

11
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<GridGovrnResultDTO> getGridGovern(@Param("gridIds") List<String> 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<FactAgencyGovernDailyEntity> getAgencyGovernDaily(@Param("agencyIds") List<String> agencyIds, @Param("dateId") String dateId);
}

11
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<ScreenCustomerGridDTO> getSubGridList(@Param("agencyId") String agencyId);
/**
* 根据组织Id查询治理指数
* @author zhaoqifeng
* @date 2021/6/25 16:36
* @param agencyIds
* @param dateId
* @return java.util.List<com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO>
*/
ScreenGovernRankDataDailyDTO getGovernRankList(@Param("agencyIds") List<String> agencyIds, @Param("dateId") String dateId);
}

174
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

72
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<String> subAgencyIds = indexService.getAgencyByAreaCodeAgencyId(formDTO.getAgencyId(), formDTO.getAreaCode());
if (CollectionUtils.isEmpty(subAgencyIds)) {
subAgencyIds = new ArrayList<>();
}
subAgencyIds.add(formDTO.getAgencyId());
List<FactAgencyGovernDailyEntity> 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<String> agencyIds = new ArrayList<>();
agencyIds.add(formDTO.getAgencyId());
@ -1152,6 +1191,17 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultList;
}
List<String> agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
if (StringUtils.isNotBlank(formDTO.getAreaCode())) {
List<ScreenCustomerAgencyDTO> 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<AgencyGovrnResultDTO> 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("%");
}
}

12
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<ScreenCustomerGridDTO> getSubGridList(String agencyId);
/**
* 根据组织ID获取治理指数
* @author zhaoqifeng
* @date 2021/6/25 16:33
* @param agencyId
* @param areaCode
* @param dateId
* @return java.util.List<com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO>
*/
ScreenGovernRankDataDailyDTO getGovernRank(String agencyId, String areaCode, String dateId);
}

23
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<com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO>
* @author zhaoqifeng
* @date 2021/6/25 16:33
*/
@Override
public ScreenGovernRankDataDailyDTO getGovernRank(String agencyId, String areaCode, String dateId) {
List<String> agencyIdList = getAgencyByAreaCodeAgencyId(agencyId, areaCode);
if (CollectionUtils.isEmpty(agencyIdList)) {
agencyIdList = new ArrayList<>();
}
agencyIdList.add(agencyId);
return evaluationIndexDao.getGovernRankList(agencyIdList, dateId);
}
}

25
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -660,5 +660,30 @@
</foreach>
ORDER BY problem_resolved_count DESC
</select>
<select id="getAgencyGovernDaily" resultType="com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity">
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}
<foreach item="agencyId" collection="agencyIds" open="AND (" separator="or" close=")" index="">
AGENCY_ID = #{agencyId}
</foreach>
</select>
</mapper>

19
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>
<select id="getGovernRankList" resultType="com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO">
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'
<foreach item="agencyId" collection="agencyIds" open="AND (" separator="or" close=")" index="">
ORG_ID = #{agencyId}
</foreach>
AND ORG_TYPE = 'agency'
AND DATE_ID = #{dateId}
</select>
</mapper>

14
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;
}
}

14
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;
}
}

26
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;
}
}

8
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> dataList;
@Data
public class DataList implements Serializable {
private static final long serialVersionUID = 1L;
public static class DataList{
/**
* 客户Id

8
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> dataList;
@Data
public class DataList implements Serializable {
private static final long serialVersionUID = 1L;
public static class DataList {
/**
* 客户Id

14
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;
}
}

14
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;
}
}

8
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> dataList;
@Data
public class DataList implements Serializable {
private static final long serialVersionUID = 1L;
public static class DataList{
/**
* 客户ID

26
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;
}
}

8
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> dataList;
@Data
public class DataList implements Serializable {
private static final long serialVersionUID = 1L;
public static class DataList{
/**
* 客户Id

8
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> dataList;
@Data
public class DataList implements Serializable {
private static final long serialVersionUID = 1L;
public static class DataList{
/**
* 客户Id

45
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) {

86
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<AgencyIssueFormDTO.DataList> 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<GridIssueFormDTO.DataList> 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<AgencyTopicIssueFormDTO.DataList> 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<GridTopicIssueFormDTO.DataList> 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<AgencyTopicStatusFormDTO.DataList> 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<GridTopicStatusFormDTO.DataList> dataList);
}

16
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);

32
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());
}
}));
}

71
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<List<GridTopicStatusFormDTO.DataList>> 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<List<AgencyTopicStatusFormDTO.DataList>> 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<List<GridTopicIssueFormDTO.DataList>> 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<List<AgencyTopicIssueFormDTO.DataList>> 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<List<GridIssueFormDTO.DataList>> 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

522
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml

@ -133,27 +133,227 @@
</insert>
<delete id="delGridGroupTotal">
DELETE
FROM
fact_group_total_grid_daily
WHERE
customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<insert id="insertBatchGridGroupTotal">
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
<foreach collection="list" item="item" index="index" separator=",">
(
(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()
)
</foreach>
</insert>
<delete id="delAgencyGroupTotal">
DELETE
FROM
fact_group_total_agency_daily
WHERE
customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<insert id="insertBatchAgencyGroupTotal">
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
<foreach collection="list" item="item" index="index" separator=",">
(
(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()
)
</foreach>
</insert>
<delete id="delGridHotTopic">
DELETE
FROM
fact_topic_hotdiscuss_grid_daily
WHERE
customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<insert id="insertBatchGridHotTopic">
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
<foreach collection="list" item="item" index="index" separator=",">
(
(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()
)
</foreach>
</insert>
<delete id="delAgencyHotTopic">
DELETE
FROM
fact_topic_hotdiscuss_agency_daily
WHERE
customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<insert id="insertBatchAgencyHotTopic">
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
<foreach collection="list" item="item" index="index" separator=",">
(
(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()
)
</foreach>
</insert>
<!-- 根据dateId删除客户组织项目数据 -->
@ -406,4 +606,326 @@
)
</foreach>
</insert>
<!-- 新增网格议题数据 -->
<insert id="insertGridIssue">
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
<foreach collection="list" item="i" separator=",">
(
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()
)
</foreach>
</insert>
<!-- 删除网格议题数据 -->
<delete id="delGridIssue">
DELETE FROM fact_issue_grid_daily
WHERE customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<!-- 删除组织话题转议题数据 -->
<delete id="delAgencyTopicIssue">
DELETE FROM fact_topic_issue_agency_daily
WHERE customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<!-- 新增组织话题转议题数据 -->
<insert id="insertAgencyTopicIssue">
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
<foreach collection="list" item="i" separator=",">
(
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()
)
</foreach>
</insert>
<!-- 新增网格话题转议题数据 -->
<insert id="insertGridTopicIssue">
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
<foreach collection="list" item="i" separator=",">
(
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()
)
</foreach>
</insert>
<!-- 删除网格话题转议题数据 -->
<delete id="delGridTopicIssue">
DELETE FROM fact_topic_issue_grid_daily
WHERE customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<!-- 删除组织状态话题数据 -->
<delete id="delAgencyTopicStatus">
DELETE FROM fact_topic_status_agency_daily
WHERE customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
<!-- 增加组织状态话题数据 -->
<insert id="insertAgencyTopicStatus">
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
<foreach collection="list" item="i" separator=",">
(
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()
)
</foreach>
</insert>
<!-- 增加网格状态话题数据 -->
<insert id="insertGridTopicStatus">
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
<foreach collection="list" item="i" separator=",">
(
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()
)
</foreach>
</insert>
<!-- 删除网格状态话题数据 -->
<delete id="delGridTopicStatus">
DELETE FROM fact_topic_status_grid_daily
WHERE customer_id = #{customerId}
AND date_id = #{dateId}
LIMIT 1000
</delete>
</mapper>

Loading…
Cancel
Save