From c032326cd19bd4cd75e7d82057081bfe8bb7676e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 May 2021 17:40:07 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B2=BB=E7=90=86=E6=8C=87=E6=95=B0?= =?UTF-8?q?=E7=BD=91=E6=A0=BCv2,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/ProjectConstant.java | 10 +++ .../FactOriginProjectMainDailyDao.java | 20 +++++ .../FactOriginProjectMainDailyService.java | 15 ++++ .../impl/FactGridGovernDailyServiceImpl.java | 82 ++++++++----------- ...FactOriginProjectMainDailyServiceImpl.java | 19 +++++ .../extract/FactOriginProjectMainDailyDao.xml | 33 ++++++++ 6 files changed, 133 insertions(+), 46 deletions(-) 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/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..b0b0abc786 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 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); for(FactGridGovernDailyEntity insertEntity:insertEntityList){ //1、当前网格内,话题关闭已解决数 @@ -112,18 +118,24 @@ 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; } - /** - * 7、当前网格内:项目立项,结案已解决数;默认为0, - * - * @param customerId - * @param gridId - */ - private Integer calApprovalProjectResolvedCount(String customerId, String gridId) { - // todo - return 0; - } - - /** - * 8、当前网格内:项目立项,结案无需解决数;默认为0, - * - * @param customerId - * @param gridId - */ - private Integer calApprovalProjectUnResolvedCount(String customerId, String gridId) { - // todo - return 0; - } /** * 9、当前网格内,未出小组即未转议题的:话题关闭已解决数 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/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 + + From ec6e94809e4c7e901e062b710f3caf4928b963ba Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 May 2021 18:29:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B2=BB=E7=90=86=E6=8C=87=E6=95=B0?= =?UTF-8?q?=E7=BD=91=E6=A0=BCv2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactGridGovernDailyEntity.java | 31 ++++++++- .../impl/FactGridGovernDailyServiceImpl.java | 65 ++++++++++--------- .../db/migration/V0.0.15__govern.sql | 60 +++++++++-------- 3 files changed, 93 insertions(+), 63 deletions(-) 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/impl/FactGridGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java index b0b0abc786..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 @@ -92,14 +92,17 @@ 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、当前网格内,话题关闭已解决数 @@ -110,6 +113,8 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl Date: Wed, 26 May 2021 10:02:39 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=94=AF=E9=83=A8=E5=BB=BA=E8=AE=BE?= =?UTF-8?q?=E3=80=81=E8=81=94=E5=BB=BA=E5=85=B1=E5=BB=BA=E7=9B=B8=E5=85=B3?= =?UTF-8?q?DB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.14__groupact_analysis.sql | 90 +++++++++---------- 1 file changed, 44 insertions(+), 46 deletions(-) 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 From f3338fc61eb40c8e2fb2e0aec3ecf7f825fc764f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 26 May 2021 10:06:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.15__govern.sql | 32 +++++++++++++++++++ .../db/migration/V0.0.13__add_parameter.sql | 1 + 2 files changed, 33 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.13__add_parameter.sql 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 8d469eec21..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 @@ -99,3 +99,35 @@ -- ) 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/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');