Browse Source

党员分数计算时 获取党员指标原始值时以用户Id分组

dev
jianjun 4 years ago
parent
commit
2cf9bb2f01
  1. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  2. 19
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java

@ -219,6 +219,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
List<Map<String, Object>> list = null; List<Map<String, Object>> list = null;
groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode)); groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode));
do { do {
//以党员userId为单位 获取数量
list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(),(pageNo - 1) * pageSize, pageSize, list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(),(pageNo - 1) * pageSize, pageSize,
formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds());
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
@ -304,7 +305,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
} }
log.info("计算的参数:{}", JSON.toJSONString(indexMap)); log.info("计算的参数:{}", JSON.toJSONString(indexMap));
HashMap<String, CalculateResult> result = calculateScore(indexMap); HashMap<String, CalculateResult> result = calculateScore(indexMap);
log.info("计算的结果:{}", result); log.info("计算的结果:{}", JSON.toJSONString(result));
//处理结果 //处理结果
if (CollectionUtils.isEmpty(result)) { if (CollectionUtils.isEmpty(result)) {

19
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

@ -120,15 +120,15 @@
cpc.QUARTER_ID, cpc.QUARTER_ID,
cpc.YEAR_ID, cpc.YEAR_ID,
cpc.USER_ID, cpc.USER_ID,
cpc.CREATE_TOPIC_COUNT, SUM(cpc.CREATE_TOPIC_COUNT) CREATE_TOPIC_COUNT,
cpc.JOIN_TOPIC_COUNT, SUM(cpc.JOIN_TOPIC_COUNT) JOIN_TOPIC_COUNT,
cpc.SHIFT_ISSUE_COUNT, SUM(cpc.SHIFT_ISSUE_COUNT) SHIFT_ISSUE_COUNT,
cpc.SHIFT_PROJECT_COUNT, SUM(cpc.SHIFT_PROJECT_COUNT) SHIFT_PROJECT_COUNT,
cpc.JOIN_THREE_MEETS_COUNT, SUM(cpc.JOIN_THREE_MEETS_COUNT) JOIN_THREE_MEETS_COUNT,
cpc.GROUP_USER_COUNT, SUM(cpc.GROUP_USER_COUNT) GROUP_USER_COUNT,
cpc.GROUP_TOPIC_COUNT, SUM(cpc.GROUP_TOPIC_COUNT) GROUP_TOPIC_COUNT,
cpc.TOPIC_TO_ISSUE_RATIO, SUM(cpc.TOPIC_TO_ISSUE_RATIO) TOPIC_TO_ISSUE_RATIO,
cpc.GROUP_ACTIVE_USER_COUNT SUM(cpc.GROUP_ACTIVE_USER_COUNT) GROUP_ACTIVE_USER_COUNT
FROM FROM
fact_index_party_ablity_cpc_monthly cpc fact_index_party_ablity_cpc_monthly cpc
inner join screen_customer_grid scg inner join screen_customer_grid scg
@ -148,6 +148,7 @@
and scg.CUSTOMER_ID=#{customerId,jdbcType=VARCHAR} and scg.CUSTOMER_ID=#{customerId,jdbcType=VARCHAR}
</otherwise> </otherwise>
</choose> </choose>
GROUP BY cpc.USER_ID
LIMIT #{offset},#{pageSize} LIMIT #{offset},#{pageSize}
</select> </select>

Loading…
Cancel
Save