40 changed files with 1148 additions and 82 deletions
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 单客户-工作端微信小程序登录-发送验证码 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ThirdSendSmsCodeFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1852541457359282018L; |
||||
|
/** |
||||
|
* 小程序appId |
||||
|
*/ |
||||
|
@NotBlank(message = "appId不能为空", groups = {AddUserShowGroup.class}) |
||||
|
private String appId; |
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) |
||||
|
private String mobile; |
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup {} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.dataaggre.dto.datastats.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 治理实况-组织/网格下响应解决满意自治率-接口入参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GovrnRatioFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -3381286960911634231L; |
||||
|
/** |
||||
|
* 组织Id |
||||
|
*/ |
||||
|
@NotBlank(message = "组织或网格Id不能为空", groups = GovrnRatioFormDTO.AgencyGrid.class) |
||||
|
private String orgId; |
||||
|
/** |
||||
|
* 组织:agency 网格:grid |
||||
|
*/ |
||||
|
@NotBlank(message = "网格Id不能为空", groups = GovrnRatioFormDTO.AgencyGrid.class) |
||||
|
private String orgType; |
||||
|
/** |
||||
|
* 日维度Id[日期,不传值默认查前一天的【格式:20210101】] |
||||
|
*/ |
||||
|
private String dateId; |
||||
|
public interface AgencyGrid extends CustomerClientShowGroup {} |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.dataaggre.dto.datastats.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 治理实况-组织/网格下响应解决满意自治率-接口返参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GovrnRatioResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 466974582608407121L; |
||||
|
//组织或网格Id
|
||||
|
private String orgId; |
||||
|
//组织:agency 网格:grid
|
||||
|
private String orgType; |
||||
|
//响应率
|
||||
|
private String responseRatio = "0%"; |
||||
|
//解决率
|
||||
|
private String resolvedRatio = "0%"; |
||||
|
//自治率
|
||||
|
private String governRatio = "0%"; |
||||
|
//满意率
|
||||
|
private String satisfactionRatio = "0%"; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
/** |
||||
|
* 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.dao.evaluationindex; |
||||
|
|
||||
|
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 指标统计服务 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface EvaluationIndexDao { |
||||
|
|
||||
|
/** |
||||
|
* @Param formDTO |
||||
|
* @Description 按类型、日期查询治理指数下响应解决满意自治四个统计率 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
GovrnRatioResultDTO getAgnecyOrGridGoverRatio(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("dateId") String dateId); |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dataaggre.service.evaluationindex; |
||||
|
|
||||
|
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO; |
||||
|
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO; |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 指标统计服务 |
||||
|
*/ |
||||
|
public interface EvaluationIndexService { |
||||
|
|
||||
|
/** |
||||
|
* @Param formDTO |
||||
|
* @Description 治理实况-组织/网格下响应解决满意自治率 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.epmet.dataaggre.service.evaluationindex.impl; |
||||
|
|
||||
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
||||
|
import com.epmet.dataaggre.dao.datastats.DataStatsDao; |
||||
|
import com.epmet.dataaggre.dao.evaluationindex.EvaluationIndexDao; |
||||
|
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO; |
||||
|
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO; |
||||
|
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 指标统计服务 |
||||
|
*/ |
||||
|
@Service |
||||
|
@DataSource(DataSourceConstant.EVALUATION_INDEX) |
||||
|
@Slf4j |
||||
|
public class EvaluationIndexServiceImpl implements EvaluationIndexService { |
||||
|
@Autowired |
||||
|
private EvaluationIndexDao evaluationIndexDao; |
||||
|
|
||||
|
/** |
||||
|
* @Param formDTO |
||||
|
* @Description 按类型、日期查询治理指数下响应解决满意自治四个统计率 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
@Override |
||||
|
public GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO) { |
||||
|
return evaluationIndexDao.getAgnecyOrGridGoverRatio(formDTO.getOrgId(),formDTO.getOrgType(),formDTO.getDateId()); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dataaggre.dao.evaluationindex.EvaluationIndexDao"> |
||||
|
|
||||
|
<select id="getAgnecyOrGridGoverRatio" resultType="com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO"> |
||||
|
SELECT |
||||
|
org_id AS orgId, |
||||
|
org_type AS orgType, |
||||
|
CONCAT(ROUND(response_ratio, 1), '%') AS responseRatio, |
||||
|
CONCAT(ROUND(resolved_ratio, 1) , '%')AS resolvedRatio, |
||||
|
CONCAT(ROUND(govern_ratio, 1), '%') AS governRatio, |
||||
|
CONCAT(ROUND(satisfaction_ratio, 1), '%') AS satisfactionRatio |
||||
|
FROM |
||||
|
screen_govern_rank_data_daily |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND org_id = #{orgId} |
||||
|
AND org_type = #{orgType} |
||||
|
AND date_id = #{dateId} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.entity.evaluationindex.extract; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 网格的治理指数,按天统计 计算过程中,通用dto |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/25 13:43 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GovernGridTotalCommonDTO implements Serializable { |
||||
|
private String customerId; |
||||
|
private String gridId; |
||||
|
private Integer total; |
||||
|
} |
@ -1,49 +1,47 @@ |
|||||
-- epmet_data_statistical 库执行以下脚本 |
-- epmet_data_statistical 库执行以下脚本 |
||||
-- CREATE TABLE `fact_group_act_daily` ( |
CREATE TABLE `fact_group_act_daily` ( |
||||
-- `ID` varchar(64) NOT NULL COMMENT '主键', |
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
-- `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
-- `DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期Id:yyyyMMdd', |
`DATE_ID` varchar(8) NOT NULL COMMENT '数据更新至日期Id:yyyyMMdd', |
||||
-- `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', |
`ORG_ID` varchar(64) NOT NULL COMMENT '网格id', |
||||
-- `ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', |
`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=当前组织的上级组织', |
`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.', |
`PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', |
||||
-- `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', |
`CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', |
||||
-- `PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', |
`PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', |
||||
-- `LEVEL` int(11) NOT NULL COMMENT '分类等级', |
`LEVEL` int(11) NOT NULL COMMENT '分类等级', |
||||
-- `ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 组织次数;包含dateId这一天的数据', |
`ORGANIZE_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 组织次数;包含dateId这一天的数据', |
||||
-- `PARTICIPATE_USER_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这一天的数据', |
`AVG_PARTICIPATE_USER_TOTAL` int(11) NOT NULL COMMENT '截止到dateId: 平均参加人数;包含dateId这一天的数据', |
||||
-- `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', |
`DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', |
||||
-- `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
-- `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
-- `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
-- `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
-- `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
-- PRIMARY KEY (`ID`) USING BTREE |
PRIMARY KEY (`ID`) USING BTREE |
||||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组织活动(参加人数、组织次数、平均参加人数)按天累计值分析'; |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组织活动(参加人数、组织次数、平均参加人数)按天累计值分析'; |
||||
|
|
||||
|
|
||||
|
CREATE TABLE `fact_group_act_monthly` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
-- CREATE TABLE `fact_group_act_monthly` ( |
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
-- `ID` varchar(64) NOT NULL COMMENT '主键', |
`MONTH_ID` varchar(8) NOT NULL COMMENT '数据维度:yyyyMM', |
||||
-- `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
`ORG_ID` varchar(64) NOT NULL COMMENT '网格id', |
||||
-- `MONTH_ID` varchar(8) NOT NULL COMMENT '数据维度:yyyyMM', |
`ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', |
||||
-- `ORG_ID` varchar(64) NOT NULL COMMENT '网格id', |
`PID` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pid=网格所属组织id;\r\n2)orgType=agency: pid=当前组织的上级组织', |
||||
-- `ORG_TYPE` varchar(10) NOT NULL COMMENT '网格:grid;组织:agency', |
`PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', |
||||
-- `PID` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pid=网格所属组织id;\r\n2)orgType=agency: pid=当前组织的上级组织', |
`CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', |
||||
-- `PIDS` varchar(255) DEFAULT NULL COMMENT '1)orgType=grid: pids=网格所有上级组织,包括pid;\r\n2)orgType=agency: pids=当前组织的所有上级组织,包括pid.', |
`PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', |
||||
-- `CATEGORY_CODE` varchar(255) NOT NULL COMMENT '活动分类编码', |
`LEVEL` int(11) NOT NULL COMMENT '分类等级', |
||||
-- `PARENT_CODE` varchar(255) NOT NULL COMMENT '上级分类编码', |
`ORGANIZE_INCR` int(11) NOT NULL COMMENT '本月内:活动组织次数', |
||||
-- `LEVEL` int(11) NOT NULL COMMENT '分类等级', |
`PARTICIPATE_USER__INCR` int(11) NOT NULL COMMENT '本月内:活动签到人数参加人数', |
||||
-- `ORGANIZE_INCR` int(11) NOT NULL COMMENT '本月内:活动组织次数', |
`AVG_PARTICIPATE_USER_INCR` int(11) NOT NULL COMMENT '本月内:平均参加人数', |
||||
-- `PARTICIPATE_USER__INCR` int(11) NOT NULL COMMENT '本月内:活动签到人数参加人数', |
`DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', |
||||
-- `AVG_PARTICIPATE_USER_INCR` int(11) NOT NULL COMMENT '本月内:平均参加人数', |
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
-- `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', |
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
-- `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
-- `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
-- `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
-- `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
PRIMARY KEY (`ID`) USING BTREE |
||||
-- `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='专项组活动(参加人数、组织次数、平均参加人数)按月增量分析'; |
||||
-- PRIMARY KEY (`ID`) USING BTREE |
|
||||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='专项组活动(参加人数、组织次数、平均参加人数)按月增量分析'; |
|
@ -0,0 +1,133 @@ |
|||||
|
-- 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 |
||||
|
-- -- ---------------------------- |
||||
|
-- DROP TABLE IF EXISTS `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; |
||||
|
-- |
||||
|
-- -- ---------------------------- |
||||
|
-- -- Table structure for fact_grid_govern_daily |
||||
|
-- -- ---------------------------- |
||||
|
-- DROP TABLE IF EXISTS `fact_grid_govern_daily`; |
||||
|
-- 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 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='基层治理-治理能力排行数据(按日统计)'; |
@ -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'); |
Loading…
Reference in new issue