diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java index e1b0dd8a11..b714ce2210 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -71,4 +71,14 @@ public interface ProjectConstant { String ISSUE = "issue"; + + /** + * 项目来源于议题 + */ + String PROJECT_ORIGIN_ISSUE="issue"; + + /** + * 项目来源于 工作端立项 + */ + String PROJECT_ORIGIN_AGENCY="agency"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index e07a58613f..0403e29bc2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -28,6 +28,7 @@ import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; +import com.epmet.entity.evaluationindex.extract.GovernGridTotalCommonDTO; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -445,4 +446,23 @@ public interface FactOriginProjectMainDailyDao extends BaseDao */ List selectPartyMemberClosedProjectStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * 5、当前网格内:来源于议题的项目:结案已解决数、 + * 6、当前网格内:来源于议题的项目:结案无需解决数、 + * 7、当前网格内:项目立项,结案已解决数;默认为0、 + * 8、当前网格内:项目立项,结案无需解决数;默认为0、 + * + * @param customerId + * @param gridIds + * @param projectStatus 状态:待处理 pending,结案closed + * @param origin 项目来源 来源:议题issue 组织agency + * @param isResolved unresolved,resolved + * @return com.epmet.entity.evaluationindex.extract.GovernGridTotalCommonDTO + */ + List selectGroupByGrid(@Param("customerId")String customerId, + @Param("gridIds")List gridIds, + @Param("projectStatus")String projectStatus, + @Param("origin")String origin, + @Param("isResolved")String isResolved); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java index 0e7b1cb889..ae45d7aa7d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java @@ -129,11 +129,32 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { */ private Integer inGroupTopicUnResolvedCount; - /** - * 11、未出当前网格的,结案项目数 - */ + /** + * 11、来源于议题的项目,未出网格结案并且已解决的项目数 + */ + private Integer fromIssueResolvedInGridCount; + + /** + * 12、来源于议题的项目,未出网格结案并且无需解决的项目数 + */ + private Integer fromIssueUnResolvedInGridCount; + + /** + * 13、来源于项目立项的项目,未出网格结案,并且已解决的项目数;因现在网格不能立项,所以此列默认为0 + */ + private Integer fromAgencyResolvedInGridCount; + + /** + * 14、来源于项目立项的项目,未出网格结案,并且无需解决的项目数;因现在网格不能立项,所以此列默认为0 + */ + private Integer fromAgencyUnResolvedInGridCount; + + /** + * 15、未出当前网格的,结案项目数=11+12+13+14 + */ private Integer gridSelfGovernProjectTotal; + public FactGridGovernDailyEntity() { this.customerId = StrConstant.EPMETY_STR; this.dateId = StrConstant.EPMETY_STR; @@ -153,6 +174,10 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { this.approvalProjectUnResolvedCount=NumConstant.ZERO; this.inGroupTopicResolvedCount=NumConstant.ZERO; this.inGroupTopicUnResolvedCount=NumConstant.ZERO; + this.fromIssueResolvedInGridCount=NumConstant.ZERO; + this.fromIssueUnResolvedInGridCount=NumConstant.ZERO; + this.fromAgencyResolvedInGridCount=NumConstant.ZERO; + this.fromAgencyUnResolvedInGridCount=NumConstant.ZERO; this.gridSelfGovernProjectTotal=NumConstant.ZERO; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index 21994e4a98..215aa74756 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -29,6 +29,7 @@ import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; +import com.epmet.entity.evaluationindex.extract.GovernGridTotalCommonDTO; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import java.util.List; @@ -421,4 +422,18 @@ public interface FactOriginProjectMainDailyService extends BaseService getPartyMemberClosedProjectStatic(String customerId, String dateId, String type); + /** + * 5、当前网格内:来源于议题的项目:结案已解决数、 + * 6、当前网格内:来源于议题的项目:结案无需解决数、 + * 7、当前网格内:项目立项,结案已解决数;默认为0、 + * 8、当前网格内:项目立项,结案无需解决数;默认为0、 + * + * @param customerId + * @param gridIds + * @param projectStatus 状态:待处理 pending,结案closed + * @param origin 项目来源 来源:议题issue 组织agency + * @param isResolved unresolved,resolved + * @return + */ + List queryGridProjectValue(String customerId, List gridIds, String projectStatus, String origin, String isResolved); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java index d3ebd1edc9..4f5483e7b4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java @@ -27,6 +27,7 @@ import com.epmet.entity.evaluationindex.extract.FactGridGovernDailyEntity; import com.epmet.entity.evaluationindex.extract.GovernGridTotalCommonDTO; import com.epmet.service.evaluationindex.extract.todata.FactGridGovernDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.org.CustomerGridService; import lombok.extern.slf4j.Slf4j; @@ -56,6 +57,8 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl topicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ZERO_STR); - Map topicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ZERO_STR); - + Map topicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,null); + Map topicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,null); Map issueResolvedMap=getIssueMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED); Map issueUnResolvedMap=getIssueMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED); + Map issueProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_ISSUE,DimObjectStatusConstant.RESOLVED); + Map issueProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_ISSUE,DimObjectStatusConstant.UNRESOLVED); + Map approvalProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.RESOLVED); + Map approvalProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.UNRESOLVED); + Map inGroupTopicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ONE_STR); + Map inGroupTopicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ONE_STR); + for(FactGridGovernDailyEntity insertEntity:insertEntityList){ //1、当前网格内,话题关闭已解决数 @@ -104,6 +113,8 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl getGridProjectMap(String customerId, List gridIds, String projectStatus, String origin, String isResolved) { + Map resultMap = new HashMap<>(); + List list = factOriginProjectMainDailyService.queryGridProjectValue(customerId, gridIds, projectStatus, origin, isResolved); + for (GovernGridTotalCommonDTO gridTotalCommonDTO : list) { + resultMap.put(gridTotalCommonDTO.getGridId(), gridTotalCommonDTO.getTotal()); + } + return resultMap; } - /** - * 10、当前网格内,未出小组即未转议题的:话题关闭无需解决数 - * - * @param customerId - * @param gridId - */ - private Integer calInGroupTopicUnResolvedCount(String customerId, String gridId) { - // todo - return 0; - } /** - * 11、未出当前网格的,结案项目数 + * 15、未出当前网格的,结案项目数=11+12+13+14 * * @param customerId * @param gridId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 12550e187f..58d625f999 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -39,6 +39,7 @@ import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; +import com.epmet.entity.evaluationindex.extract.GovernGridTotalCommonDTO; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; @@ -639,5 +640,23 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl queryGridProjectValue(String customerId, List gridIds, String projectStatus, String origin, String isResolved) { + return baseDao.selectGroupByGrid(customerId,gridIds,projectStatus,origin,isResolved); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.14__groupact_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.14__groupact_analysis.sql index ee35df8d10..a450ab5eec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.14__groupact_analysis.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.14__groupact_analysis.sql @@ -1,49 +1,47 @@ -- epmet_data_statistical 库执行以下脚本 --- CREATE TABLE `fact_group_act_daily` ( --- `ID` varchar(64) NOT NULL COMMENT '主键', --- `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', --- `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期Id:yyyyMMdd', --- `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', --- `ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', --- `PID` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pid=网格所属组织id;\r\n2)orgType=agency: pid=当前组织的上级组织', --- `PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', --- `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', --- `PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', --- `LEVEL` int(11) NOT NULL COMMENT '分类等级', --- `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 组织次数;包含dateId这一天的数据', --- `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 参加人数;包含dateId这一天的数据', --- `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 平均参加人数;包含dateId这一天的数据', --- `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', --- `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', --- `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', --- `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', --- `UPDATED_BY` varchar(64) 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_group_act_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期Id:yyyyMMdd', + `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', + `ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', + `PID` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pid=网格所属组织id;\r\n2)orgType=agency: pid=当前组织的上级组织', + `PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', + `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', + `PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', + `LEVEL` int(11) NOT NULL COMMENT '分类等级', + `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 组织次数;包含dateId这一天的数据', + `PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 参加人数;包含dateId这一天的数据', + `AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 平均参加人数;包含dateId这一天的数据', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) 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_group_act_monthly` ( --- `ID` varchar(64) NOT NULL COMMENT '主键', --- `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', --- `MONTH_ID` varchar(8) NOT NULL COMMENT '数据维度:yyyyMM', --- `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', --- `ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', --- `PID` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pid=网格所属组织id;\r\n2)orgType=agency: pid=当前组织的上级组织', --- `PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', --- `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', --- `PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', --- `LEVEL` int(11) NOT NULL COMMENT '分类等级', --- `ORGANIZE_INCR` int(11) NOT NULL COMMENT '本月内:活动组织次数', --- `PARTICIPATE_USER__INCR` int(11) NOT NULL COMMENT '本月内:活动签到人数参加人数', --- `AVG_PARTICIPATE_USER_INCR` int(11) NOT NULL COMMENT '本月内:平均参加人数', --- `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', --- `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', --- `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', --- `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', --- `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', --- `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', --- PRIMARY KEY (`ID`) USING BTREE --- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='专项组活动(参加人数、组织次数、平均参加人数)按月增量分析'; \ No newline at end of file +CREATE TABLE `fact_group_act_monthly` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `MONTH_ID` varchar(8) NOT NULL COMMENT '数据维度:yyyyMM', + `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', + `ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', + `PID` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pid=网格所属组织id;\r\n2)orgType=agency: pid=当前组织的上级组织', + `PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', + `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', + `PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', + `LEVEL` int(11) NOT NULL COMMENT '分类等级', + `ORGANIZE_INCR` int(11) NOT NULL COMMENT '本月内:活动组织次数', + `PARTICIPATE_USER__INCR` int(11) NOT NULL COMMENT '本月内:活动签到人数参加人数', + `AVG_PARTICIPATE_USER_INCR` int(11) NOT NULL COMMENT '本月内:平均参加人数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='专项组活动(参加人数、组织次数、平均参加人数)按月增量分析'; \ No newline at end of file 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 37ccee43f9..836d3a3b7a 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 @@ -64,34 +64,70 @@ -- -- Table structure for fact_grid_govern_daily -- -- ---------------------------- -- DROP TABLE IF EXISTS `fact_grid_govern_daily`; --- CREATE TABLE `fact_grid_govern_daily` ( --- `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键,customer_id+grid_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; ', --- `GRID_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格id', --- `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所属的组织id', --- `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所有上级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;此列存储的是小数', --- `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 COMMENT '11、未出当前网格的,结案项目数', --- `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 '更新时间', +-- 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', +-- `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至:yyyyMMdd; ', +-- `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', +-- `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', +-- `PIDS` varchar(255) NOT NULL COMMENT '网格所有上级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;此列存储的是小数', +-- `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、当前网格内,未出小组即未转议题的:话题关闭无需解决数', +-- `FROM_ISSUE_RESOLVED_IN_GRID_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '11、来源于议题的项目,未出网格结案并且已解决的项目数', +-- `FROM_ISSUE_UN_RESOLVED_IN_GRID_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '12、来源于议题的项目,未出网格结案并且无需解决的项目数', +-- `FROM_AGENCY_RESOLVED_IN_GRID_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '13、来源于项目立项的项目,未出网格结案,并且已解决的项目数;因现在网格不能立项,所以此列默认为0', +-- `FROM_AGENCY_UN_RESOLVED_IN_GRID_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '14、来源于项目立项的项目,未出网格结案,并且无需解决的项目数;因现在网格不能立项,所以此列默认为0', +-- `GRID_SELF_GOVERN_PROJECT_TOTAL` int(11) NOT NULL COMMENT '15、未出当前网格的,结案项目数=11+12+13+14', +-- `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 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网格的治理指数,按天统计' ROW_FORMAT = Dynamic; +-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='网格的治理指数,按天统计'; -- -- SET FOREIGN_KEY_CHECKS = 1; + +# 小组成员添加是否是党员 +ALTER TABLE `epmet_data_statistical`.`fact_origin_group_member_daily` + ADD COLUMN `IS_PARTY` tinyint(1) NULL DEFAULT 0 COMMENT '是否是党员' AFTER `ACTION_CODE`; + +# 项目主表添加结案项目是否满意 +ALTER TABLE `epmet_data_statistical`.`fact_origin_project_main_daily` + ADD COLUMN `IS_SATISFIED` tinyint(1) NULL COMMENT '是否满意 1:是' AFTER `IS_OVERDUE`; + +# 添加治理能力按日统计表 +CREATE TABLE `epmet_evaluation_index`.`screen_govern_rank_data_daily` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id', + `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至:yyyyMMdd', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(32) NOT NULL COMMENT '组织名称', + `RESPONSE_RATIO` decimal(10,6) DEFAULT NULL COMMENT '响应率', + `RESOLVED_RATIO` decimal(10,6) DEFAULT NULL COMMENT '解决率', + `GOVERN_RATIO` decimal(10,6) DEFAULT NULL COMMENT '自治率', + `SATISFACTION_RATIO` decimal(10,6) DEFAULT NULL COMMENT '满意率', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL 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`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基层治理-治理能力排行数据(按日统计)'; \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index c6e024c502..c76cfb8128 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -914,4 +914,37 @@ ON a.AGENCY_ID = b.AGENCY_ID + + diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.13__add_parameter.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.13__add_parameter.sql new file mode 100644 index 0000000000..4f8d970ed4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.13__add_parameter.sql @@ -0,0 +1 @@ +INSERT INTO `customer_project_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1007', 'default', 'satisfaction', '项目满意指标', '75', '评分小于当前分的为不满意', '0', 1, '1', '2020-10-26 10:57:41', '1', '2020-10-26 10:57:45');