From e9710a261f57e1dea92a26cf240e6322b140beb3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Sep 2020 10:05:02 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E5=85=A8=E5=8C=BA=EF=BC=8C=E8=A1=97?= =?UTF-8?q?=E9=81=93=EF=BC=8C=E7=A4=BE=E5=8C=BA=E4=BF=AE=E6=94=B9=E4=BA=94?= =?UTF-8?q?=E7=BA=A7=E6=8C=87=E6=A0=87=E5=88=86=E6=95=B0=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/AgencyCalResultDTO.java | 20 +++++++++ .../dto/indexcal/CommunityCalResultDTO.java | 21 +++++++++ .../indexcal/AgencySubScoreDao.java | 3 +- .../IndexCalculateCommunityServiceImpl.java | 36 ++++++++++----- .../IndexCalculateDistrictServiceImpl.java | 45 ++++++++++++++----- .../impl/IndexCalculateStreetServiceImpl.java | 43 +++++++++++++----- .../indexcal/AgencySubScoreDao.xml | 6 +-- .../indexcal/CommunitySubScoreDao.xml | 4 +- 8 files changed, 135 insertions(+), 43 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java new file mode 100644 index 0000000000..0287801453 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/9 5:52 下午 + */ +@Data +public class AgencyCalResultDTO implements Serializable { + + private static final long serialVersionUID = 2482954776048082386L; + + private List oneTwoLevel; + + private List fiveLevel; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java new file mode 100644 index 0000000000..f8325206c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.indexcal; + +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/10 9:19 上午 + */ +@Data +public class CommunityCalResultDTO implements Serializable { + + private static final long serialVersionUID = 2482954776048082386L; + + private List oneLevel; + + private List fiveLevel; +} 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 index 959b5649c4..d6e8cc32c9 100644 --- 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 @@ -46,12 +46,11 @@ public interface AgencySubScoreDao extends BaseDao { /** * @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); + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType); /** * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index d98981e803..70484fd74c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -9,10 +9,12 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao; +import com.epmet.dao.evaluationindex.indexcal.CommunitySubScoreDao; import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dto.indexcal.CommunityCalResultDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; import com.epmet.dto.screen.result.SubGridAvgResultDTO; @@ -63,6 +65,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni private CommunityScoreDao factIndexCommunityScoreDao; @Autowired private GridScoreDao factIndexGridScoreDao; + @Autowired + private CommunitySubScoreDao communitySubScoreDao; /** * @param customerId @@ -136,7 +140,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityPartyCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + communitySubScoreDao.deleteOldRecord(customerId,monthId); factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId); deleteAndInsert(result); return true; @@ -211,7 +216,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityGovernAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -285,7 +290,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityServiceAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -325,7 +330,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); result.add(score); }); - deleteAndInsert(result); + factIndexCommunityScoreDao.insertCommunityPartyRecord(result); return true; } @@ -372,15 +377,18 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } /** - * @param subAllGridList + * @param result * @Description 先删除记录,在插入 * @author zxc * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(List subAllGridList) { - if (!CollectionUtils.isEmpty(subAllGridList)) { - factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + public void deleteAndInsert(CommunityCalResultDTO result) { + if (!CollectionUtils.isEmpty(result.getOneLevel())) { + factIndexCommunityScoreDao.insertCommunityPartyRecord(result.getOneLevel()); + } + if (!CollectionUtils.isEmpty(result.getFiveLevel())){ + communitySubScoreDao.insertCommunityPartyRecord(result.getFiveLevel()); } } @@ -394,8 +402,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/9/2 2:37 下午 */ - public List getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,String allParentIndexCode, Map pid) { - List result = new ArrayList<>(); + public CommunityCalResultDTO getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,String allParentIndexCode, Map pid) { + CommunityCalResultDTO result = new CommunityCalResultDTO(); + List resultOne = new ArrayList<>(); + List resultFive = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { FactIndexCommunityScoreDTO score = new FactIndexCommunityScoreDTO(); score.setCustomerId(customerId); @@ -429,11 +439,13 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni s.setParentAgencyId(parentAgency); } }); - result.add(s); + resultFive.add(s); }); } - result.add(score); + resultOne.add(score); }); + result.setOneLevel(resultOne); + result.setFiveLevel(resultFive); return result; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 652958151d..4f6d07669b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.druid.util.StringUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -8,9 +9,11 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; +import com.epmet.dto.indexcal.AgencyCalResultDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; @@ -59,6 +62,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict private DeptScoreDao deptScoreDao; @Autowired private ScreenCustomerAgencyDao customerAgencyDao; + @Autowired + private AgencySubScoreDao agencySubScoreDao; /** * @Description 计算全区相关总分 @@ -157,8 +162,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + log.info("districtPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); agencyScoreDao.deleteOldRecord(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); + agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); deleteAndInsert(result); return true; } @@ -225,7 +233,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + log.info("districtGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -273,7 +283,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -314,7 +326,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); result.add(score); }); - deleteAndInsert(result); + if (!CollectionUtils.isEmpty(result)){ + agencyScoreDao.insertStreetRecord(result); + } return true; } @@ -334,15 +348,18 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } /** - * @param subAllDistrict + * @param result * @Description 先删除记录,在插入 * @author zxc * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(List subAllDistrict) { - if (!CollectionUtils.isEmpty(subAllDistrict)) { - agencyScoreDao.insertStreetRecord(subAllDistrict); + public void deleteAndInsert(AgencyCalResultDTO result) { + if (!CollectionUtils.isEmpty(result.getOneTwoLevel())){ + agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + } + if (!CollectionUtils.isEmpty(result.getFiveLevel())){ + agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); } } @@ -356,8 +373,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict * @author zxc * @date 2020/9/2 2:37 下午 */ - public List getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { - List result = new ArrayList<>(); + public AgencyCalResultDTO getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { + AgencyCalResultDTO result = new AgencyCalResultDTO(); + List resultOne = new ArrayList<>(); + List resultFive = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { AgencyScoreDTO score = new AgencyScoreDTO(); score.setCustomerId(customerId); @@ -393,11 +412,13 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict s.setParentAgencyId(parentAgency); } }); - result.add(s); + resultFive.add(s); }); } - result.add(score); + resultOne.add(score); }); + result.setOneTwoLevel(resultOne); + result.setFiveLevel(resultFive); return result; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 8efe24bbed..1d9757041f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.druid.util.StringUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -8,10 +9,12 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao; import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dto.indexcal.AgencyCalResultDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; @@ -62,6 +65,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ private CommunityScoreDao communityScoreDao; @Autowired private AgencyScoreDao agencyScoreDao; + @Autowired + private AgencySubScoreDao agencySubScoreDao; /** * @Description 计算街道相关总分 @@ -160,7 +165,10 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + log.info("streetPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.STREET_LEVEL); agencyScoreDao.deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); deleteAndInsert(result); return true; @@ -233,7 +241,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + log.info("streetGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -305,7 +315,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + log.info("streetServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -346,7 +358,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); result.add(score); }); - deleteAndInsert(result); + agencyScoreDao.insertStreetRecord(result); return true; } @@ -366,15 +378,18 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } /** - * @param subAllCommunityList + * @param result * @Description 先删除记录,在插入 * @author zxc * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(List subAllCommunityList) { - if (!CollectionUtils.isEmpty(subAllCommunityList)) { - agencyScoreDao.insertStreetRecord(subAllCommunityList); + public void deleteAndInsert(AgencyCalResultDTO result) { + if (!CollectionUtils.isEmpty(result.getOneTwoLevel())) { + agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + } + if (!CollectionUtils.isEmpty(result.getFiveLevel())){ + agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); } } @@ -388,8 +403,10 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @author zxc * @date 2020/9/2 2:37 下午 */ - public List getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { - List result = new ArrayList<>(); + public AgencyCalResultDTO getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { + AgencyCalResultDTO result = new AgencyCalResultDTO(); + List resultOne = new ArrayList<>(); + List resultFive = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { AgencyScoreDTO score = new AgencyScoreDTO(); score.setCustomerId(customerId); @@ -425,11 +442,13 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ s.setParentAgencyId(parentAgency); } }); - result.add(s); + resultFive.add(s); }); } - result.add(score); + resultOne.add(score); }); + result.setOneTwoLevel(resultOne); + result.setFiveLevel(resultFive); return result; } } 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 index 57bb0cd700..8858db0b55 100644 --- 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 @@ -5,7 +5,7 @@ - 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 ) + INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -19,6 +19,7 @@ #{item.dataType}, #{item.score}, #{item.indexCode}, + #{item.allParentIndexCode}, #{item.delFlag}, #{item.revision}, #{item.createdBy}, @@ -33,12 +34,11 @@ DELETE FROM - fact_index_agency_score + fact_index_agency_sub_score WHERE del_flag = '0' AND customer_id = #{customerId} AND month_id = #{monthId} - AND index_code = #{indexCode} AND data_type = #{dataType} 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 index 48b171c119..4aef48eb77 100644 --- 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 @@ -5,7 +5,7 @@ - INSERT INTO fact_index_community_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -33,7 +33,7 @@ DELETE FROM - fact_index_community_score + fact_index_community_sub_score WHERE del_flag = '0' AND customer_id = #{customerId} From 033416d123e40591d3f00b35d9d56b0390ff4dae Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 10:18:52 +0800 Subject: [PATCH 02/19] =?UTF-8?q?statical=E5=BC=80=E5=8F=91=E5=92=8C?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=A0=86=E5=86=85=E5=AD=98=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/deploy/docker-compose-dev.yml | 4 ++-- .../data-statistical-server/deploy/docker-compose-test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index 36afabff51..fcc8b45448 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -9,10 +9,10 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 300M \ No newline at end of file + memory: 600M \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml index 075a43a0af..29606a5d0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml @@ -9,10 +9,10 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 300M \ No newline at end of file + memory: 600M \ No newline at end of file From 8f26d41acf5ac1d6fee76de969ab46a571c83765 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 13:28:03 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97=20?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index f02185071f..88a58ff646 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -1,13 +1,24 @@ package com.epmet.constant; /** - * 描述一下 + * 指标计算 常量类 * * @author yinzuomei@elink-cn.com * @date 2020/8/27 15:20 */ public interface IndexCalConstant { + /** + * 批量插入 最大数据量 + */ + Integer INSERT_SIZE= 100; + /** + * 批量删除 一次删除50 + */ + Integer DELETE_SIZE=1000; + /** + * 分批计算,一次计算 10条 + */ Integer PAGE_SIZE = 10; String GRID_ID="GRID_ID"; @@ -35,6 +46,22 @@ public interface IndexCalConstant { String COMMUNITY_RELATE = "shequxiangguan"; + /** + * 网格相关:党建能力 + */ + String GRID_DJ_ALL_PARENT_INDEX_CODE="wanggexiangguan:dangjiannengli"; + /** + * 网格相关:治理能力 + */ + String GRID_ZL_ALL_PARENT_INDEX_CODE="wanggexiangguan:zhilinengli"; + /** + * 网格相关:服务能力 + */ + String GRID_FW_ALL_PARENT_INDEX_CODE="wanggexiangguan:fuwunengli"; + /** + * 区直部门:治理能力 + */ + String DEPT_ZL_ALL_PARENT_INDEX_CODE="quzhibumen:zhilinengli"; From b96eaef26b767ab8b69f44bbc0d6277e367f4cfd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 14:05:40 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=8F=92=E5=85=A5=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/DeptScoreDao.java | 34 ++-- .../indexcal/DeptSubScoreDao.java | 66 ++------ .../indexcal/GridScoreDao.java | 16 +- .../indexcal/GridSubScoreDao.java | 84 ++-------- .../indexcal/AgencySubScoreEntity.java | 2 +- .../indexcal/CpcSubScoreEntity.java | 2 +- .../indexcal/DeptSubScoreEntity.java | 7 +- .../indexcal/GridSubScoreEntity.java | 2 +- .../indexcal/GridCorreLationService.java | 3 +- .../indexcal/impl/DeptScoreServiceImpl.java | 98 ++++++++---- .../impl/GridCorreLationServiceImpl.java | 119 +++++++++++--- .../evaluationindex/indexcal/DeptScoreDao.xml | 50 +++--- .../indexcal/DeptSubScoreDao.xml | 71 ++------ .../evaluationindex/indexcal/GridScoreDao.xml | 50 +----- .../indexcal/GridSubScoreDao.xml | 151 ++---------------- 15 files changed, 279 insertions(+), 476 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index 4be461b59a..cbfa752bb0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -45,17 +45,6 @@ public interface DeptScoreDao extends BaseDao { **/ 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 @@ -79,12 +68,25 @@ public interface DeptScoreDao extends BaseDao { /** * @return int - * @param customerId - * @param monthId - * @param deptId + * @param customerId 客户id + * @param monthId 月id + * @param indexCode 不必填 + * @param deleteSize * @author yinzuomei - * @description + * @description 根据客户id+monthId,删除这个月某个指标所有的数据 一次至多删除50条 * @Date 2020/9/7 14:30 **/ - int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId")String monthId,@Param("deptId") String deptId); + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, + @Param("monthId")String monthId, + @Param("indexCode") String indexCode, + @Param("deleteSize") int deleteSize); + + /** + * @return int + * @param deptScoreEntityList + * @author yinzuomei + * @description 批量插入计算结果 + * @Date 2020/9/10 10:40 + **/ + int insertBatchEntity(@Param("list") List deptScoreEntityList); } 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 index e084506452..d0674e7fbd 100644 --- 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 @@ -18,12 +18,11 @@ 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 com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import javax.annotation.security.PermitAll; import java.util.List; /** @@ -33,60 +32,29 @@ import java.util.List; * @since v1.0.0 2020-09-02 */ @Mapper -public interface DeptSubScoreDao extends BaseDao { +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 + * @param insertDeptSubList + * @return int + * @author yinzuomei + * @description 批量插入计算结果 五级指标分数值 + * @Date 2020/9/10 10:39 **/ - 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); + int insertBatchEntity(@Param("list") List insertDeptSubList); /** * @param customerId * @param monthId - * @param deptId + * @param allParentIndexCode + * @param deleteSize 一次至多删除XX条记录 * @return int * @author yinzuomei - * @description - * @Date 2020/9/7 14:30 + * @description 批量删除 + * @Date 2020/9/10 12:28 **/ - int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("deptId") String deptId); + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("allParentIndexCode") String allParentIndexCode, + @Param("deleteSize") int deleteSize); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index b4db5f05f9..bd0ba82f7e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -40,7 +40,7 @@ public interface GridScoreDao extends BaseDao { * @param customerId * @param monthId * @param indexCode - * @param isTotal 1:总分;0不是 + * @param deleteNum * @return int * @author yinzuomei * @description @@ -49,7 +49,7 @@ public interface GridScoreDao extends BaseDao { int deleteByCusAndMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, - @Param("isTotal") String isTotal); + @Param("deleteNum") int deleteNum); /** * @return int @@ -58,7 +58,7 @@ public interface GridScoreDao extends BaseDao { * @description * @Date 2020/8/31 14:01 **/ - int insertBatches(List gridScoreEntityList); + int insertBatches(@Param("list")List gridScoreEntityList); /** * @return java.util.List @@ -98,15 +98,5 @@ public interface GridScoreDao extends BaseDao { **/ 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/dao/evaluationindex/indexcal/GridSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java index e0cf724899..be9c55c66f 100644 --- 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 @@ -18,11 +18,7 @@ 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 com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,80 +31,28 @@ import java.util.List; * @since v1.0.0 2020-08-31 */ @Mapper -public interface GridSubScoreDao extends BaseDao { +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 + * @param gridSubScoreEntityList * @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); + int insertBatches(@Param("list") List gridSubScoreEntityList); /** * @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 + * @param allParentIndexCode + * @param deleteSize 一次至多删除XX条记录 + * @return int + * @author yinzuomei + * @description 批量删除 + * @Date 2020/9/10 13:36 **/ - void batchInsertGridScoreData(@Param("list") List list, @Param("customerId") String customerId); - + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("allParentIndexCode") String allParentIndexCode, + @Param("deleteSize") Integer deleteSize); } \ 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 index a3e18f4b4f..2f1d277b46 100644 --- 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 @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_agency_score") +@TableName("fact_index_agency_sub_score") public class AgencySubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; 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 index e69c222258..2183f77502 100644 --- 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 @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_cpc_score") +@TableName("fact_index_cpc_sub_score") public class CpcSubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; 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 index 476f3c2568..db12edfeec 100644 --- 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 @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_dept_score") +@TableName("fact_index_dept_sub_score") public class DeptSubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -67,11 +67,6 @@ public class DeptSubScoreEntity extends BaseEpmetEntity { */ private String monthId; - /** - * 1:总分;0不是;默认0 - */ - private String isTotal; - /** * 分值 */ 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 index ad99f92586..01f40a5ddd 100644 --- 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 @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_grid_score") +@TableName("fact_index_grid_sub_score") public class GridSubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index a93697ce12..994f8818fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -3,6 +3,7 @@ package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; import java.math.BigDecimal; @@ -52,5 +53,5 @@ public interface GridCorreLationService { * @description 通用计算方法 * @Date 2020/9/3 16:07 **/ - HashMap calculate(Map> indexMap); + HashMap calculate(Map> indexMap); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 6dc176a887..d2feec5c47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -23,14 +23,17 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcal.DeptSubScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; @@ -43,9 +46,12 @@ import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexScoreVo; import com.epmet.support.normalizing.batch.SampleValue; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -81,6 +87,8 @@ public class DeptScoreServiceImpl extends BaseServiceImpl minAndMaxMap = factIndexGovrnAblityDeptMonthlyDao.selectExtremeValue(formDTO); if (CollectionUtils.isEmpty(minAndMaxMap)) { @@ -123,7 +123,10 @@ public class DeptScoreServiceImpl extends BaseServiceImpl> indexMap = buildDeptCorrelationIndexInputVO(indexGroupDetailEntityList, minAndMaxMap); - //4、分批计算 + //4、先全部删除,后批量插入 + //quzhibumen:zhilinengli + deleteBeforeDataList(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.DEPT_ZL_ALL_PARENT_INDEX_CODE); + //5、分批计算 int pageNo = NumConstant.ONE; int pageSize = IndexCalConstant.PAGE_SIZE; //分页查询 要计算的原始数据 @@ -139,6 +142,38 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap = gridCorreLationService.calculate(indexMap); + HashMap resultMap = gridCorreLationService.calculate(indexMap); //保存中间表记录 this.saveDeptScoreEntity(formDTO,resultMap); } @@ -177,10 +212,12 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap) { + public void saveDeptScoreEntity(CalculateCommonFormDTO formDTO, HashMap resultMap) { String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); - resultMap.forEach((deptId, governAblityScore) -> { + List deptScoreEntityList=new ArrayList<>(); + List deptSubScoreEntityList=new ArrayList<>(); + resultMap.forEach((deptId, calculateResult) -> { DeptScoreEntity deptScoreEntity = new DeptScoreEntity(); deptScoreEntity.setCustomerId(formDTO.getCustomerId()); deptScoreEntity.setDeptId(deptId); @@ -195,26 +232,29 @@ public class DeptScoreServiceImpl extends BaseServiceImpl> partitionDeptSubScoreList = ListUtils.partition(deptSubScoreEntityList, IndexCalConstant.INSERT_SIZE); + for (List insertDeptSubList : partitionDeptSubScoreList) { + deptSubScoreDao.insertBatchEntity(insertDeptSubList); + } } - /** - * @param formDTO - * @return void - * @author yinzuomei - * @description 只有一个部门的事实记录时无需处理以下代码注释 - * @Date 2020/9/3 9:35 - **/ - /*private void handleOneGridScene(CalculateCommonFormDTO formDTO) { - FactIndexGovrnAblityDeptMonthlyEntity entity = factIndexGovrnAblityDeptMonthlyDao.selectOneRecord(formDTO.getCustomerId(), formDTO.getMonthId()); - HashMap resultMap = new HashMap<>(); - resultMap.put(entity.getDeptId(), new BigDecimal(NumConstant.FIFTY_STR)); - this.saveDeptScoreEntity(formDTO, resultMap); - }*/ - /** * @param indexList * @param minAndMaxMap diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 707a462ba0..1a3ba3a353 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -11,13 +11,16 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridSubScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; +import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; @@ -27,11 +30,9 @@ import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreConstants; -import com.epmet.support.normalizing.batch.BatchScoreCalculator; -import com.epmet.support.normalizing.batch.IndexInputVO; -import com.epmet.support.normalizing.batch.IndexOutputVO; -import com.epmet.support.normalizing.batch.SampleValue; +import com.epmet.support.normalizing.batch.*; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -69,6 +70,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private CpcScoreDao cpcScoreDao; @Autowired private GridScoreDao gridScoreDao; + @Autowired + private GridSubScoreDao gridSubScoreDao; /** @@ -154,7 +157,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } //指标集合 Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList = new ArrayList<>(); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -186,11 +189,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } }); }); - HashMap resultMap = calculate(indexMap); + HashMap resultMap = calculate(indexMap); resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); + deleteBeforeDataList(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE); + saveGridCorreLationResult(formDTO, + resultMapList, + IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), + IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE, + NumConstant.ZERO_STR); } /** @@ -318,6 +326,36 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { return map; } + /** + * @return void + * @param formDTO + * @param indexCode 当前计算的指标(党建能力,治理能力,服务能力) + * @param allParentIndexCode + * @author yinzuomei + * @description + * @Date 2020/9/10 13:58 + **/ + private void deleteBeforeDataList(CalculateCommonFormDTO formDTO,String indexCode,String allParentIndexCode) { + //先删除 + int masterDeleteNum; + do { + //一次删除50条 + masterDeleteNum = gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), + formDTO.getMonthId(), + indexCode, + IndexCalConstant.DELETE_SIZE); + } while (masterDeleteNum != NumConstant.ZERO); + //删除明细时,需要根据分组删,比方说当前计算的是网格相关-党建能力,主表需要删除indexCode=dangjiannengli的,明细需要删除网格相关:党建能力 下面所有的指标明细 + int detailDelteNum; + do { + detailDelteNum = gridSubScoreDao.deleteByDeptIdAndMonthId(formDTO.getCustomerId(), + formDTO.getMonthId(), + allParentIndexCode, + IndexCalConstant.DELETE_SIZE); + } while (detailDelteNum != NumConstant.ZERO); + log.info("delete fact_index_grid_score and fact_index_grid_sub_score complete"); + } + /** * @param formDTO 客户id 月份id: yyyyMM * @param resultMapList @@ -329,15 +367,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/30 22:50 **/ private void saveGridCorreLationResult(CalculateCommonFormDTO formDTO, - List> resultMapList, + List> resultMapList, String indexCode, + String allParentIndexCode, String isTotal) { - List gridScoreEntityList = new ArrayList<>(); String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); - for (HashMap resultMap : resultMapList) { - resultMap.forEach((gridId, partyAblityScore) -> { - log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); + //三大能力结果表 + List gridScoreEntityList = new ArrayList<>(); + //五级指标分值明细 + List gridSubScoreList = new ArrayList<>(); + for (HashMap resultMap : resultMapList) { + resultMap.forEach((gridId, calculateResult) -> { GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -355,18 +396,36 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); gridScoreEntity.setMonthId(formDTO.getMonthId()); - gridScoreEntity.setScore(partyAblityScore); + gridScoreEntity.setScore(calculateResult.getTotalScore()); + //新增ALL_PARENT_INDEX_CODE 所有指标code拼接的字符串 冒号隔开 + gridScoreEntity.setAllParentIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); gridScoreEntityList.add(gridScoreEntity); + for(IndexScoreVo detail:calculateResult.getDetails()){ + GridSubScoreEntity gridSubScoreEntity= ConvertUtils.sourceToTarget(gridScoreEntity, GridSubScoreEntity.class); + //重新赋值 + gridSubScoreEntity.setIndexCode(detail.getIndexCode()); + gridSubScoreEntity.setAllParentIndexCode(detail.getAllParentIndexCode()); + gridSubScoreEntity.setScore(detail.getScore()); + gridSubScoreList.add(gridSubScoreEntity); + } }); } + //后新增 if (!CollectionUtils.isEmpty(gridScoreEntityList)) { - gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, isTotal); //批量插入 - List> partition = ListUtils.partition(gridScoreEntityList, 100); + List> partition = ListUtils.partition(gridScoreEntityList, IndexCalConstant.INSERT_SIZE); partition.forEach(list -> { gridScoreDao.insertBatches(list); }); } + if (!CollectionUtils.isEmpty(gridSubScoreList)) { + //批量插入 + List> subPartition = ListUtils.partition(gridSubScoreList, IndexCalConstant.INSERT_SIZE); + subPartition.forEach(subList -> { + gridSubScoreDao.insertBatches(subList); + }); + } + log.info("insert fact_index_grid_score and fact_index_grid_sub_score complete"); } /** @@ -377,7 +436,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/30 21:40 **/ @Override - public HashMap calculate(Map> indexMap) { + public HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); @@ -387,7 +446,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); - HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + HashMap resultMap = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("计算的结果{}", resultMap); return resultMap; } @@ -503,7 +562,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } //指标集合 Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList = new ArrayList<>(); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -532,11 +591,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } }); }); - HashMap resultMap = calculate(indexMap); + HashMap resultMap = calculate(indexMap); resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), NumConstant.ZERO_STR); + deleteBeforeDataList(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.GRID_ZL_ALL_PARENT_INDEX_CODE); + saveGridCorreLationResult(formDTO, + resultMapList, + IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), + IndexCalConstant.GRID_ZL_ALL_PARENT_INDEX_CODE, + NumConstant.ZERO_STR); } @@ -572,7 +636,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } //指标集合 Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList = new ArrayList<>(); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -597,11 +661,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } }); }); - HashMap resultMap = calculate(indexMap); + HashMap resultMap = calculate(indexMap); resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.FU_WU_NENG_LI.getCode(), NumConstant.ZERO_STR); + deleteBeforeDataList(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.GRID_FW_ALL_PARENT_INDEX_CODE); + saveGridCorreLationResult(formDTO, + resultMapList, + IndexCodeEnum.FU_WU_NENG_LI.getCode(), + IndexCalConstant.GRID_FW_ALL_PARENT_INDEX_CODE, + NumConstant.ZERO_STR); } /** @@ -637,9 +706,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntityList.add(gridScoreEntity); } if (!CollectionUtils.isEmpty(gridScoreEntityList)) { - gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, NumConstant.ONE_STR); + gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, IndexCalConstant.DELETE_SIZE); //批量插入 - List> partition = ListUtils.partition(gridScoreEntityList, 100); + List> partition = ListUtils.partition(gridScoreEntityList, IndexCalConstant.INSERT_SIZE); partition.forEach(list -> { gridScoreDao.insertBatches(list); }); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index 077c6a7430..d17f344e40 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -43,7 +43,31 @@ GROUP BY fidc.agency_id - + + + + + + delete from fact_index_dept_score where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + + and INDEX_CODE=#{indexCode} + + limit #{deleteSize} + + + + insert into fact_index_dept_score ( ID, @@ -56,7 +80,7 @@ IS_TOTAL, SCORE, INDEX_CODE, - + ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, @@ -72,12 +96,12 @@ #{item.agencyId}, #{item.quarterId}, #{item.yearId}, - #{item.monthId}, #{item.isTotal}, #{item.score}, #{item.indexCode}, - #{item.delFlag}, + #{item.allParentIndexCode}, + 0, 0, 'APP_USER', now(), @@ -86,22 +110,4 @@ ) - - - - - 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/DeptSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml index f75bed424b..a20c5311e1 100644 --- 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 @@ -2,47 +2,9 @@ - - - - - - - - insert into fact_index_dept_score + + + insert into fact_index_dept_sub_score ( ID, CUSTOMER_ID, @@ -53,7 +15,7 @@ MONTH_ID, SCORE, INDEX_CODE, - + ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, @@ -69,11 +31,11 @@ #{item.agencyId}, #{item.quarterId}, #{item.yearId}, - #{item.monthId}, #{item.score}, #{item.indexCode}, - #{item.delFlag}, + #{item.allParentIndexCode}, + 0, 0, 'APP_USER', now(), @@ -83,21 +45,12 @@ - - + - delete from fact_index_dept_score where CUSTOMER_ID = #{customerId} - AND MONTH_ID = #{monthId} - and DEPT_ID=#{deptId} + delete from fact_index_dept_sub_score + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + and ALL_PARENT_INDEX_CODE=#{allParentIndexCode} + limit #{deleteSize} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index d42d063e35..b0970024c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -15,6 +15,7 @@ + @@ -31,9 +32,10 @@ CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} AND INDEX_CODE = #{indexCode} - and IS_TOTAL=#{isTotal} + limit #{deleteNum} + INSERT INTO `fact_index_grid_score` ( `ID`, @@ -47,6 +49,7 @@ `IS_TOTAL`, `SCORE`, `INDEX_CODE`, + ALL_PARENT_INDEX_CODE, `DEL_FLAG`, `REVISION`, `CREATED_BY`, @@ -68,6 +71,7 @@ #{item.isTotal}, #{item.score}, #{item.indexCode}, + #{item.allParentIndexCode}, 0, 0, 'APP_USER', @@ -156,50 +160,6 @@ 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, - IS_TOTAL, - 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.isTotal}, - #{item.score}, - #{item.indexCode}, - #{item.delFlag}, - 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} - - - - - - - - - - - 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() - ) - - - - - + CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + AND ALL_PARENT_INDEX_CODE = #{allParentIndexCode} + limit #{deleteNum} + \ No newline at end of file From 1e0f2adc4e710b341a33b792d9b46739d18c834b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Sep 2020 14:11:29 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E6=97=A0=E7=94=A8sql=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/AgencySubScoreDao.java | 51 -------- .../indexcal/CommunitySubScoreDao.java | 50 -------- .../indexcal/AgencySubScoreDao.xml | 115 ------------------ .../indexcal/CommunitySubScoreDao.xml | 113 ----------------- 4 files changed, 329 deletions(-) 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 index d6e8cc32c9..906ef53470 100644 --- 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 @@ -52,55 +52,4 @@ public interface AgencySubScoreDao extends BaseDao { */ void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @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 index 9caf146b4d..a5d2717f62 100644 --- 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 @@ -52,54 +52,4 @@ public interface CommunitySubScoreDao extends BaseDao 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/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml index 8858db0b55..bc1c357ba1 100644 --- 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 @@ -42,119 +42,4 @@ AND data_type = #{dataType} - - - - - - - - - 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() - ) - - - - 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 index 4aef48eb77..382031f5d7 100644 --- 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 @@ -40,117 +40,4 @@ AND month_id = #{monthId} - - - - - - - - - - insert into fact_index_community_score - ( - ID, - CUSTOMER_ID, - AGENCY_ID, - PARENT_AGENCY_ID, - YEAR_ID, - QUARTER_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.agencyId}, - #{item.parentAgencyId}, - #{item.yearId}, - #{item.quarterId}, - #{item.monthId}, - #{item.score}, - #{item.indexCode}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - - From db4117f9b280cca412696fcaa51dcdaf7811098b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 14:23:21 +0800 Subject: [PATCH 06/19] pageSize=1000 --- .../src/main/java/com/epmet/constant/IndexCalConstant.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 88a58ff646..a0596240e8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -19,7 +19,7 @@ public interface IndexCalConstant { /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 10; + Integer PAGE_SIZE = 1000; String GRID_ID="GRID_ID"; From 37a62af388a7264b8fed37dabb2c22f1c99e841d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 10 Sep 2020 14:30:30 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E5=AD=94=E6=9D=91=20-=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=20-=20=E5=BE=85?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88(5-19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screencoll/form/KcActSummaryFormDTO.java | 42 ++ .../screencoll/form/KcActTrendFormDTO.java | 22 ++ .../form/KcCategorySummaryFormDTO.java | 52 +++ .../screencoll/form/KcGroupDetailFormDTO.java | 67 ++++ .../form/KcGroupSummaryFormDTO.java | 62 +++ .../form/KcGroupTopicTrendFormDTO.java | 42 ++ .../screencoll/form/KcHomePageFormDTO.java | 77 ++++ .../form/KcIssueSummaryFormDTO.java | 92 +++++ .../screencoll/form/KcIssueTrendFormDTO.java | 42 ++ .../form/KcNewsCategoryAnalysisFormDTO.java | 47 +++ .../screencoll/form/KcNewsHotRankFormDTO.java | 32 ++ .../screencoll/form/KcNewsSummaryFormDTO.java | 37 ++ .../screencoll/form/KcNewsTrendFormDTO.java | 27 ++ .../form/KcProjectSatisanalysisFormDTO.java | 52 +++ .../form/KcProjectSummaryFormDTO.java | 77 ++++ .../form/KcUserHeartRankFormDTO.java | 47 +++ .../screencoll/form/KcUserSummaryFormDTO.java | 93 +++++ .../form/KcVolunteerHeartRankFormDTO.java | 52 +++ .../form/KcVolunteerSummaryFormDTO.java | 77 ++++ .../controller/KcScreenCollController.java | 373 ++++++++++++++++++ .../screen/ScreenKcActSummaryDailyDao.java | 61 +++ .../screen/ScreenKcActTrendMonthlyDao.java | 61 +++ .../ScreenKcGroupDetailGridDailyDao.java | 61 +++ .../ScreenKcGroupSummaryGridDailyDao.java | 61 +++ .../ScreenKcIssueSummaryGridDailyDao.java | 61 +++ .../ScreenKcIssueTrendGridMonthlyDao.java | 61 +++ .../ScreenKcNewsCategoryAnalysisDao.java | 61 +++ .../screen/ScreenKcNewsRankDao.java | 59 +++ .../screen/ScreenKcNewsSummaryDailyDao.java | 61 +++ .../screen/ScreenKcNewsTrendMonthlyDao.java | 61 +++ .../ScreenKcPlatformSummaryDailyDao.java | 61 +++ .../ScreenKcProjectCategoryGridDailyDao.java | 61 +++ .../ScreenKcProjectSatisGridMonthlyDao.java | 61 +++ .../ScreenKcProjectSummaryGridDailyDao.java | 61 +++ .../ScreenKcTopicTrendGridMonthlyDao.java | 62 +++ .../ScreenKcUserHeatRankGridDailyDao.java | 33 ++ .../screen/ScreenKcUserSummaryDailyDao.java | 61 +++ .../ScreenKcUserTrendGridMonthlyDao.java | 61 +++ ...ScreenKcVolunteerHeatRankGridDailyDao.java | 59 +++ .../ScreenKcVolunteerSummaryDailyDao.java | 61 +++ .../screen/ScreenKcActSummaryDailyEntity.java | 76 ++++ .../screen/ScreenKcActTrendMonthlyEntity.java | 56 +++ .../ScreenKcGroupDetailGridDailyEntity.java | 101 +++++ .../ScreenKcGroupSummaryGridDailyEntity.java | 96 +++++ .../ScreenKcIssueSummaryGridDailyEntity.java | 126 ++++++ .../ScreenKcIssueTrendGridMonthlyEntity.java | 76 ++++ .../ScreenKcNewsCategoryAnalysisEntity.java | 81 ++++ .../screen/ScreenKcNewsRankEntity.java | 66 ++++ .../ScreenKcNewsSummaryDailyEntity.java | 71 ++++ .../ScreenKcNewsTrendMonthlyEntity.java | 61 +++ .../ScreenKcPlatformSummaryDailyEntity.java | 111 ++++++ ...creenKcProjectCategoryGridDailyEntity.java | 86 ++++ ...ScreenKcProjectSatisGridMonthlyEntity.java | 86 ++++ ...ScreenKcProjectSummaryGridDailyEntity.java | 111 ++++++ .../ScreenKcTopicTrendGridMonthlyEntity.java | 76 ++++ .../ScreenKcUserHeatRankGridDailyEntity.java | 96 +++++ .../ScreenKcUserSummaryDailyEntity.java | 126 ++++++ .../ScreenKcUserTrendGridMonthlyEntity.java | 81 ++++ ...eenKcVolunteerHeatRankGridDailyEntity.java | 86 ++++ .../ScreenKcVolunteerSummaryDailyEntity.java | 111 ++++++ .../screen/KcScreenCollService.java | 260 ++++++++++++ .../screen/impl/KcScreenCollServiceImpl.java | 367 +++++++++++++++++ .../screen/ScreenKcActSummaryDailyDao.xml | 68 ++++ .../screen/ScreenKcActTrendMonthlyDao.xml | 54 +++ .../ScreenKcGroupDetailGridDailyDao.xml | 83 ++++ .../ScreenKcGroupSummaryGridDailyDao.xml | 80 ++++ .../ScreenKcIssueSummaryGridDailyDao.xml | 97 +++++ .../ScreenKcIssueTrendGridMonthlyDao.xml | 70 ++++ .../ScreenKcNewsCategoryAnalysisDao.xml | 72 ++++ .../screen/ScreenKcNewsRankDao.xml | 62 +++ .../screen/ScreenKcNewsSummaryDailyDao.xml | 65 +++ .../screen/ScreenKcNewsTrendMonthlyDao.xml | 57 +++ .../ScreenKcPlatformSummaryDailyDao.xml | 87 ++++ .../ScreenKcProjectCategoryGridDailyDao.xml | 74 ++++ .../ScreenKcProjectSatisGridMonthlyDao.xml | 75 ++++ .../ScreenKcProjectSummaryGridDailyDao.xml | 91 +++++ .../ScreenKcTopicTrendGridMonthlyDao.xml | 69 ++++ .../ScreenKcUserHeatRankGridDailyDao.xml | 28 ++ .../screen/ScreenKcUserSummaryDailyDao.xml | 99 +++++ .../ScreenKcUserTrendGridMonthlyDao.xml | 72 ++++ .../ScreenKcVolunteerHeatRankGridDailyDao.xml | 75 ++++ .../ScreenKcVolunteerSummaryDailyDao.xml | 91 +++++ 82 files changed, 6477 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java new file mode 100644 index 0000000000..a942ef7c96 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 7、公益互助-活动各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcActSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 活动总数 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer volunteerCount; + + /** + * 参与人次 + */ + private Integer partiUserCount; + + /** + * 发放积分 + */ + private Integer rewardPointCount; + + /** + * 公益时长单位分钟 + */ + private Integer heartTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java new file mode 100644 index 0000000000..26469e1ac4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 8、公益互助-活动次数趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcActTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 活动数量(本月举行的活动) + */ + private Integer actCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java new file mode 100644 index 0000000000..495e3ac7f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 11、项目分析-按分类统计 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcCategorySummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 项目数量 + */ + private Integer projectCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java new file mode 100644 index 0000000000..8fc4130dbc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java @@ -0,0 +1,67 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 18、邻里党群-小组详情 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcGroupDetailFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小组id + */ + private String groupId; + + /** + * 群名称 + */ + private String groupName; + + /** + * 群主名称 + */ + private String groupLeader; + + /** + * 群成员数 + */ + private Integer memberCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 转为议题的话题数 + */ + private Integer shifitIssueCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java new file mode 100644 index 0000000000..2018c4905d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java @@ -0,0 +1,62 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 17、邻里党群-各类总数汇总 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcGroupSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 群成员总数 + */ + private Integer memberCount; + + /** + * 话题数量 + */ + private Integer topicCount; + + /** + * 话题参与量 + */ + private Integer partiCount; + + /** + * 话题转议题总数 + */ + private Integer shiftIssueCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java new file mode 100644 index 0000000000..1ad02ab91c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 19、邻里党群-话题参与趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcGroupTopicTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java new file mode 100644 index 0000000000..b12c97bb54 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 1、首页-平台各类总数上报 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcHomePageFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格总数 + */ + private Integer gridCount; + + /** + * 已开通网格总数 + */ + private Integer openedGridCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 用户总数 + */ + private Integer userCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 新闻数量 + */ + private Integer newsCount; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 公益活动数量 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer vounteerCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java new file mode 100644 index 0000000000..ae08d2330f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java @@ -0,0 +1,92 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 2、议题分析-各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcIssueSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java new file mode 100644 index 0000000000..3fe5df6075 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 3、议题分析-参与趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcIssueTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java new file mode 100644 index 0000000000..ed16c44348 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 16、党建声音-新闻按类别统计 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsCategoryAnalysisFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 新闻的数量 + */ + private Integer newsCount; + + /** + * 阅读的数量 + */ + private Integer readCount; + + /** + * 点赞的数量 + */ + private Integer likeCount; + + /** + * 点踩的数量 + */ + private Integer disLikeCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java new file mode 100644 index 0000000000..035fbd4971 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 15、党建声音-热度新闻排行 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsHotRankFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 新闻id + */ + private String newsId; + + /** + * 新闻标题 + */ + private String newsTitle; + + /** + * 新闻热点值 + */ + private Integer hotCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java new file mode 100644 index 0000000000..276244a9f1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 13、党建声音-新闻各类总数汇总 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 文章总数 + */ + private Integer newsCount; + + /** + * 阅读量 + */ + private Integer readCount; + + /** + * 点赞量 + */ + private Integer likeCount; + + /** + * 评论量 + */ + private Integer commentCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java new file mode 100644 index 0000000000..6e6bdf9359 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 14、党建声音-新闻阅读参与趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 参与数量 + */ + private Integer partiCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java new file mode 100644 index 0000000000..97843831e2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 12、项目分析-满意度分析 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcProjectSatisanalysisFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 非常满意项目总数 + */ + private Integer greatSatis; + + /** + * 满意项目总数 + */ + private Integer goodSatis; + + /** + * 不满意的项目总数 + */ + private Integer disSatis; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java new file mode 100644 index 0000000000..1b723b68d1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 10、项目分析-各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcProjectSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 流转次数 + */ + private Integer moveCount; + + /** + * 已结案数量 + */ + private Integer closedCaseCount; + + /** + * 项目浏览数 + */ + private Integer projectViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 平均结案时间 单位分钟 ? + */ + private Integer avgClosedCaseTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java new file mode 100644 index 0000000000..d5a272c182 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 6、用户分析-用户趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcUserHeartRankFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 本月内新增用户数量 + */ + private Integer regUserCount; + + /** + * 本月内新增党员数量 + */ + private Integer partyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java new file mode 100644 index 0000000000..cd9b0db555 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java @@ -0,0 +1,93 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 4、用户分析-各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcUserSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 浏览用户(首页的用户总数,原型上首页是叫注册用户) + */ + private Integer visitorCount; + + /** + * 注册用户=居民数量 + */ + private Integer regUserCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 小于20岁的党员总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的党员总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的党员总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的党员总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的党员总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的党员总人数 + */ + private Integer ageLevel6; + + /** + * 党员中男性总人数 + */ + private Integer malePartyUserCount; + + /** + * 党员中女性总人数 + */ + private Integer femalePartyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java new file mode 100644 index 0000000000..2509051e3d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 5、公益互助-志愿者公益时长排名 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcVolunteerHeartRankFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 用户id + */ + private String userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 爱心时长 单位分钟 + */ + private Integer heartTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java new file mode 100644 index 0000000000..ebfee5da52 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 9、公益互助-志愿者画像 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcVolunteerSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount; + + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java index 766db2294b..09d06df653 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java @@ -1,5 +1,14 @@ package com.epmet.controller; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.dto.screencoll.form.*; +import com.epmet.service.evaluationindex.screen.KcScreenCollService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -12,4 +21,368 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("kcscreencoll") public class KcScreenCollController { + + @Autowired + private KcScreenCollService kcScreenCollService; + + /** + * 1、首页-平台各类总数上报 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_platform_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("homepage/platformsummary") + public Result platFormSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertPlatFormSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 2、议题分析-各类总数 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_issue_summary_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("issue/summary") + public Result issueSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertIssueSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 3、议题分析-参与趋势 + * 当isFirst为true时,customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table: screen_kc_issue_trend_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("issue/trend") + public Result issueTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertIssueTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 4、用户分析-各类总数 + * 当isFirst为true时根据customerId+dateId删除,后插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_user_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("user/summary") + public Result userSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertUserSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 5、公益互助-志愿者公益时长排名 + * 当isFirst为true时, 根据customerId清空当前客户下所有用户的信息,再插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_volunteer_heat_rank_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("volunteer/heartrank") + public Result volunteerHeartRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertVolunteerHeartRank(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 6、用户分析-用户趋势 + * 当isFirst为true时,根据monthId+customerId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_user_trend_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("user/userheartrank") + public Result userHeartRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertUserHeartRank(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 7、公益互助-活动各类总数 + * 当isFirst为true时,根据customerId+dateId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_act_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("act/summary") + public Result actSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertActSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 8、公益互助-活动次数趋势 + * 当isFirst为true时,根据customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_act_trend_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("act/trend") + public Result actTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertActTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 9、公益互助-志愿者画像 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_volunteer_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("act/volunteersummary") + public Result volunteerSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertVolunteerSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 10、项目分析-各类总数 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_project_summary_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("project/summary") + public Result projectSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertProjectSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 11、项目分析-按分类统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_project_category_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("project/categorysummary") + public Result categorySummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertCategorySummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 12、项目分析-满意度分析 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_project_satis_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("project/satisanalysis") + public Result projectSatisanalysis(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertProjectSatisanalysis(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 13、党建声音-新闻各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/summary") + public Result newsSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 14、党建声音-新闻阅读参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_trend_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/trend") + public Result newsTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 15、党建声音-热度新闻排行 + * 当isFirst为true时,根据 customerId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_rank + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/hotrank") + public Result newsHotRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsHotRank(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 16、党建声音-新闻按类别统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_category_analysis + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/categoryanalysis") + public Result newsCategoryAnalysis(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsCategoryAnalysis(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 17、邻里党群-各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_group_summary_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("group/summary") + public Result groupSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertGroupSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 18、邻里党群-小组详情 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_group_detail_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("group/detail") + public Result groupDetail(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertGroupDetail(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 19、邻里党群-话题参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_topic_trend_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("group/topictrend") + public Result groupTopicTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertGroupTopicTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java new file mode 100644 index 0000000000..72e45ad0f8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcActSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcActSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-活动各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcActSummaryDailyDao extends BaseDao { + + /** + * 根据customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteActSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertActSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java new file mode 100644 index 0000000000..49d63fec9c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcActTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcActTrendMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-活动(次数+时长)趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcActTrendMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteActTrend(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertActTrend (@Param("list") List list, @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/screen/ScreenKcGroupDetailGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.java new file mode 100644 index 0000000000..c94d1a0f14 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcGroupDetailFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcGroupDetailGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-小组详情(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcGroupDetailGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteGroupDetailGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertGroupDetailGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java new file mode 100644 index 0000000000..6f457ec565 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcGroupSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcGroupSummaryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-小组分析各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcGroupSummaryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteGroupSummaryGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertGroupSummaryGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java new file mode 100644 index 0000000000..6e905f0865 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcIssueSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcIssueSummaryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcIssueSummaryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.util.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteIssueSummaryGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertIssueSummaryGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java new file mode 100644 index 0000000000..d6b2db2ef3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcIssueTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcIssueTrendGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcIssueTrendGridMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteIssueTrendGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertIssueTrendGrid(@Param("list") List list, @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/screen/ScreenKcNewsCategoryAnalysisDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.java new file mode 100644 index 0000000000..48be92ba09 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsCategoryAnalysisFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsCategoryAnalysisEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-新闻-按类别统计(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsCategoryAnalysisDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsCategoryAnalysis(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsCategoryAnalysis(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java new file mode 100644 index 0000000000..842c6ea781 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java @@ -0,0 +1,59 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsHotRankFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsRankEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-热点新闻排行-(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsRankDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsRank(@Param("customerId") String customerId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsRank(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java new file mode 100644 index 0000000000..ca4414aaf6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-新闻-各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java new file mode 100644 index 0000000000..26c018f6fb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsTrendMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-新闻参与趋势-(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsTrendMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsTrend(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsTrend(@Param("list") List list, @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/screen/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.java new file mode 100644 index 0000000000..7762c772bb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcHomePageFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcPlatformSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-平台各汇总值(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcPlatformSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.util.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deletePlatFormSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertPlatFormSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java new file mode 100644 index 0000000000..2f8e9236b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcCategorySummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcProjectCategoryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-项目按分类统计上报总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcProjectCategoryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteCategoryGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertCategoryGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java new file mode 100644 index 0000000000..c2bbdf98e8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcProjectSatisanalysisFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcProjectSatisGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-项目满意度分析(customerId+monthId先删除记录,再插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcProjectSatisGridMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例: 202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteProjectSatisGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例: 202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertProjectSatisGrid(@Param("list") List list, @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/screen/ScreenKcProjectSummaryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.java new file mode 100644 index 0000000000..aa89e45d2b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcProjectSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcProjectSummaryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-项目分析(各类总数先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcProjectSummaryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteProjectSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertProjectSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java new file mode 100644 index 0000000000..66e554a9dc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java @@ -0,0 +1,62 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcGroupTopicTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcTopicTrendGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-话题参与趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcTopicTrendGridMonthlyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteTopicTrendGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertTopicTrendGrid(@Param("list") List list, @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/screen/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java new file mode 100644 index 0000000000..58ed6bf539 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.screen.ScreenKcUserHeatRankGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * KC-用户公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcUserHeatRankGridDailyDao extends BaseDao { + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java new file mode 100644 index 0000000000..bfaa371bf8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcUserSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcUserSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-用户分析(先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcUserSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteUserSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertUserSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java new file mode 100644 index 0000000000..6c8e780788 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcUserHeartRankFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcUserTrendGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-用户趋势分析(根据monthId+customerId先删后增) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcUserTrendGridMonthlyDao extends BaseDao { + + /** + * 根据monthId+customerId先删后增 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteUserTrendGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertUserTrendGrid(@Param("list") List list, @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/screen/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.java new file mode 100644 index 0000000000..3e0de5f451 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -0,0 +1,59 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcVolunteerHeartRankFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcVolunteerHeatRankGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-志愿者公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcVolunteerHeatRankGridDailyDao extends BaseDao { + + /** + * 按照customerId,清空数据 + * + * @param customerId + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteVolunteerHeatRankGrid(@Param("customerId") String customerId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertVolunteerHeatRankGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java new file mode 100644 index 0000000000..ae2d38d3e5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcVolunteerSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcVolunteerSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-志愿者汇总(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcVolunteerSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteVolunteerSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertVolunteerSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java new file mode 100644 index 0000000000..1cda08cfa7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java @@ -0,0 +1,76 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-活动各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_act_summary_daily") +public class ScreenKcActSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 活动总数 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer volunteerCount; + + /** + * 参与人次 + */ + private Integer partiUserCount; + + /** + * 发放积分 + */ + private Integer rewardPointCount; + + /** + * 公益时长单位分钟 + */ + private Integer heartTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java new file mode 100644 index 0000000000..86c991a114 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java @@ -0,0 +1,56 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-活动(次数+时长)趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_act_trend_monthly") +public class ScreenKcActTrendMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 活动数量(本月举行的活动) + */ + private Integer actCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java new file mode 100644 index 0000000000..8247c51d97 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java @@ -0,0 +1,101 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-小组详情(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_group_detail_grid_daily") +public class ScreenKcGroupDetailGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小组id + */ + private String groupId; + + /** + * 群名称 + */ + private String groupName; + + /** + * 群主名称 + */ + private String groupLeader; + + /** + * 群成员数 + */ + private Integer memberCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 转为议题的话题数 + */ + private Integer shifitIssueCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java new file mode 100644 index 0000000000..8f29a2829e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java @@ -0,0 +1,96 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-小组分析各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_group_summary_grid_daily") +public class ScreenKcGroupSummaryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 群成员总数 + */ + private Integer memberCount; + + /** + * 话题数量 + */ + private Integer topicCount; + + /** + * 话题参与量 + */ + private Integer partiCount; + + /** + * 话题转议题总数 + */ + private Integer shiftIssueCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java new file mode 100644 index 0000000000..2d22bf38b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java @@ -0,0 +1,126 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_issue_summary_grid_daily") +public class ScreenKcIssueSummaryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java new file mode 100644 index 0000000000..85f9cd9d2c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java @@ -0,0 +1,76 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_issue_trend_grid_monthly") +public class ScreenKcIssueTrendGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java new file mode 100644 index 0000000000..364a95575a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java @@ -0,0 +1,81 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-新闻-按类别统计(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_category_analysis") +public class ScreenKcNewsCategoryAnalysisEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 新闻的数量 + */ + private Integer newsCount; + + /** + * 阅读的数量 + */ + private Integer readCount; + + /** + * 点赞的数量 + */ + private Integer likeCount; + + /** + * 点踩的数量 + */ + private Integer disLikeCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java new file mode 100644 index 0000000000..5b41cfbe2f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java @@ -0,0 +1,66 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-热点新闻排行-(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_rank") +public class ScreenKcNewsRankEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 新闻id + */ + private String newsId; + + /** + * 新闻标题 + */ + private String newsTitle; + + /** + * 新闻热点值 + */ + private Integer hotCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java new file mode 100644 index 0000000000..d344db9ad2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java @@ -0,0 +1,71 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-新闻-各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_summary_daily") +public class ScreenKcNewsSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 文章总数 + */ + private Integer newsCount; + + /** + * 阅读量 + */ + private Integer readCount; + + /** + * 点赞量 + */ + private Integer likeCount; + + /** + * 评论量 + */ + private Integer commentCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java new file mode 100644 index 0000000000..548d34f284 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java @@ -0,0 +1,61 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-新闻参与趋势-(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_trend_monthly") +public class ScreenKcNewsTrendMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 参与数量 + */ + private Integer partiCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java new file mode 100644 index 0000000000..2f9c5343c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java @@ -0,0 +1,111 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-平台各汇总值(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_platform_summary_daily") +public class ScreenKcPlatformSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格总数 + */ + private Integer gridCount; + + /** + * 已开通网格数 + */ + private Integer openedGridCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 用户总数 + */ + private Integer userCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 新闻数量 + */ + private Integer newsCount; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 公益活动总数 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer volunteerCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java new file mode 100644 index 0000000000..3307b3dcfa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.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.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-项目按分类统计上报总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_project_category_grid_daily") +public class ScreenKcProjectCategoryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 项目数量 + */ + private Integer projectCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java new file mode 100644 index 0000000000..be5d16142e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.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.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-项目满意度分析(customerId+monthId先删除记录,再插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_project_satis_grid_monthly") +public class ScreenKcProjectSatisGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 非常满意项目总数 + */ + private Integer greatSatis; + + /** + * 满意项目总数 + */ + private Integer goodSatis; + + /** + * 不满意的项目总数 + */ + private Integer disSatis; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java new file mode 100644 index 0000000000..85a387c49b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java @@ -0,0 +1,111 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-项目分析(各类总数先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_project_summary_grid_daily") +public class ScreenKcProjectSummaryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 流转次数 + */ + private Integer moveCount; + + /** + * 已结案数量 + */ + private Integer closedCaseCount; + + /** + * 项目浏览数 + */ + private Integer projectViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 平均结案时间 单位分钟 ? + */ + private Integer avgClosedCaseTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java new file mode 100644 index 0000000000..0f0a5b4e6c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java @@ -0,0 +1,76 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-话题参与趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_topic_trend_grid_monthly") +public class ScreenKcTopicTrendGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java new file mode 100644 index 0000000000..03f18a5709 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java @@ -0,0 +1,96 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-用户公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_user_heat_rank_grid_daily") +public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 用户id + */ + private String userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 1志愿者 0不是志愿者 + */ + private Integer volunteerFlag; + + /** + * 爱心时长 单位分钟 + */ + private Integer heartTime; + + /** + * 积分 + */ + private Integer points; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java new file mode 100644 index 0000000000..6c47a97487 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java @@ -0,0 +1,126 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-用户分析(先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_user_summary_daily") +public class ScreenKcUserSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 浏览用户(首页的用户总数,原型上首页是叫注册用户) + */ + private Integer visitorCount; + + /** + * 注册用户=居民数量 + */ + private Integer regUserCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 小于20岁的党员总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的党员总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的党员总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的党员总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的党员总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的党员总人数 + */ + private Integer ageLevel6; + + /** + * 党员中男性总人数 + */ + private Integer malePartyUserCount; + + /** + * 党员中女性总人数 + */ + private Integer femalePartyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java new file mode 100644 index 0000000000..70b51169da --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-用户趋势分析(根据monthId+customerId先删后增) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_user_trend_grid_monthly") +public class ScreenKcUserTrendGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 本月内新增用户数量 + */ + private Integer regUserCount; + + /** + * 本月内新增党员数量 + */ + private Integer partyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java new file mode 100644 index 0000000000..73e7d8da06 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.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.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-志愿者公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_volunteer_heat_rank_grid_daily") +public class ScreenKcVolunteerHeatRankGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 用户id + */ + private String userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 爱心时长 单位分钟 + */ + private Integer heartTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java new file mode 100644 index 0000000000..dc3f16f2c0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java @@ -0,0 +1,111 @@ +/** + * 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.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-志愿者汇总(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_volunteer_summary_daily") +public class ScreenKcVolunteerSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount; + + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java new file mode 100644 index 0000000000..492a951156 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java @@ -0,0 +1,260 @@ +package com.epmet.service.evaluationindex.screen; + +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.dto.screencoll.form.*; + +/** + * 大屏数据采集api - kc + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface KcScreenCollService { + + /** + * 1、首页-平台各类总数上报 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertPlatFormSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 2、议题分析-各类总数 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertIssueSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 3、议题分析-参与趋势 + * 当isFirst为true时,customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertIssueTrend(ScreenCollFormDTO formDTO, String customerId); + + /** + * 4、用户分析-各类总数 + * 当isFirst为true时根据customerId+dateId删除,后插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertUserSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 5、公益互助-志愿者公益时长排名 + * 当isFirst为true时根据customerId删除,后插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertVolunteerHeartRank(ScreenCollFormDTO formDTO, String customerId); + + /** + * 6、用户分析-用户趋势 + * 当isFirst为true时,根据monthId+customerId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertUserHeartRank(ScreenCollFormDTO formDTO, String customerId); + + /** + * 7、公益互助-活动各类总数 + * 当isFirst为true时,根据customerId+dateId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertActSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 8、公益互助-活动次数趋势 + * 当isFirst为true时,根据customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertActTrend(ScreenCollFormDTO formDTO, String customerId); + + /** + * 9、公益互助-志愿者画像 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertVolunteerSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 10、项目分析-各类总数 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertProjectSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 11、项目分析-按分类统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertCategorySummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 12、项目分析-满意度分析 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertProjectSatisanalysis(ScreenCollFormDTO formDTO, String customerId); + + /** + * 13、党建声音-新闻各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 14、党建声音-新闻阅读参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsTrend(ScreenCollFormDTO formDTO, String customerId); + + /** + * 15、党建声音-热度新闻排行 + * 当isFirst为true时,根据 customerId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsHotRank(ScreenCollFormDTO formDTO, String customerId); + + /** + * 16、党建声音-新闻按类别统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO, String customerId); + + /** + * 17、邻里党群-各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertGroupSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 18、邻里党群-小组详情 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertGroupDetail(ScreenCollFormDTO formDTO, String customerId); + + /** + * 19、邻里党群-话题参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertGroupTopicTrend(ScreenCollFormDTO formDTO, String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java new file mode 100644 index 0000000000..a7635d7aeb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java @@ -0,0 +1,367 @@ +/** + * 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.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.screen.*; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.dto.screencoll.form.*; +import com.epmet.service.evaluationindex.screen.KcScreenCollService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +/** + * 大屏数据采集 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class KcScreenCollServiceImpl implements KcScreenCollService { + + @Autowired + private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; + @Autowired + private ScreenKcIssueSummaryGridDailyDao screenKcIssueSummaryGridDailyDao; + @Autowired + private ScreenKcIssueTrendGridMonthlyDao screenKcIssueTrendGridMonthlyDao; + @Autowired + private ScreenKcUserSummaryDailyDao screenKcUserSummaryDailyDao; + @Autowired + private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + @Autowired + private ScreenKcUserTrendGridMonthlyDao screenKcUserTrendGridMonthlyDao; + @Autowired + private ScreenKcActSummaryDailyDao screenKcActSummaryDailyDao; + @Autowired + private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; + @Autowired + private ScreenKcVolunteerSummaryDailyDao screenKcVolunteerSummaryDailyDao; + @Autowired + private ScreenKcProjectSummaryGridDailyDao screenKcProjectSummaryGridDailyDao; + @Autowired + private ScreenKcProjectCategoryGridDailyDao screenKcProjectCategoryGridDailyDao; + @Autowired + private ScreenKcProjectSatisGridMonthlyDao screenKcProjectSatisGridMonthlyDao; + @Autowired + private ScreenKcNewsSummaryDailyDao screenKcNewsSummaryDailyDao; + @Autowired + private ScreenKcNewsTrendMonthlyDao screenKcNewsTrendMonthlyDao; + @Autowired + private ScreenKcNewsRankDao screenKcNewsRankDao; + @Autowired + private ScreenKcNewsCategoryAnalysisDao screenKcNewsCategoryAnalysisDao; + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + @Autowired + private ScreenKcGroupDetailGridDailyDao screenKcGroupDetailGridDailyDao; + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPlatFormSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcPlatformSummaryDailyDao.deletePlatFormSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcPlatformSummaryDailyDao.batchInsertPlatFormSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertIssueSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcIssueSummaryGridDailyDao.deleteIssueSummaryGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcIssueSummaryGridDailyDao.batchInsertIssueSummaryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertIssueTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcIssueTrendGridMonthlyDao.deleteIssueTrendGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcIssueTrendGridMonthlyDao.batchInsertIssueTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertUserSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcUserSummaryDailyDao.deleteUserSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcUserSummaryDailyDao.batchInsertUserSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertVolunteerHeartRank(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcVolunteerHeatRankGridDailyDao.deleteVolunteerHeatRankGrid(customerId); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcVolunteerHeatRankGridDailyDao.batchInsertVolunteerHeatRankGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertUserHeartRank(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcUserTrendGridMonthlyDao.deleteUserTrendGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcUserTrendGridMonthlyDao.batchInsertUserTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertActSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcActSummaryDailyDao.deleteActSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcActSummaryDailyDao.batchInsertActSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertActTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcActTrendMonthlyDao.deleteActTrend(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcActTrendMonthlyDao.batchInsertActTrend(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertVolunteerSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcVolunteerSummaryDailyDao.deleteVolunteerSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcVolunteerSummaryDailyDao.batchInsertVolunteerSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertProjectSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcProjectSummaryGridDailyDao.deleteProjectSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcProjectSummaryGridDailyDao.batchInsertProjectSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertCategorySummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcProjectCategoryGridDailyDao.deleteCategoryGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcProjectCategoryGridDailyDao.batchInsertCategoryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertProjectSatisanalysis(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcProjectSatisGridMonthlyDao.deleteProjectSatisGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcProjectSatisGridMonthlyDao.batchInsertProjectSatisGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsSummaryDailyDao.deleteNewsSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsSummaryDailyDao.batchInsertNewsSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsTrendMonthlyDao.deleteNewsTrend(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsTrendMonthlyDao.batchInsertNewsTrend(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsHotRank(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsRankDao.deleteNewsRank(customerId); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsRankDao.batchInsertNewsRank(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsCategoryAnalysisDao.deleteNewsCategoryAnalysis(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsCategoryAnalysisDao.batchInsertNewsCategoryAnalysis(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcGroupSummaryGridDailyDao.deleteGroupSummaryGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcGroupSummaryGridDailyDao.batchInsertGroupSummaryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupDetail(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcGroupDetailGridDailyDao.deleteGroupDetailGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcGroupDetailGridDailyDao.batchInsertGroupDetailGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupTopicTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcTopicTrendGridMonthlyDao.deleteTopicTrendGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcTopicTrendGridMonthlyDao.batchInsertTopicTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml new file mode 100644 index 0000000000..149c94e075 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_act_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_act_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + ACT_COUNT, + VOLUNTEER_COUNT, + PARTI_USER_COUNT, + REWARD_POINT_COUNT, + HEART_TIME, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.actCount}, + #{item.volunteerCount}, + #{item.partiUserCount}, + #{item.rewardPointCount}, + #{item.heartTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml new file mode 100644 index 0000000000..b8762aa572 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + delete from screen_kc_act_trend_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_act_trend_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + ACT_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.actCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml new file mode 100644 index 0000000000..e7cf3fa2cd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_group_detail_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_group_detail_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + GROUP_ID, + GROUP_NAME, + GROUP_LEADER, + MEMBER_COUNT, + TOPIC_COUNT, + SHIFIT_ISSUE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.groupId}, + #{item.groupName}, + #{item.groupLeader}, + #{item.memberCount}, + #{item.topicCount}, + #{item.shifitIssueCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml new file mode 100644 index 0000000000..833ca38965 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_group_summary_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_group_summary_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + GROUP_COUNT, + MEMBER_COUNT, + TOPIC_COUNT, + PARTI_COUNT, + SHIFT_ISSUE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.groupCount}, + #{item.memberCount}, + #{item.topicCount}, + #{item.partiCount}, + #{item.shiftIssueCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml new file mode 100644 index 0000000000..57055dfcba --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_issue_summary_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_issue_summary_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + REPORT_COUNT, + ISSUE_COUNT, + PENDING_COUNT, + REJECTED_COUNT, + PROCESSING_COUNT, + CLOSED_COUNT, + ISSUE_VIEW_COUNT, + VOTE_COUNT, + PASSED_COUNT, + SHIFT_TO_PROJECT_COUNT, + AVG_AUDIT_TIME, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.reportCount}, + #{item.issueCount}, + #{item.pendingCount}, + #{item.rejectedCount}, + #{item.processingCount}, + #{item.closedCount}, + #{item.issueViewCount}, + #{item.voteCount}, + #{item.passedCount}, + #{item.shiftToProjectCount}, + #{item.avgAuditTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..1957824176 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_issue_trend_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_issue_trend_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + REPORT_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.reportCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml new file mode 100644 index 0000000000..38d1b6cda4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_category_analysis + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_news_category_analysis + ( + ID, + CUSTOMER_ID, + DATE_ID, + + CATEGORY_ID, + CATEGORY_NAME, + NEWS_COUNT, + READ_COUNT, + LIKE_COUNT, + DIS_LIKE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.categoryId}, + #{item.categoryName}, + #{item.newsCount}, + #{item.readCount}, + #{item.likeCount}, + #{item.disLikeCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml new file mode 100644 index 0000000000..08886ea7d2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_rank + where CUSTOMER_ID = #{customerId} + limit 1000; + + + + insert into screen_kc_news_rank + ( + ID, + CUSTOMER_ID, + DATE_ID, + NEWS_ID, + NEWS_TITLE, + HOT_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.newsId}, + #{item.newsTitle}, + #{item.hotCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml new file mode 100644 index 0000000000..9a29f845d8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_news_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + NEWS_COUNT, + READ_COUNT, + LIKE_COUNT, + COMMENT_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.newsCount}, + #{item.readCount}, + #{item.likeCount}, + #{item.commentCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml new file mode 100644 index 0000000000..5ec689ebc0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_trend_monthly + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_news_trend_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + READ_COUNT, + PARTI_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.readCount}, + #{item.partiCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml new file mode 100644 index 0000000000..ea2ca56f7d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_platform_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_platform_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + GRID_COUNT, + OPENED_GRID_COUNT, + ISSUE_COUNT, + PROJECT_COUNT, + USER_COUNT, + PARTY_USER_COUNT, + GROUP_COUNT, + TOPIC_COUNT, + NEWS_COUNT, + READ_COUNT, + ACT_COUNT, + VOLUNTEER_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridCount}, + #{item.openedGridCount}, + #{item.issueCount}, + #{item.projectCount}, + #{item.userCount}, + #{item.partyUserCount}, + #{item.groupCount}, + #{item.topicCount}, + #{item.newsCount}, + #{item.readCount}, + #{item.actCount}, + #{item.vounteerCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml new file mode 100644 index 0000000000..a285d083b3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_project_category_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_project_category_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + CATEGORY_ID, + CATEGORY_NAME, + PROJECT_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.categoryId}, + #{item.categoryName}, + #{item.projectCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml new file mode 100644 index 0000000000..1147f687d5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_project_satis_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_project_satis_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + GREAT_SATIS, + GOOD_SATIS, + DIS_SATIS, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.greatSatis}, + #{item.goodSatis}, + #{item.disSatis}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml new file mode 100644 index 0000000000..614ffac3af --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_project_summary_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_project_summary_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + PROJECT_COUNT, + PROCESSING_COUNT, + CLOSED_COUNT, + MOVE_COUNT, + CLOSED_CASE_COUNT, + PROJECT_VIEW_COUNT, + VOTE_COUNT, + AVG_CLOSED_CASE_TIME, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.projectCount}, + #{item.processingCount}, + #{item.closedCount}, + #{item.moveCount}, + #{item.closedCaseCount}, + #{item.projectViewCount}, + #{item.voteCount}, + #{item.avgClosedCaseTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..868d8b70ce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_topic_trend_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_topic_trend_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + TOPIC_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.topicCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml new file mode 100644 index 0000000000..a8a3c2eff3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml new file mode 100644 index 0000000000..d1c0e9dea2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_user_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_user_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + VISITOR_COUNT, + REG_USER_COUNT, + PARTY_USER_COUNT, + AGE_LEVEL_1, + AGE_LEVEL_2, + AGE_LEVEL_3, + AGE_LEVEL_4, + AGE_LEVEL_5, + AGE_LEVEL_6, + MALE_PARTY_USER_COUNT, + FEMALE_PARTY_USER_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.visitorCount}, + #{item.regUserCount}, + #{item.partyUserCount}, + #{item.ageLevel1}, + #{item.ageLevel2}, + #{item.ageLevel3}, + #{item.ageLevel4}, + #{item.ageLevel5}, + #{item.ageLevel6}, + #{item.malePartyUserCount}, + #{item.femalePartyUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..fda42e28ae --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_user_trend_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_user_trend_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + REG_USER_COUNT, + PARTY_USER_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.regUserCount}, + #{item.partyUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml new file mode 100644 index 0000000000..8edba81c44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_volunteer_heat_rank_grid_daily + where CUSTOMER_ID = #{customerId} + limit 1000; + + + + insert into screen_kc_volunteer_heat_rank_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + USER_ID, + USER_NAME, + HEART_TIME, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.userId}, + #{item.userName}, + #{item.heartTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml new file mode 100644 index 0000000000..414ae85ecb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_volunteer_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_volunteer_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + AGE_LEVEL_1, + AGE_LEVEL_2, + AGE_LEVEL_3, + AGE_LEVEL_4, + AGE_LEVEL_5, + AGE_LEVEL_6, + MALE_COUNT, + FEMALE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.ageLevel1}, + #{item.ageLevel2}, + #{item.ageLevel3}, + #{item.ageLevel4}, + #{item.ageLevel5}, + #{item.ageLevel6}, + #{item.maleCount}, + #{item.femaleCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + From 710ba5f6bc1c9d568db1b7a7ffd637febdced54a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 14:34:54 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8sql?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml | 2 +- .../mapper/evaluationindex/indexcal/DeptSubScoreDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index d17f344e40..e6dff25c3d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -91,7 +91,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, + #{item.customerId}, #{item.deptId}, #{item.agencyId}, #{item.quarterId}, 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 index a20c5311e1..270477f93d 100644 --- 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 @@ -26,7 +26,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, + #{item.customerId}, #{item.deptId}, #{item.agencyId}, #{item.quarterId}, From 6f5f48b8acd68102012e9dd4db78a685ed91a47e Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 14:58:16 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=9B=E5=85=88=E5=85=A8=E9=83=A8=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20=E5=9C=A8=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/indexcal/CpcScoreDao.java | 2 +- .../indexcal/CpcSubScoreDao.java | 2 +- .../impl/CpcIndexCalculateServiceImpl.java | 65 +++++++++++++------ .../evaluationindex/indexcal/CpcScoreDao.xml | 14 ++-- .../indexcal/CpcSubScoreDao.xml | 10 +-- 5 files changed, 63 insertions(+), 30 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java index f4aac59361..a5469cbb79 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java @@ -78,7 +78,7 @@ public interface CpcScoreDao extends BaseDao { **/ 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); + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("deleteSize") Integer deleteSize, @Param("isTotal") String isTotal); List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode); 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 index 54226d0cc7..cb9b840d60 100644 --- 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 @@ -79,7 +79,7 @@ public interface CpcSubScoreDao extends BaseDao { **/ 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("allParentCode") String allParentCode); + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode, @Param("deleteSize") Integer deleteSize); List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 139353e83c..d7d1beb909 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.SampleValue; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -36,7 +37,10 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; @Slf4j @@ -95,7 +99,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - totalEntity.setScore(new BigDecimal(0)); + totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); totalEntity.setAllParentIndexCode(indexGroupDetailEntity.getAllParentIndexCode()); cpcScoreTotalMap.put(userId, totalEntity); } @@ -105,7 +109,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(totalEntity.getScore().add(total)); } }); - deleteAndInsertBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + //删除总分 然后插入 + cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); + insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); } /** @@ -140,10 +146,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @param indexCode 指标code 非必填 * @param values */ - @Transactional(rollbackFor = Exception.class) - private void deleteAndInsertBatch(CalculateCommonFormDTO formDTO, Collection values, String indexCode) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode); - cpcScoreDao.insertBatch(values); + public void insertCpcScoreBatch(CalculateCommonFormDTO formDTO, List values, String indexCode) { + if (CollectionUtils.isEmpty(values)) { + log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), indexCode); + return; + } + List> partition = ListUtils.partition(values, IndexCalConstant.INSERT_SIZE); + partition.forEach(list -> cpcScoreDao.insertBatch(list)); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { @@ -161,9 +170,12 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } int pageNo = NumConstant.ONE; - int pageSize = NumConstant.ONE_THOUSAND; + int pageSize = IndexCalConstant.PAGE_SIZE; //分页查询 要计算的原始数据 List> list = null; + groupIndexDetailsMap.keySet().forEach(indexCode -> { + deleteOldData(formDTO, indexCode); + }); do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { @@ -178,6 +190,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } while (!CollectionUtils.isEmpty(list) && list.size() == pageSize); } + @Transactional(rollbackFor = Exception.class) + public void deleteOldData(CalculateCommonFormDTO formDTO, String indexCode) { + int effectRow; + do { + effectRow = cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, IndexCalConstant.DELETE_SIZE, NumConstant.ZERO_STR); + } while (effectRow > NumConstant.ZERO); + effectRow = NumConstant.ZERO; + do { + //删除 党员相关:(参与议事等4级指标的 明细数据) + String allParentCode = IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode().concat(StrConstant.COLON).concat(indexCode); + effectRow = cpcSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), allParentCode, IndexCalConstant.DELETE_SIZE); + } while (effectRow > NumConstant.ZERO); + } + /** * desc:计算并保存中间结果 * @@ -213,7 +239,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreEntity.setUserId(userId); cpcScoreEntity.setIsTotal(NumConstant.ZERO_STR); cpcScoreEntity.setMonthId(formDTO.getMonthId()); - cpcScoreEntity.setScore(new BigDecimal(0)); + cpcScoreEntity.setScore(new BigDecimal(NumConstant.ZERO)); cpcScoreEntity.setIndexCode(parentIndexCode); cpcScoreEntity.setAllParentIndexCode(value.getAllParentIndexCode()); scoreEntityMap.put(userId, cpcScoreEntity); @@ -243,7 +269,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @param parentIndexCode * @param result */ - @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { List list = new ArrayList<>(); @@ -254,8 +279,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { CalculateResult score = entry.getValue(); CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score.getTotalScore()); - allParentIndexCode = score.getDetails().get(0).getAllParentIndexCode(); - cpcScoreEntity.setAllParentIndexCode(allParentIndexCode.substring(0, allParentIndexCode.lastIndexOf(StrConstant.COLON))); + allParentIndexCode = score.getDetails().get(NumConstant.ZERO).getAllParentIndexCode(); + cpcScoreEntity.setAllParentIndexCode(allParentIndexCode.substring(NumConstant.ZERO, allParentIndexCode.lastIndexOf(StrConstant.COLON))); list.add(cpcScoreEntity); CpcScoreEntity parent = ConvertUtils.sourceToTarget(cpcScoreEntity, CpcScoreEntity.class); score.getDetails().forEach(o -> { @@ -267,9 +292,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { }); } - System.out.println("value:" + JSON.toJSONString(list)); - this.deleteAndInsertBatch(formDTO, list, parentIndexCode); - this.deleteAndInsertSubBatch(formDTO, subList, allParentIndexCode); + this.insertCpcScoreBatch(formDTO, list, parentIndexCode); + this.insertCpcSubScoreBatch(formDTO, subList, allParentIndexCode); } /** @@ -279,10 +303,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @param subList * @param parentIndexCode 指标code 非必填 */ - @Transactional(rollbackFor = Exception.class) - public void deleteAndInsertSubBatch(CalculateCommonFormDTO formDTO, List subList, String parentIndexCode) { - cpcSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); - cpcSubScoreDao.insertBatch(subList); + public void insertCpcSubScoreBatch(CalculateCommonFormDTO formDTO, List subList, String parentIndexCode) { + if (CollectionUtils.isEmpty(subList)) { + log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), parentIndexCode); + return; + } + List> partition = ListUtils.partition(subList, IndexCalConstant.INSERT_SIZE); + partition.forEach(list -> cpcSubScoreDao.insertBatch(list)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml index 13c69b8957..7f6505b70a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml @@ -6,11 +6,15 @@ delete from fact_index_cpc_score where - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} - and MONTH_ID = #{monthId,jdbcType=VARCHAR} - - and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + AND IS_TOTAL = #{isTotal,jdbcType=VARCHAR} + + and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + + + limit #{deleteSize,jdbcType=INTEGER} + 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 index b1e069bab2..eb6e291f37 100644 --- 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 @@ -6,10 +6,12 @@ delete from fact_index_cpc_sub_score where - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} - and MONTH_ID = #{monthId,jdbcType=VARCHAR} - and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR} - + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + and MONTH_ID = #{monthId,jdbcType=VARCHAR} + and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR} + + limit #{deleteSize,jdbcType=INTEGER} + From 3687272c2cb2e229f694a9157b980fc83df1b6be Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Sep 2020 15:13:24 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=20?= =?UTF-8?q?=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/AgencyScoreDao.java | 2 +- .../indexcal/AgencySubScoreDao.java | 2 +- .../indexcal/CommunityScoreDao.java | 2 +- .../indexcal/CommunitySubScoreDao.java | 2 +- .../IndexCalculateCommunityServiceImpl.java | 34 +++++++++++++--- .../IndexCalculateDistrictServiceImpl.java | 40 +++++++++++++++---- .../impl/IndexCalculateStreetServiceImpl.java | 40 +++++++++++++++---- .../indexcal/AgencyScoreDao.xml | 1 + .../indexcal/AgencySubScoreDao.xml | 1 + .../indexcal/CommunityScoreDao.xml | 1 + .../indexcal/CommunitySubScoreDao.xml | 1 + 11 files changed, 100 insertions(+), 26 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index d97a697f7b..fa9ae610f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -51,7 +51,7 @@ public interface AgencyScoreDao extends BaseDao { * @author zxc * @date 2020/9/2 15:47 */ - void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType); + Integer deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType,@Param("delNum")Integer delNum); /** * @Description 查询【fact_index_agency_score】相关信息 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 index 906ef53470..970b671a7f 100644 --- 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 @@ -50,6 +50,6 @@ public interface AgencySubScoreDao extends BaseDao { * @author zxc * @date 2020/9/2 15:47 */ - void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType); + Integer deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType,@Param("delNum")Integer delNum); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java index ab1439481e..4df07097d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java @@ -50,7 +50,7 @@ public interface CommunityScoreDao extends BaseDao o.getScore()).collect(Collectors.toList())); - Integer indexEnd = NumConstant.TEN; - List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, indexEnd); + List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); subPartyAvgList.forEach(party -> { List index1SampleValues = new ArrayList<>(); party.forEach(c -> { @@ -141,8 +140,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); - communitySubScoreDao.deleteOldRecord(customerId,monthId); - factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId); + deleteOldRecord(customerId,monthId); deleteAndInsert(result); return true; } @@ -385,13 +383,37 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Transactional(rollbackFor = Exception.class) public void deleteAndInsert(CommunityCalResultDTO result) { if (!CollectionUtils.isEmpty(result.getOneLevel())) { - factIndexCommunityScoreDao.insertCommunityPartyRecord(result.getOneLevel()); + List> partition = ListUtils.partition(result.getOneLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + factIndexCommunityScoreDao.insertCommunityPartyRecord(p); + }); } if (!CollectionUtils.isEmpty(result.getFiveLevel())){ - communitySubScoreDao.insertCommunityPartyRecord(result.getFiveLevel()); + List> partition = ListUtils.partition(result.getFiveLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + communitySubScoreDao.insertCommunityPartyRecord(p); + }); } } + /** + * @Description + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/10 2:50 下午 + */ + public void deleteOldRecord(String customerId,String monthId){ + Integer num; + do { + num = factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId,IndexCalConstant.DELETE_SIZE); + }while (num != NumConstant.ZERO); + Integer subNum; + do { + subNum = communitySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.DELETE_SIZE); + }while (subNum != NumConstant.ZERO); + } + /** * @param scoreCountOfSampleId 指标计算结果 * @param customerId 客户ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 4f6d07669b..0440fd84fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -165,9 +165,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - agencyScoreDao.deleteOldRecord(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); - agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); - deleteAndInsert(result); + deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); + insertDetail(result); return true; } @@ -236,7 +235,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -286,7 +285,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -347,6 +346,25 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict return result; } + /** + * @Description + * @param customerId + * @param monthId + * @param dataType 数据类型 (街道:street,全区:district) + * @author zxc + * @date 2020/9/10 2:50 下午 + */ + public void deleteOldRecord(String customerId,String monthId,String dataType){ + Integer num; + do { + num = agencyScoreDao.deleteOldRecord(customerId, monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (num != NumConstant.ZERO); + Integer subNum; + do { + subNum = agencySubScoreDao.deleteOldRecord(customerId,monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (subNum != NumConstant.ZERO); + } + /** * @param result * @Description 先删除记录,在插入 @@ -354,12 +372,18 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(AgencyCalResultDTO result) { + public void insertDetail(AgencyCalResultDTO result) { if (!CollectionUtils.isEmpty(result.getOneTwoLevel())){ - agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + List> partition = ListUtils.partition(result.getOneTwoLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencyScoreDao.insertStreetRecord(p); + }); } if (!CollectionUtils.isEmpty(result.getFiveLevel())){ - agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); + List> partition = ListUtils.partition(result.getFiveLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencySubScoreDao.insertStreetRecord(p); + }); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 1d9757041f..d556a24894 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -168,9 +168,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); - agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.STREET_LEVEL); - agencyScoreDao.deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); - deleteAndInsert(result); + deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); + insertDetail(result); return true; } @@ -244,7 +243,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -318,7 +317,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -384,15 +383,40 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(AgencyCalResultDTO result) { + public void insertDetail(AgencyCalResultDTO result) { if (!CollectionUtils.isEmpty(result.getOneTwoLevel())) { - agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + List> partition = ListUtils.partition(result.getOneTwoLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencyScoreDao.insertStreetRecord(p); + }); } if (!CollectionUtils.isEmpty(result.getFiveLevel())){ - agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); + List> partition = ListUtils.partition(result.getFiveLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencySubScoreDao.insertStreetRecord(p); + }); } } + /** + * @Description + * @param customerId + * @param monthId + * @param dataType 数据类型 (街道:street,全区:district) + * @author zxc + * @date 2020/9/10 2:50 下午 + */ + public void deleteOldRecord(String customerId,String monthId,String dataType){ + Integer num; + do { + num = agencyScoreDao.deleteOldRecord(customerId, monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (num != NumConstant.ZERO); + Integer subNum; + do { + subNum = agencySubScoreDao.deleteOldRecord(customerId,monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (subNum != NumConstant.ZERO); + } + /** * @param scoreCountOfSampleId 指标计算结果 * @param customerId 客户ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 45768cdde6..a0c7f2cdae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -41,6 +41,7 @@ AND customer_id = #{customerId} AND month_id = #{monthId} AND data_type = #{dataType} + LIMIT #{delNum}