diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/IndexDictResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/IndexDictResultDTO.java new file mode 100644 index 0000000000..196837f220 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/IndexDictResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 评价指标字典表数据--接口返参 + * @Author sun + */ +@Data +public class IndexDictResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 指标名 + */ + private String indexName; + /** + * 指标code + */ + private String indexCode; + /** + * 指标值类型 百分比:percent + */ + private String valueType; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java index c5744d0cdd..16637a9896 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * @Description 3、公众参与概况返参DTO @@ -24,7 +25,7 @@ public class PublicPartiProfileResultDTO implements Serializable { * */ private String monthTrend = ""; - private Integer averageIssue = NumConstant.ZERO; + private BigDecimal averageIssue = new BigDecimal(NumConstant.ZERO); /** * 较上月百分比 @@ -38,8 +39,8 @@ public class PublicPartiProfileResultDTO implements Serializable { /** * 平均参与度 - * */ - private Integer averageJoin = NumConstant.ZERO; + */ + private BigDecimal averageJoin = new BigDecimal(NumConstant.ZERO); private String joinCompareLatestMonth = ""; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/FactConstant.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/FactConstant.java index 70c5614f65..4e2449c81c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/FactConstant.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/FactConstant.java @@ -45,4 +45,20 @@ public interface FactConstant { * 网格相关 */ String WANG_GE_XIANG_GUAN = "wanggexiangguan"; + /** + * 评价指标类型-无 + */ + String NONE = "none"; + /** + * 评价指标类型-整数 + */ + String INTEGER = "integer"; + /** + * 评价指标类型-小数 + */ + String DECIMAL = "decimal"; + /** + * 评价指标类型-百分比 + */ + String PERCENT = "percent"; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/IndexDictDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/IndexDictDao.java new file mode 100644 index 0000000000..893820cf1c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/IndexDictDao.java @@ -0,0 +1,49 @@ +/** + * 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.datareport.dao.fact; + +import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface IndexDictDao { + + /** + * @param + * @Description 查询指标字典表是百分比类型的数据 + * @author sun + */ + List selectList(); + + /** + * @param + * @Description 根据indexCode查询指标字典表具体数据 + * @author sun + */ + IndexDictResultDTO selectIndexDict(@Param("indexCode") String indexCode); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 93276c8725..fe09c575db 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -270,6 +270,9 @@ public class IndexServiceImpl implements IndexService { //screen_index_data_monthly 根据组织id和月份获取月度指标得分 //1.根据组织或网格Id以及月份Id查询各项月度指数得分 IndexScoreResultDTO resultDTO = screenIndexDataMonthlyDao.selectMonthData(formDTO); + if (null == resultDTO) { + return resultDTO; + } //2.将数据改成正确格式 四舍五入保留一位小数 权重转成百分比 NumberFormat nf = NumberFormat.getPercentInstance(); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java index 523bf3a7e5..68b3fd1f60 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java @@ -15,12 +15,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.text.NumberFormat; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.LinkedList; -import java.util.List; +import java.util.*; /** * 数据改版api @@ -47,6 +45,8 @@ public class FactIndexServiceImpl implements FactIndexService { private FactIndexGridScoreDao factIndexGridScoreDao; @Autowired private FactIndexGridSubScoreDao factIndexGridSubScoreDao; + @Autowired + private IndexDictDao indexDictDao; /** * @param formDTO @@ -125,19 +125,27 @@ public class FactIndexServiceImpl implements FactIndexService { AblityIndexResultDTO nl = new AblityIndexResultDTO(); nl.setIndexCode(FactConstant.NLZB); nl.setScoreList(nlList); - if(null != nlList){resultList.add(nl);} + if (null != nlList) { + resultList.add(nl); + } AblityIndexResultDTO dj = new AblityIndexResultDTO(); dj.setIndexCode(FactConstant.DJNL); dj.setScoreList(djList); - if(null != djList){resultList.add(dj);} + if (null != djList) { + resultList.add(dj); + } AblityIndexResultDTO zl = new AblityIndexResultDTO(); zl.setIndexCode(FactConstant.ZLNL); zl.setScoreList(zlList); - if(null != zlList){resultList.add(zl);} + if (null != zlList) { + resultList.add(zl); + } AblityIndexResultDTO fw = new AblityIndexResultDTO(); fw.setIndexCode(FactConstant.FWNL); fw.setScoreList(fwList); - if(null != fwList){resultList.add(fw);} + if (null != fwList) { + resultList.add(fw); + } return resultList; } @@ -203,9 +211,15 @@ public class FactIndexServiceImpl implements FactIndexService { throw new RenException(String.format("按月份查询各项能力分数,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); } //5.封装数据并返回 - if(null != dj){resultList.add(dj);} - if(null != zl){resultList.add(zl);} - if(null != fw){resultList.add(fw);} + if (null != dj) { + resultList.add(dj); + } + if (null != zl) { + resultList.add(zl); + } + if (null != fw) { + resultList.add(fw); + } return resultList; } @@ -278,15 +292,21 @@ public class FactIndexServiceImpl implements FactIndexService { MonthScoreListResultDTO dj = new MonthScoreListResultDTO(); dj.setIndexCode(FactConstant.DJNL); dj.setScoreList(djList); - if(null != djList){resultList.add(dj);} + if (null != djList) { + resultList.add(dj); + } MonthScoreListResultDTO zl = new MonthScoreListResultDTO(); zl.setIndexCode(FactConstant.ZLNL); zl.setScoreList(zlList); - if(null != zlList){resultList.add(zl);} + if (null != zlList) { + resultList.add(zl); + } MonthScoreListResultDTO fw = new MonthScoreListResultDTO(); fw.setIndexCode(FactConstant.FWNL); fw.setScoreList(fwList); - if(null != fwList){resultList.add(fw);} + if (null != fwList) { + resultList.add(fw); + } return resultList; } @@ -333,7 +353,28 @@ public class FactIndexServiceImpl implements FactIndexService { throw new RenException(String.format("按月查询各项指标数据,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); } - //4.调用方法判断各项指标是数字指标还是百分比指标 //TODO 记得value值保留一位小数 是数的保留零位小数 是百分比的保留一位小数 + //4.查询指标字典表数据 + List list = indexDictDao.selectList(); + //5.遍历数据,判断数据类型并处理 + /*NumberFormat nf = NumberFormat.getPercentInstance(); + nf.setMaximumFractionDigits(1);*/ + resultList.forEach(result -> { + list.forEach(l -> { + if (result.getKey().equals(l.getIndexCode())) { + //小数类型,四舍五入保留小数点后一位 + if (FactConstant.DECIMAL.equals(l.getValueType())) { + BigDecimal num = new BigDecimal(result.getValue()).setScale(1, BigDecimal.ROUND_HALF_UP); + result.setValue(num.toString()); + } + //百分数类型,四舍五入保留小数点后一位并转成百分比 + if (FactConstant.PERCENT.equals(l.getValueType())) { + BigDecimal num = new BigDecimal(result.getValue()).setScale(1, BigDecimal.ROUND_HALF_UP); + result.setValue(num+"%"); + } + } + }); + }); + return resultList; } @@ -373,7 +414,30 @@ public class FactIndexServiceImpl implements FactIndexService { throw new RenException(String.format("按月查询各项指标最近12个月数据,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); } - //6.调用方法判断各项指标是数字指标还是百分比指标//TODO 记得value值保留一位小数 是数的保留零位小数 是百分比的保留一位小数 + //6.查询指标字典表具体数据 + IndexDictResultDTO dictDTO = indexDictDao.selectIndexDict(formDTO.getKey()); + if (null == dictDTO) { + throw new RenException(String.format("根据评价指标indexCode未查询到字典表数据,indexCode值:%s", formDTO.getKey())); + } + + //7.遍历数据,判断数据类型并处理 + /*NumberFormat nf = NumberFormat.getPercentInstance(); + nf.setMaximumFractionDigits(1);*/ + //小数类型,四舍五入保留小数点后一位 + if (FactConstant.DECIMAL.equals(dictDTO.getValueType())) { + resultList.forEach(result -> { + BigDecimal num = new BigDecimal(result.getAblity()).setScale(1, BigDecimal.ROUND_HALF_UP); + result.setAblity(num.toString()); + }); + } + //百分数类型,四舍五入保留小数点后一位并转成百分比 + if (FactConstant.PERCENT.equals(dictDTO.getValueType())) { + resultList.forEach(result -> { + BigDecimal num = new BigDecimal(result.getAblity()).setScale(1, BigDecimal.ROUND_HALF_UP); + result.setAblity(num+"%"); + }); + } + return resultList; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml index 879d8b521e..9744157016 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml @@ -6,7 +6,7 @@ SELECT fact.month_id AS "monthId", - IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "ablity" + IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "ablity" FROM fact_index_agency_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml index 8c8e780259..197b6f9bf9 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml @@ -6,7 +6,7 @@ SELECT fact.month_id AS "monthId", - IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "ablity" + IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "ablity" FROM fact_index_community_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml index d48f24966e..1b317e2791 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml @@ -6,7 +6,7 @@ SELECT fact.month_id AS "monthId", - IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "ablity" + IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "ablity" FROM fact_index_grid_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/IndexDictDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/IndexDictDao.xml new file mode 100644 index 0000000000..0784877dda --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/IndexDictDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index cbbc5fe211..7d7cde6449 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -7,10 +7,10 @@ + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml index 734f088d09..d54794d323 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml @@ -95,6 +95,23 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml index 75762c410c..b1085f5058 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml @@ -267,4 +267,28 @@ AND t1.CUSTOMER_ID = #{customerId} and t1.PIDS LIKE CONCAT(#{agencyPath},'%') + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 38fa735f61..f9c0d6d56b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -252,4 +252,72 @@ GROUP BY f.AGENCY_ID ) b ON a.AGENCY_ID = b.AGENCY_ID + + \ 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 72ee315d52..8b870a8d14 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 @@ -282,6 +282,30 @@ fm.GRID_ID) b ON a.GRID_ID = b.GRID_ID + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml index 4e6dd8a925..40b67c3951 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml @@ -153,4 +153,28 @@ AND m.CUSTOMER_ID = #{customerId} AND m.PIDS LIKE CONCAT(#{agencyPath},'%') + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index dfdf6c3b59..3a4250d1ad 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -120,7 +120,8 @@ AGENCY_ID, MONTH_ID, YEAR_ID, - SATISFACTION_RATIO + SATISFACTION_RATIO, + CLOSED_PROJECT_RATIO FROM fact_index_govrn_ablity_org_monthly WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml index 2cf5f7dc33..95b8e20845 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml @@ -8,6 +8,63 @@ where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} limit 1000; + + delete from screen_org_rank_data + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + + and ORG_TYPE=#{orgType} + + + and + ( + + ORG_ID = #{orgId} + + ) + + limit #{deleteSize} + + + insert into screen_org_rank_data diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyBranchDataDao.xml index ae9430e214..c8b84d14b4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyBranchDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyBranchDataDao.xml @@ -128,8 +128,8 @@ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPublicPartiTotalDataDao.xml index 0c2bfa9c51..1b33f8b0ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPublicPartiTotalDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPublicPartiTotalDataDao.xml @@ -77,5 +77,50 @@ - + + + insert into screen_public_parti_total_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + DATA_END_TIME, + TOPIC_TOTAL, + ISSUE_TOTAL, + PROJECT_TOTAL, + REG_USER_TOTAL, + JOIN_USER_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.dataEndTime}, + #{item.topicTotal}, + #{item.issueTotal}, + #{item.projectTotal}, + #{item.regUserTotal}, + #{item.joinUserTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml index e8c0e8c660..c3b3ef7de7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml @@ -105,4 +105,12 @@ + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml index 3b5bc0edcf..055d888c7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml @@ -51,7 +51,9 @@ AND ACT_STATUS = 'finished' AND CUSTOMER_ID = #{customerId} AND DATE_FORMAT( ACTUAL_END_TIME, '%Y%m' ) = #{monthId} - AND SPONSOR_TYPE = #{orgType} + + AND SPONSOR_TYPE = #{orgType} + AND ( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml index ae81f1cbe2..4d49a71968 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActUserRelation.xml @@ -10,7 +10,7 @@ COUNT(asr.USER_ID) AS joinUserCount FROM act_user_relation asr - LEFT JOIN act_info ai ON asr.ACT_ID = ai.ID + LEFT JOIN act_info ai ON asr.ACT_ID = ai.ID WHERE ai.DEL_FLAG = 0 AND asr.DEL_FLAG = '0' @@ -18,7 +18,9 @@ AND asr.REWARD_FLAG = 'agree' AND ai.CUSTOMER_ID = #{customerId} AND DATE_FORMAT( ai.ACTUAL_END_TIME, '%Y%m' ) = #{monthId} - AND ai.SPONSOR_TYPE = 'agency' + + AND ai.SPONSOR_TYPE = #{orgType} + GROUP BY ai.SPONSOR_ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml index 8b74563b15..b83e517441 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml @@ -15,7 +15,8 @@ SELECT ID, CUSTOMER_ID, - AGENCY_ID + AGENCY_ID, + GRID_NAME FROM dim_grid WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml index 45f53d10cc..2aab89ada4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml @@ -71,4 +71,13 @@ da.ID + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml index aa8548ff1c..7d01629a99 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml @@ -101,5 +101,31 @@ AND CUSTOMER_ID = #{customerId} - + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml index 42e736c90c..209d13e228 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml @@ -111,7 +111,8 @@ SELECT REG_INCR, PARTYMEMBER_INCR, - GRID_ID + GRID_ID as orgId, + REG_TOTAL FROM fact_reg_user_grid_monthly WHERE @@ -119,6 +120,17 @@ AND CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + \ No newline at end of file