diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java
new file mode 100644
index 0000000000..959b5649c4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.indexcal;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.indexcal.AgencyScoreDTO;
+import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO;
+import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 区/街道相关分数表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-02
+ */
+@Mapper
+public interface AgencySubScoreDao extends BaseDao {
+
+ /**
+ * @param lists
+ * @Description 【街道】中间表插入
+ * @author zxc
+ * @date 2020/8/27 5:05 下午
+ */
+ void insertStreetRecord(@Param("lists") List lists);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @param indexCode
+ * @Description 删除旧记录
+ * @author zxc
+ * @date 2020/9/2 15:47
+ */
+ void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("dataType") String dataType);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @Description 查询【fact_index_agency_score】相关信息
+ * @author zxc
+ * @date 2020/9/1 9:41 上午
+ */
+ List selectAgencyScoreInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @Description 区下级街道得分平均值
+ * @author zxc
+ * @date 2020/8/31 1:51 下午
+ */
+ List selectAgencyScoreAvg(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("dataType") String dataType);
+
+
+ /**
+ * 根据入参查询 区/街道相关分数表 记录
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListAgencyScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * 批量插入区/街道相关分数表
+ *
+ * @param list
+ * @param customerId
+ * @return void
+ * @Author zhangyong
+ * @Date 11:11 2020-09-04
+ **/
+ void batchInsertAgencyScoreData(@Param("list") List list, @Param("customerId") String customerId);
+
+ /**
+ * 根据入参查询 区/街道相关分数表id
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListAgencyId(@Param("customerId") String customerId, @Param("monthId") String monthId);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java
new file mode 100644
index 0000000000..9caf146b4d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.indexcal;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.indexcal.SubCommunityAvgResultDTO;
+import com.epmet.dto.screen.FactIndexCommunityScoreDTO;
+import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 社区相关分数表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-31
+ */
+@Mapper
+public interface CommunitySubScoreDao extends BaseDao {
+
+ /**
+ * @param lists
+ * @Description 【社区】中间表插入
+ * @author zxc
+ * @date 2020/8/27 5:05 下午
+ */
+ void insertCommunityPartyRecord(@Param("lists") List lists);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @Description 删除旧记录
+ * @author zxc
+ * @date 2020/9/1 9:03 上午
+ */
+ void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @Description 查询社区相关信息
+ * @author zxc
+ * @date 2020/9/1 9:41 上午
+ */
+ List selectCommunityInfo(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * 根据入参查询 查询社区相关信息
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListCommunityScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @Description 街道下级所有社区得分平均值
+ * @author zxc
+ * @date 2020/8/31 1:51 下午
+ */
+ List selectSubCommAvgScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
+
+ /**
+ * 批量插入 社区相关分数表
+ *
+ * @param list
+ * @param customerId
+ * @return void
+ * @Author zhangyong
+ * @Date 11:11 2020-09-04
+ **/
+ void batchInsertCommunityScoreData(@Param("list") List list, @Param("customerId") String customerId);
+
+ /**
+ * 根据入参查询 查询社区id
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListCommunityId(@Param("customerId") String customerId, @Param("monthId") String monthId);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java
new file mode 100644
index 0000000000..8865f93609
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.indexcal;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.indexcal.CalculateCommonFormDTO;
+import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 党员相关分值
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-31
+ */
+@Mapper
+public interface CpcSubScoreDao extends BaseDao {
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @param gridId
+ * @return java.math.BigDecimal
+ * @author yinzuomei
+ * @description 获取网格内党员的联系群众能力考评分(平均值)
+ * @Date 2020/8/31 10:56
+ **/
+ BigDecimal selectGridContactMassesAvgValue(@Param("customerId") String customerId,
+ @Param("monthId") String monthId,
+ @Param("gridId") String gridId);
+
+ /**
+ * @param formDTO
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值
+ * @Date 2020/8/31 12:10
+ **/
+ List selectListGridContactMassesAvgValue(CalculateCommonFormDTO formDTO);
+
+ /**
+ * @param calculateCommonFormDTO
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 网格内党员的参与议事能力考评分(平均值) 最大值最小值
+ * @Date 2020/8/31 14:42
+ **/
+ List selectListJoinIssueAvgValue(CalculateCommonFormDTO calculateCommonFormDTO);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @param gridId
+ * @return java.math.BigDecimal
+ * @author yinzuomei
+ * @description 组织内党员的参与议事能力考评分(平均值)
+ * @Date 2020/8/31 15:51
+ **/
+ BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId);
+
+ int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
+
+ List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode);
+
+ int insertBatch(@Param("list") Collection values);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
new file mode 100644
index 0000000000..e084506452
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.indexcal;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.indexcal.DeptScoreDTO;
+import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO;
+import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 区直部门分值表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-02
+ */
+@Mapper
+public interface DeptSubScoreDao extends BaseDao {
+
+ /**
+ * 根据入参查询 区直部门分值表 记录
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListDeptScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * 批量插入 区直部门分值表
+ *
+ * @param list
+ * @param customerId
+ * @return void
+ * @Author zhangyong
+ * @Date 11:11 2020-09-04
+ **/
+ void batchInsertDeptScoreData(@Param("list") List list, @Param("customerId") String customerId);
+
+ /**
+ * 根据入参查询 区直部门分值表id
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.lang.String
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListDeptId(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @param indexCode
+ * @Description 所有直属部门治理能力平均值
+ * @author zxc
+ * @date 2020/9/4 10:53 上午
+ */
+ List selectGovernDeptScoreAvg(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @param deptId
+ * @return int
+ * @author yinzuomei
+ * @description
+ * @Date 2020/9/7 14:30
+ **/
+ int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("deptId") String deptId);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java
new file mode 100644
index 0000000000..e0cf724899
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.indexcal;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.indexcal.CalculateCommonFormDTO;
+import com.epmet.dto.indexcal.GridScoreDTO;
+import com.epmet.dto.screen.FactIndexGridScoreDTO;
+import com.epmet.dto.screen.result.SubGridAvgResultDTO;
+import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 网格相关分值
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-31
+ */
+@Mapper
+public interface GridSubScoreDao extends BaseDao {
+ /**
+ * @param customerId
+ * @param monthId
+ * @param indexCode
+ * @param isTotal 1:总分;0不是
+ * @return int
+ * @author yinzuomei
+ * @description
+ * @Date 2020/8/31 14:00
+ **/
+ int deleteByCusAndMonthId(@Param("customerId") String customerId,
+ @Param("monthId") String monthId,
+ @Param("indexCode") String indexCode,
+ @Param("isTotal") String isTotal);
+
+ /**
+ * @param gridScoreEntityList
+ * @return int
+ * @author yinzuomei
+ * @description
+ * @Date 2020/8/31 14:01
+ **/
+ int insertBatches(List gridScoreEntityList);
+
+ /**
+ * @param formDTO
+ * @return java.util.List
+ * @author yinzuomei
+ * @description
+ * @Date 2020/8/31 16:42
+ **/
+ List selectList(CalculateCommonFormDTO formDTO);
+
+ /**
+ * @param customerId
+ * @param monthId
+ * @Description 下属所有网格的平均值
+ * @author zxc
+ * @date 2020/8/28 3:20 下午
+ */
+ List selectSubGridAvgScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
+
+ /**
+ * 根据入参查询 网格相关分值记录
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListGridScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * 根据入参查询 网格id
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @Author zhangyong
+ * @Date 10:43 2020-09-03
+ **/
+ List selectListGridId(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ /**
+ * 批量插入 网格相关分值表
+ *
+ * @param list
+ * @param customerId
+ * @return void
+ * @Author zhangyong
+ * @Date 11:11 2020-09-04
+ **/
+ void batchInsertGridScoreData(@Param("list") List list, @Param("customerId") String customerId);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
new file mode 100644
index 0000000000..a3e18f4b4f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.evaluationindex.indexcal;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 区/街道相关分数表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("fact_index_sub_agency_score")
+public class AgencySubScoreEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 组织id(eg:社区或者街道id)
+ */
+ private String agencyId;
+
+ /**
+ * 上级组织id
+ */
+ private String parentAgencyId;
+
+ /**
+ * 年度ID: yyyy
+ */
+ private String yearId;
+
+ /**
+ * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
+ */
+ private String quarterId;
+
+ /**
+ * 月维度Id: yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 1:总分;0不是;默认0
+ */
+ private String isTotal;
+
+ /**
+ * 分值
+ */
+ private BigDecimal score;
+
+ /**
+ * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan
+ */
+ private String indexCode;
+
+ /**
+ * 数据类型 district :全区;street:街道
+ */
+ private String dataType;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java
new file mode 100644
index 0000000000..e69c222258
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.evaluationindex.indexcal;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 党员相关分值
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-31
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("fact_index_sub_cpc_score")
+public class CpcSubScoreEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 网格所属的机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 网格Id
+ */
+ private String gridId;
+
+
+ /**
+ * 年维度Id: yyyy
+ */
+ private String yearId;
+
+ /**
+ * 月维度Id: yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 分值
+ */
+ private BigDecimal score;
+
+ /**
+ * 指标code
+ */
+ private String indexCode;
+
+ /**
+ * 所有指标code拼接的字符串 冒号隔开
+ */
+ private String allParentIndexCode;
+
+ /**
+ * 是否是总分 1是0不是
+ */
+ private String isTotal;
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java
new file mode 100644
index 0000000000..476f3c2568
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.evaluationindex.indexcal;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 区直部门分值表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("fact_index_sub_dept_score")
+public class DeptSubScoreEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 部门id
+ */
+ private String deptId;
+
+ /**
+ * 部门所属的组织id
+ */
+ private String agencyId;
+
+ /**
+ * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID: yyyy
+ */
+ private String yearId;
+
+ /**
+ * 月维度Id: yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 1:总分;0不是;默认0
+ */
+ private String isTotal;
+
+ /**
+ * 分值
+ */
+ private BigDecimal score;
+
+ /**
+ * 治理能力:zhilinengli;
+ */
+ private String indexCode;
+
+ /**
+ * 所有指标code拼接的字符串 冒号隔开
+ */
+ private String allParentIndexCode;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java
new file mode 100644
index 0000000000..ad99f92586
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.evaluationindex.indexcal;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 网格相关分值
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-31
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("fact_index_sub_grid_score")
+public class GridSubScoreEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 网格Id
+ */
+ private String gridId;
+
+ /**
+ * 网格所属的机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 所有上级ID,用英文逗号分开
+ */
+ private String allParentIds;
+
+ /**
+ * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID: yyyy
+ */
+ private String yearId;
+
+ /**
+ * 月维度Id: yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 1:总分;0不是
+ */
+ private String isTotal;
+
+ /**
+ * 分值
+ */
+ private BigDecimal score;
+
+ /**
+ * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan
+ */
+ private String indexCode;
+
+ /**
+ * 所有指标code拼接的字符串 冒号隔开
+ */
+ private String allParentIndexCode;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml
new file mode 100644
index 0000000000..57bb0cd700
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+ INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
+ VALUES
+
+ (
+ REPLACE ( UUID(), '-', '' ),
+ #{item.customerId},
+ #{item.agencyId},
+ #{item.parentAgencyId},
+ #{item.yearId},
+ #{item.quarterId},
+ #{item.monthId},
+ #{item.dataType},
+ #{item.score},
+ #{item.indexCode},
+ #{item.delFlag},
+ #{item.revision},
+ #{item.createdBy},
+ NOW(),
+ #{item.updatedBy},
+ NOW()
+ )
+
+
+
+
+
+ DELETE
+ FROM
+ fact_index_agency_score
+ WHERE
+ del_flag = '0'
+ AND customer_id = #{customerId}
+ AND month_id = #{monthId}
+ AND index_code = #{indexCode}
+ AND data_type = #{dataType}
+
+
+
+ SELECT
+ CUSTOMER_ID customerId,
+ AGENCY_ID agencyId,
+ PARENT_AGENCY_ID parentAgencyId,
+ YEAR_ID yearId,
+ MONTH_ID monthId,
+ SCORE score,
+ INDEX_CODE indexCode
+ FROM
+ fact_index_agency_score
+ WHERE
+ DEL_FLAG = '0'
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ ORDER BY AGENCY_ID
+
+
+
+
+ SELECT
+ CUSTOMER_ID,
+ AGENCY_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ SCORE,
+ INDEX_CODE,
+ PARENT_AGENCY_ID
+ FROM
+ fact_index_agency_score
+ WHERE
+ del_flag = 0
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ AND INDEX_CODE != "jiedaoxiangguan"
+ AND data_type = #{dataType}
+
+
+
+ SELECT
+ fics.agency_id,
+ fics.month_id,
+ fics.quarter_id,
+ fics.year_id,
+ ROUND(AVG( fics.score ),6) AS score,
+ fics.customer_id,
+ PARENT_AGENCY_ID AS parentId
+ FROM
+ fact_index_agency_score fics
+ WHERE
+ fics.del_flag = '0'
+ AND fics.customer_id = #{customerId}
+ AND fics.month_id = #{monthId}
+ AND fics.index_code = #{indexCode}
+ AND fics.DATA_TYPE = #{dataType}
+ GROUP BY fics.parent_agency_id
+
+
+
+ insert into fact_index_agency_score
+ (
+ ID,
+ CUSTOMER_ID,
+
+ AGENCY_ID,
+ PARENT_AGENCY_ID,
+ YEAR_ID,
+ QUARTER_ID,
+ MONTH_ID,
+ DATA_TYPE,
+ SCORE,
+ INDEX_CODE,
+
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{customerId},
+ #{item.agencyId},
+ #{item.parentAgencyId},
+
+ #{item.yearId},
+ #{item.quarterId},
+ #{item.monthId},
+ #{item.dataType},
+ #{item.score},
+ #{item.indexCode},
+ 0,
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
+
+ SELECT
+ AGENCY_ID agencyId
+ FROM
+ fact_index_agency_score
+ WHERE
+ DEL_FLAG = '0'
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ ORDER BY AGENCY_ID
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml
new file mode 100644
index 0000000000..48b171c119
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+ DELETE
+ FROM
+ fact_index_community_score
+ WHERE
+ del_flag = '0'
+ AND customer_id = #{customerId}
+ AND month_id = #{monthId}
+
+
+
+
+
+
+
+ SELECT
+ fics.PARENT_AGENCY_ID AS agencyId,
+ fics.month_id,
+ fics.quarter_id,
+ fics.year_id,
+ ROUND(AVG( fics.score ),6) AS score,
+ fics.customer_id,
+ sca.pid AS parentId
+ FROM
+ fact_index_community_score fics
+ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.PARENT_AGENCY_ID
+ WHERE
+ fics.del_flag = '0'
+ AND sca.DEL_FLAG = 0
+ AND fics.customer_id = #{customerId}
+ AND fics.month_id = #{monthId}
+ AND fics.index_code = #{indexCode}
+ GROUP BY fics.parent_agency_id
+
+
+
+
+
+
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml
new file mode 100644
index 0000000000..8372a60608
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+ delete from fact_index_cpc_score
+ where
+ CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
+ and MONTH_ID = #{monthId,jdbcType=VARCHAR}
+
+ and INDEX_CODE = #{indexCode,jdbcType=VARCHAR}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select
+ CUSTOMER_ID,AGENCY_ID,GRID_ID,YEAR_ID,MONTH_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score
+ WHERE
+ CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
+ and MONTH_ID = #{monthId,jdbcType=VARCHAR}
+ and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR}
+
+
+
+
+
+ SELECT
+ round(AVG( SCORE ),6) AS AVG_CONTACT_MASSES_SCORE
+ FROM
+ fact_index_cpc_score m
+ WHERE
+ m.DEL_FLAG = '0'
+ AND m.CUSTOMER_ID =#{customerId}
+ AND m.MONTH_ID = #{monthId}
+ AND m.GRID_ID = #{gridId}
+ and m.INDEX_CODE='lianxiqunzhong'
+ GROUP BY
+ m.GRID_ID
+
+
+
+
+ SELECT
+ round(AVG( SCORE ),6) AS AVG_CONTACT_MASSES_SCORE
+ FROM
+ fact_index_cpc_score m
+ WHERE
+ m.DEL_FLAG = '0'
+ AND m.CUSTOMER_ID =#{customerId}
+ AND m.MONTH_ID = #{monthId}
+ and m.INDEX_CODE='lianxiqunzhong'
+ GROUP BY
+ m.GRID_ID
+
+
+
+
+ SELECT
+ round(AVG( SCORE ),6) AS AVG_JOIN_ISSUE_SCORE
+ FROM
+ fact_index_cpc_score m
+ WHERE
+ m.DEL_FLAG = '0'
+ AND m.CUSTOMER_ID =#{customerId}
+ AND m.MONTH_ID = #{monthId}
+ and m.INDEX_CODE='canyuyishi'
+ GROUP BY
+ m.GRID_ID
+
+
+
+
+ SELECT
+ round(AVG( SCORE ),6) AS AVG_CONTACT_MASSES_SCORE
+ FROM
+ fact_index_cpc_score m
+ WHERE
+ m.DEL_FLAG = '0'
+ AND m.CUSTOMER_ID =#{customerId}
+ AND m.MONTH_ID = #{monthId}
+ AND m.GRID_ID = #{gridId}
+ and m.INDEX_CODE='canyuyishi'
+ GROUP BY
+ m.GRID_ID
+
+
+
+ INSERT INTO `fact_index_cpc_score` (
+ `ID`,
+ `CUSTOMER_ID`,
+ `GRID_ID`,
+ `AGENCY_ID`,
+ `YEAR_ID`,
+ `MONTH_ID`,
+ `USER_ID`,
+ `SCORE`,
+ `INDEX_CODE`,
+ `ALL_PARENT_INDEX_CODE`,
+ `DEL_FLAG`,
+ `REVISION`,
+ `CREATED_BY`,
+ `CREATED_TIME`,
+ `UPDATED_BY`,
+ `UPDATED_TIME`
+ )
+ VALUES
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.gridId},
+ #{item.agencyId},
+ #{item.yearId},
+ #{item.monthId},
+ #{item.userId},
+ #{item.score},
+ #{item.indexCode},
+ #{item.allParentIndexCode},
+ 0,
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml
new file mode 100644
index 0000000000..f75bed424b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+ SELECT
+ CUSTOMER_ID customerId,
+ DEPT_ID deptId,
+ YEAR_ID yearId,
+ MONTH_ID monthId,
+ SCORE score,
+ INDEX_CODE indexCode
+ FROM
+ fact_index_dept_score
+ WHERE
+ DEL_FLAG = '0'
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ ORDER BY DEPT_ID
+
+
+
+
+ SELECT
+ fidc.agency_id,
+ fidc.month_id,
+ fidc.quarter_id,
+ fidc.year_id,
+ AVG( fidc.score ) AS score,
+ fidc.customer_id,
+ sca.pid AS parentId
+ FROM
+ fact_index_dept_score fidc
+ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fidc.AGENCY_ID
+ WHERE
+ fidc.del_flag = '0'
+ AND fidc.customer_id = #{customerId}
+ AND fidc.month_id = #{monthId}
+ AND fidc.index_code = #{indexCode}
+ GROUP BY fidc.agency_id
+
+
+
+ insert into fact_index_dept_score
+ (
+ ID,
+ CUSTOMER_ID,
+ DEPT_ID,
+ AGENCY_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ MONTH_ID,
+ SCORE,
+ INDEX_CODE,
+
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{customerId},
+ #{item.deptId},
+ #{item.agencyId},
+ #{item.quarterId},
+ #{item.yearId},
+
+ #{item.monthId},
+ #{item.score},
+ #{item.indexCode},
+ #{item.delFlag},
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
+
+ SELECT
+ DEPT_ID deptId
+ FROM
+ fact_index_dept_score
+ WHERE
+ DEL_FLAG = '0'
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ ORDER BY DEPT_ID
+
+
+
+ delete from fact_index_dept_score where CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ and DEPT_ID=#{deptId}
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml
new file mode 100644
index 0000000000..54d36b195e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+ DELETE
+ FROM
+ fact_index_grid_score
+ WHERE
+ CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ AND INDEX_CODE = #{indexCode}
+
+
+
+ INSERT INTO `fact_index_grid_score` (
+ `ID`,
+ `CUSTOMER_ID`,
+ `GRID_ID`,
+ `AGENCY_ID`,
+ `ALL_PARENT_IDS`,
+ `QUARTER_ID`,
+ `YEAR_ID`,
+ `MONTH_ID`,
+ `SCORE`,
+ `INDEX_CODE`,
+ `DEL_FLAG`,
+ `REVISION`,
+ `CREATED_BY`,
+ `CREATED_TIME`,
+ `UPDATED_BY`,
+ `UPDATED_TIME`
+ )
+ VALUES
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{item.customerId},
+ #{item.gridId},
+ #{item.agencyId},
+ #{item.allParentIds},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.monthId},
+ #{item.isTotal},
+ #{item.score},
+ #{item.indexCode},
+ 0,
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ m.GRID_ID,
+ m.CUSTOMER_ID,
+ m.AGENCY_ID,
+ m.ALL_PARENT_IDS,
+ m.QUARTER_ID,
+ m.YEAR_ID,
+ m.MONTH_ID,
+ M.SCORE,
+ M.INDEX_CODE
+ FROM
+ fact_index_grid_score m
+ WHERE
+ m.DEL_FLAG = '0'
+ AND m.CUSTOMER_ID =#{customerId}
+ AND m.MONTH_ID =#{monthId}
+
+
+
+
+
+
+ SELECT
+ figc.agency_id AS agencyId,
+ figc.month_id as monthId,
+ figc.quarter_id as quarterId,
+ figc.year_id as yearId,
+ ROUND(AVG( figc.score ),6) AS score,
+ figc.customer_id as customerId,
+ sca.pid AS parentId
+ FROM
+ fact_index_grid_score figc
+ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = figc.AGENCY_ID
+ WHERE
+ figc.del_flag = '0'
+ AND sca.DEL_FLAG = 0
+ AND figc.customer_id = #{customerId}
+ AND figc.month_id = #{monthId}
+ AND figc.index_code = #{indexCode}
+ GROUP BY figc.agency_id
+
+
+
+ SELECT
+ CUSTOMER_ID customerId,
+ GRID_ID gridId,
+ AGENCY_ID agencyId,
+ YEAR_ID yearId,
+ MONTH_ID monthId,
+ SCORE score,
+ INDEX_CODE indexCode
+ FROM
+ fact_index_grid_score
+ WHERE
+ DEL_FLAG = '0'
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ ORDER BY GRID_ID
+
+
+
+ insert into fact_index_grid_score
+ (
+ ID,
+ CUSTOMER_ID,
+ GRID_ID,
+ AGENCY_ID,
+ ALL_PARENT_IDS,
+ QUARTER_ID,
+ YEAR_ID,
+ MONTH_ID,
+ SCORE,
+ INDEX_CODE,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+ #{customerId},
+ #{item.gridId},
+ #{item.agencyId},
+ #{item.allParentIds},
+ #{item.quarterId},
+
+ #{item.yearId},
+ #{item.monthId},
+ #{item.score},
+ #{item.indexCode},
+ #{item.delFlag},
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
+
+ SELECT
+ GRID_ID gridId
+ FROM
+ fact_index_grid_score
+ WHERE
+ DEL_FLAG = '0'
+ AND CUSTOMER_ID = #{customerId}
+ AND MONTH_ID = #{monthId}
+ ORDER BY GRID_ID
+
+
+
\ No newline at end of file