From e5df941b4b7d2762c67f68d3c067dd5278e61625 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 17:13:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/indexscore/CpcScoreDao.java | 3 +-- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 10 +++------- .../main/resources/mapper/indexscore/CpcScoreDao.xml | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java index 2bab7efa56..99303193bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java @@ -25,7 +25,6 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; -import java.util.Map; /** * 党员相关分值 @@ -80,5 +79,5 @@ public interface CpcScoreDao extends BaseDao { int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); - List> getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize); + List getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index ee7d161ecb..b9338e4d32 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -69,7 +69,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { return; } //获取数据 - List> list = null; + List list = null; int pageNo = 1; int pageSize = 10; do { @@ -77,13 +77,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { list = cpcScoreDao.getPartScoreByPage(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { list.forEach(partScore->{ - partScore.get(IndexCalConstant.USER_ID) - }); - //遍历指标分组 计算分数 - List> finalList = list; - groupIndexDetailsMap.forEach((parentIndexCode, details) -> { - calculate(formDTO, details, finalList, minAndMaxMap, parentIndexCode); + }); + } } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index 9696bf3702..3694e52024 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -22,7 +22,7 @@ delete from fact_index_cpc_score where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR} and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - select CUSTOMER_ID,AGENCY_ID,GRID_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score WHERE