diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index a8baf89b38..108f82d575 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -38,10 +38,7 @@ import com.epmet.entity.stats.DimMonthEntity; import com.epmet.service.StatsDemoService; import com.epmet.service.StatsPartyMemberVanguardService; import com.epmet.service.evaluationindex.extract.dataToIndex.*; -import com.epmet.service.evaluationindex.extract.todata.FactGridGovernDailyService; -import com.epmet.service.evaluationindex.extract.todata.FactGroupActDailyService; -import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService; -import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; +import com.epmet.service.evaluationindex.extract.todata.*; import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.screen.*; @@ -120,6 +117,8 @@ public class DemoController { private FactGroupActDailyService factGroupActDailyService; @Autowired private FactGridGovernDailyService factGridGovernDailyService; + @Autowired + private FactAgencyGovernDailyService factAgencyGovernDailyService; @GetMapping("testAlarm") public void testAlarm() { @@ -924,4 +923,10 @@ public class DemoController { factGridGovernDailyService.extractFactGridGovernDaily(fromDTO); return new Result(); } + @PostMapping("extractFactAgencyGovernDaily") + public Result extractFactAgencyGovernDaily(@RequestBody ExtractFactGridGovernDailyFromDTO fromDTO){ + factAgencyGovernDailyService.extractFactAgencyGovernDaily(fromDTO.getCustomerId(), fromDTO.getDateId()); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactAgencyGovernDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactAgencyGovernDailyDao.java index b88d897543..2671d89c4e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactAgencyGovernDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactAgencyGovernDailyDao.java @@ -20,6 +20,7 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.evaluationindex.extract.FactAgencyGovernDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 组织的治理指数,按天统计 @@ -29,5 +30,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface FactAgencyGovernDailyDao extends BaseDao { + /** + * 删除数据 + * @author zhaoqifeng + * @date 2021/5/31 14:47 + * @param customerId + * @param dateId + * @return int + */ + int deleteAgencyGovernDailyData(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("deleteSize") Integer deleteSize); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java index 82e599ff4b..1fbabc764b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java @@ -291,6 +291,14 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreNew(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); subGridGovernAvg.forEach(s -> { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreNew(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); + subGridGovernAvg.forEach(s -> { gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode()), s.getSampleCount()); }); if (CollectionUtils.isEmpty(subGridGovernAvg)){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 15e5d04b2e..bceed3de9d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -228,10 +228,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict indexDetailList.forEach(detail -> { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgNew(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,quarterId,yearId); + log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); subGridPartyAvgScore.forEach(s -> { gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode()), s.getSampleCount()); }); - log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); } else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { @@ -317,10 +317,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgNew(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,quarterId,yearId); + log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); districtGovernAvgList.forEach(s -> { gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode()), s.getSampleCount()); }); - log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); for (int i = 0; i < districtGovernAvgList.size(); i++) { if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ districtGovernAvgList.remove(districtGovernAvgList.get(i)); @@ -410,10 +410,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict String indexCode = detail.getIndexCode(); if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgNew(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,quarterId,yearId); + log.info("subStreetAvgList:::"+subStreetAvgList.toString()); subStreetAvgList.forEach(s -> { gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode()), s.getSampleCount()); }); - log.info("subStreetAvgList:::"+subStreetAvgList.toString()); for (int i = 0; i < subStreetAvgList.size(); i++) { if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ subStreetAvgList.remove(subStreetAvgList.get(i)); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 4c40fd2861..f148e3d83e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -326,7 +326,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreNew(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); - log.info("streetGovernAbilityCalculate: pjz {}",JSON.toJSONString(subGridGovernAvg)); subGridGovernAvg.forEach(s -> { gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode()), s.getSampleCount()); }); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.15__govern.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.15__govern.sql index 59975cc83f..e83d7f5313 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.15__govern.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.15__govern.sql @@ -1,64 +1,42 @@ -- epmet_data_statistical新增两张表,治理指数网格按天统计,治理指数按组织按天统计 --- /* --- Navicat Premium Data Transfer --- --- Source Server : 192.168.1.130 --- Source Server Type : MySQL --- Source Server Version : 50728 --- Source Host : 192.168.1.130:3306 --- Source Schema : epmet_data_statistical --- --- Target Server Type : MySQL --- Target Server Version : 50728 --- File Encoding : 65001 --- --- Date: 25/05/2021 09:31:39 --- */ --- --- SET NAMES utf8mb4; --- SET FOREIGN_KEY_CHECKS = 0; --- --- -- ---------------------------- --- -- Table structure for fact_agency_govern_daily --- -- ---------------------------- --- CREATE TABLE `fact_agency_govern_daily` ( --- `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键,customer_id+AGENCY_ID+date_id只有一条记录', --- `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', --- `DATE_ID` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据更新至:yyyyMMdd; ', --- `AGENCY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织id', --- `LEVEL` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'agency_id所属的机关级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province)', --- `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织i所属的组织id', --- `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织i所有上级id', --- `PROBLEM_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '界面展示:问题解决总数=1+2+3+4+5+6+7+8', --- `GROUP_SELF_GOVERN_RATIO` decimal(10, 6) NOT NULL COMMENT '界面展示:党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数', --- `GRID_SELF_GOVERN_RATIO` decimal(10, 6) NOT NULL COMMENT '界面展示:网格自治占比=GRID_SELF_GOVERN_PROJECT_TOTAL/PROBLEM_RESOLVED_COUNT;此列存储的是小数', --- `COMMUNITY_CLOSED_RATIO` decimal(10, 6) NOT NULL COMMENT '界面展示:社区解决占比=COMMUNITY_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数', --- `STREET_CLOSED_RATIO` decimal(10, 6) NOT NULL COMMENT '界面展示:街道解决占比=STREET_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数', --- `DISTRICT_DEPT_CLOSED_RATIO` decimal(10, 6) NOT NULL COMMENT '界面展示:区直部门解决占比=DISTRICT_DEPT_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数', --- `TOPIC_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '1、当前组织内,话题关闭已解决数', --- `TOPIC_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '2、当前组织内,话题关闭无需解决数', --- `ISSUE_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '3、当前组织内,议题关闭已解决数', --- `ISSUE_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '4、当前组织内,议题关闭无需解决数', --- `ISSUE_PROJECT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '5、当前组织内:来源于议题的项目:结案已解决数', --- `ISSUE_PROJECT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '6、当前组织内:来源于议题的项目:结案无需解决数', --- `APPROVAL_PROJECT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '7、当前组织内:项目立项,结案已解决数;默认为0,', --- `APPROVAL_PROJECT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '8、当前组织内:项目立项,结案无需解决数;默认为0,', --- `IN_GROUP_TOPIC_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '9、当前组织内,未出小组即未转议题的:话题关闭已解决数', --- `IN_GROUP_TOPIC_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '10、当前组织内,未出小组即未转议题的:话题关闭无需解决数', --- `GRID_SELF_GOVERN_PROJECT_TOTAL` int(11) NOT NULL DEFAULT 0 COMMENT '11、未出当前网格的,结案项目数', --- `COMMUNITY_CLOSED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '当前组织内结案的项目中:由社区结案的项目总数', --- `STREET_CLOSED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '当前组织内结案的项目中:由街道结案的项目总数', --- `DISTRICT_DEPT_CLOSED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '当前组织内结案的项目中:由区直部门结案的项目总数', --- `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', --- `REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', --- `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', --- `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', --- `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', --- `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', --- PRIMARY KEY (`ID`) USING BTREE --- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织的治理指数,按天统计' ROW_FORMAT = Dynamic; --- +CREATE TABLE `fact_agency_govern_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键,customer_id+AGENCY_ID+date_id只有一条记录', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至:yyyyMMdd; ', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', + `LEVEL` varchar(30) NOT NULL COMMENT 'agency_id所属的机关级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province)', + `PID` varchar(64) NOT NULL COMMENT '组织i所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '组织i所有上级id', + `PROBLEM_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '界面展示:问题解决总数=1+2+3+4+5+6+7+8', + `GROUP_SELF_GOVERN_RATIO` decimal(10,6) NOT NULL COMMENT '界面展示:党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数', + `GRID_SELF_GOVERN_RATIO` decimal(10,6) NOT NULL COMMENT '界面展示:网格自治占比=GRID_SELF_GOVERN_PROJECT_TOTAL/PROBLEM_RESOLVED_COUNT;此列存储的是小数', + `COMMUNITY_CLOSED_RATIO` decimal(10,6) NOT NULL COMMENT '界面展示:社区解决占比=COMMUNITY_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数', + `STREET_CLOSED_RATIO` decimal(10,6) NOT NULL COMMENT '界面展示:街道解决占比=STREET_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数', + `DISTRICT_DEPT_CLOSED_RATIO` decimal(10,6) NOT NULL COMMENT '界面展示:区直部门解决占比=DISTRICT_DEPT_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数', + `TOPIC_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '1、当前组织内,话题关闭已解决数', + `TOPIC_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '2、当前组织内,话题关闭无需解决数', + `ISSUE_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '3、当前组织内,议题关闭已解决数', + `ISSUE_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '4、当前组织内,议题关闭无需解决数', + `ISSUE_PROJECT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '5、当前组织内:来源于议题的项目:结案已解决数', + `ISSUE_PROJECT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '6、当前组织内:来源于议题的项目:结案无需解决数', + `APPROVAL_PROJECT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '7、当前组织内:项目立项,结案已解决数;默认为0,', + `APPROVAL_PROJECT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '8、当前组织内:项目立项,结案无需解决数;默认为0,', + `IN_GROUP_TOPIC_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '9、当前组织内,未出小组即未转议题的:话题关闭已解决数', + `IN_GROUP_TOPIC_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '10、当前组织内,未出小组即未转议题的:话题关闭无需解决数', + `GRID_SELF_GOVERN_PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '11、未出当前网格的,结案项目数', + `COMMUNITY_CLOSED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '当前组织内结案的项目中:由社区结案的项目总数', + `STREET_CLOSED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '当前组织内结案的项目中:由街道结案的项目总数', + `DISTRICT_DEPT_CLOSED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '当前组织内结案的项目中:由区直部门结案的项目总数', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组织的治理指数,按天统计'; + CREATE TABLE `fact_grid_govern_daily` ( `ID` varchar(64) NOT NULL COMMENT '主键,customer_id+grid_id+date_id只有一条记录', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactAgencyGovernDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactAgencyGovernDailyDao.xml index 7b4aa4c504..e8d12dd708 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactAgencyGovernDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactAgencyGovernDailyDao.xml @@ -4,5 +4,10 @@ - + + delete from fact_agency_govern_daily + where CUSTOMER_ID = #{customerId} + AND DATE_ID = #{dateId} + limit #{deleteSize} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index af22785432..214ca9f017 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -73,7 +73,8 @@ #{monthId} AS monthId, #{quarterId} AS quarterId, #{yearId} AS yearId, - IFNULL(ROUND(AVG( fics.score ),6),0) AS score, COUNT(1) AS sampleCount, + IFNULL(ROUND(AVG( fics.score ),6),0) AS score, + COUNT(1) AS sampleCount, sca.customer_id, sca.pid AS parentId FROM screen_customer_agency sca