Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj' into dev

dev_shibei_match
jianjun 4 years ago
parent
commit
ac13c9567e
  1. 4
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
  2. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  3. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java

4
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml

@ -21,6 +21,8 @@
DEL_FLAG = '0'
AND MONTH_ID = #{monthId}
AND ORG_ID = #{agencyId}
order by CREATED_TIME DESC
LIMIT 1
</select>
<!-- 根据地区码查询用户参与数据 -->
@ -74,4 +76,4 @@
AND ORG_ID = #{agencyId}
AND MONTH_ID <![CDATA[ >= ]]> #{monthId}*/
</select>
</mapper>
</mapper>

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java

@ -196,7 +196,6 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
Set<String> agencyIdSet = new HashSet<>();
if (!CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空,customerId:{}", formDTO.getCustomerId());
issueTotal.forEach(issue -> {
String agencyId = issue.getAgencyId();
agencyIdSet.add(agencyId);

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java

@ -85,12 +85,19 @@ public class ScreenUserJoinServiceImpl extends BaseServiceImpl<ScreenUserJoinDao
for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++) {
if (list.get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())) {
ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(list.get(i), ScreenUserJoinEntity.class);
entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getJoinTotal(), list.get(j).getJoinTotal()));
entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getJoinTotal(), list.get(j).getJoinTotal()));
entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgJoin(), list.get(j).getAvgJoin()));
entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgJoin(), list.get(j).getAvgJoin()));
ScreenUserJoinEntity lastJoinEntity = lastMonthJoinList.get(i);
if (lastJoinEntity == null){
lastJoinEntity = new ScreenUserJoinEntity();
lastJoinEntity.setJoinTotal(NumConstant.ZERO);
lastJoinEntity.setAvgIssue(NumConstant.ZERO_DECIMAL);
lastJoinEntity.setAvgJoin(NumConstant.ZERO_DECIMAL);
}
entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastJoinEntity.getJoinTotal(), list.get(j).getJoinTotal()));
entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastJoinEntity.getJoinTotal(), list.get(j).getJoinTotal()));
entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastJoinEntity.getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastJoinEntity.getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastJoinEntity.getAvgJoin(), list.get(j).getAvgJoin()));
entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastJoinEntity.getAvgJoin(), list.get(j).getAvgJoin()));
curMonthJoinEntityList.add(entity);
}
}
@ -191,4 +198,4 @@ public class ScreenUserJoinServiceImpl extends BaseServiceImpl<ScreenUserJoinDao
return CompareConstant.EQ_STR;
}
}
}
}

Loading…
Cancel
Save