Browse Source

代码暂存

dev_shibei_match
jianjun 5 years ago
parent
commit
e5df941b4b
  1. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java
  2. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml

3
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<CpcScoreEntity> {
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
List<Map<String, Object>> getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize);
List<CpcScoreEntity> getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize);
}

10
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<Map<String, Object>> list = null;
List<CpcScoreEntity> 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<Map<String, Object>> finalList = list;
groupIndexDetailsMap.forEach((parentIndexCode, details) -> {
calculate(formDTO, details, finalList, minAndMaxMap, parentIndexCode);
});
}
} while (!CollectionUtils.isEmpty(list) && pageNo++ > 0);

2
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}
</delete>
<select id="getPartScoreByPage" resultType="java.util.Map">
<select id="getPartScoreByPage" resultType="com.epmet.entity.indexscore.CpcScoreEntity">
select
CUSTOMER_ID,AGENCY_ID,GRID_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score
WHERE

Loading…
Cancel
Save