Browse Source

Merge branch 'dev_data_fusion' into develop

master
zhaoqifeng 4 years ago
parent
commit
4842828f77
  1. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
  3. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.20__add_satisfaction_score.sql

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -1130,7 +1130,7 @@ public class DataStatsServiceImpl implements DataStatsService {
} }
ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getAgencyId()); ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getAgencyId());
if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) { if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) {
if (OrgConstant.PROVINCE.equals(agencyDTO.getLevel()) || OrgConstant.CITY.equals(agencyDTO.getLevel()) || OrgConstant.DISTRICT.equals(agencyDTO.getLevel())) {
List<String> subAgencyIds = indexService.getAgencyByAreaCodeAgencyId(formDTO.getAgencyId(), agencyDTO.getAreaCode()); List<String> subAgencyIds = indexService.getAgencyByAreaCodeAgencyId(formDTO.getAgencyId(), agencyDTO.getAreaCode());
if (CollectionUtils.isEmpty(subAgencyIds)) { if (CollectionUtils.isEmpty(subAgencyIds)) {
subAgencyIds = new ArrayList<>(); subAgencyIds = new ArrayList<>();
@ -1163,6 +1163,7 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultDTO; return resultDTO;
} }
} }
}
//1.按日期查询当前组织事件治理指数 //1.按日期查询当前组织事件治理指数
List<String> agencyIds = new ArrayList<>(); List<String> agencyIds = new ArrayList<>();
agencyIds.add(formDTO.getAgencyId()); agencyIds.add(formDTO.getAgencyId());
@ -1381,6 +1382,7 @@ public class DataStatsServiceImpl implements DataStatsService {
if (OrgConstant.AGENCY.equals(formDTO.getOrgType())) { if (OrgConstant.AGENCY.equals(formDTO.getOrgType())) {
ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getOrgId()); ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getOrgId());
if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) { if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) {
if (OrgConstant.PROVINCE.equals(agencyDTO.getLevel()) || OrgConstant.CITY.equals(agencyDTO.getLevel()) || OrgConstant.DISTRICT.equals(agencyDTO.getLevel())) {
ScreenGovernRankDataDailyDTO governData = indexService.getGovernRank(formDTO.getOrgId(), agencyDTO.getAreaCode(), formDTO.getDateId()); ScreenGovernRankDataDailyDTO governData = indexService.getGovernRank(formDTO.getOrgId(), agencyDTO.getAreaCode(), formDTO.getDateId());
resultDTO.setGovernRatio(getPercentage(governData.getGovernCount(), governData.getClosedCount())); resultDTO.setGovernRatio(getPercentage(governData.getGovernCount(), governData.getClosedCount()));
resultDTO.setResolvedRatio(getPercentage(governData.getResolvedCount(), governData.getClosedCount())); resultDTO.setResolvedRatio(getPercentage(governData.getResolvedCount(), governData.getClosedCount()));
@ -1389,6 +1391,7 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultDTO; return resultDTO;
} }
} }
}
//1.按类型、日期查询治理指数下响应解决满意自治四个统计率 //1.按类型、日期查询治理指数下响应解决满意自治四个统计率
GovrnRatioResultDTO dto = indexService.governRatio(formDTO); GovrnRatioResultDTO dto = indexService.governRatio(formDTO);

2
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml

@ -84,7 +84,7 @@
SUM(RESOLVED_COUNT) AS resolvedCount, SUM(RESOLVED_COUNT) AS resolvedCount,
SUM(CLOSED_COUNT) AS closedCount, SUM(CLOSED_COUNT) AS closedCount,
SUM(GOVERN_COUNT) AS governCount, SUM(GOVERN_COUNT) AS governCount,
SUM(SATISFACTION_PROJECT_COUNT) AS satisfactionProjectCount, SUM(SATISFACTION_COUNT) AS satisfactionProjectCount,
SUM(CLOSED_PROJECT_COUNT) AS closedProjectCount SUM(CLOSED_PROJECT_COUNT) AS closedProjectCount
FROM FROM
screen_govern_rank_data_daily screen_govern_rank_data_daily

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java

@ -147,7 +147,12 @@ public class IndexCalculateController {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO);
if (aBoolean) { if (aBoolean) {
log.error("客户Id:{},monthId:{},全部指标计算完成,结果:{},总耗时:{}秒", formDTO.getCustomerId(), formDTO.getMonthId(), aBoolean, (System.currentTimeMillis() - start) / 1000); log.error("客户Id:{},monthId:{},全部指标计算完成,结果:{},总耗时:{}秒,customerAreaCode:{}",
formDTO.getCustomerId(),
formDTO.getMonthId(),
aBoolean,
(System.currentTimeMillis() - start) / 1000,
formDTO.getCustomerAreaCode());
} }
redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId()));

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.20__add_satisfaction_score.sql

@ -1,5 +1,5 @@
-- epmet_evaluation_index库执行以下sql: 增加群众不满得分 -- epmet_evaluation_index库执行以下sql: 增加群众不满得分
alter table screen_project_data add COLUMN `SATISFACTION_SCORE` decimal(10,6) DEFAULT NULL COMMENT '满意度得分' AFTER LATITUDE; alter table `epmet_evaluation_index`.screen_project_data add COLUMN `SATISFACTION_SCORE` decimal(10,6) DEFAULT NULL COMMENT '满意度得分' AFTER LATITUDE;
ALTER TABLE `epmet_evaluation_index`.`screen_govern_rank_data_daily` ALTER TABLE `epmet_evaluation_index`.`screen_govern_rank_data_daily`
ADD COLUMN `RESPONSE_COUNT` int(11) NULL COMMENT '响应次数' AFTER `RESPONSE_RATIO`, ADD COLUMN `RESPONSE_COUNT` int(11) NULL COMMENT '响应次数' AFTER `RESPONSE_RATIO`,

Loading…
Cancel
Save