Browse Source

Merge branch 'dev_bugfix_ljj' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev

master
jianjun 4 years ago
parent
commit
4058d3203a
  1. 1
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  2. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java
  3. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java

1
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java

@ -440,6 +440,7 @@ public class IndexServiceImpl implements IndexService {
indexRank.setOrgType("street");
indexRank.setTotalIndex(getRound(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility()));
});
streetList.sort(Comparator.comparing(SubAgencyIndexRankResultDTO::getTotalIndex).reversed());
return streetList;
}
// 网格会根据中央区选择具体某个街道,变化

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java

@ -118,11 +118,16 @@ public class IndexCollDistrictDepartmentServiceImpl implements IndexCollDistrict
if (CollectionUtils.isNotEmpty(handle)) {
list.forEach(entity -> handle.stream().filter(dto -> dto.getOrgId().equals(entity.getDeptId())).forEach(item -> {
if (item.getCount() != NumConstant.ZERO) {
BigDecimal count = new BigDecimal(item.getCount());
BigDecimal count = null != item.getCount() && NumConstant.ZERO != item.getCount() ? new BigDecimal(item.getCount()) : BigDecimal.ZERO;
BigDecimal sum = new BigDecimal(item.getSum());
BigDecimal one = new BigDecimal(NumConstant.ONE);
entity.setClosedProjectRatio(one.divide(sum.divide(count), NumConstant.SIX, RoundingMode.HALF_UP));
entity.setClosedProjectRatio(sum.divide(count).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//entity.setClosedProjectRatio(one.divide(sum.divide(count), NumConstant.SIX, RoundingMode.HALF_UP));
if (count.compareTo(BigDecimal.ZERO) == 1) {
//如果count>0
entity.setClosedProjectRatio(sum.divide(count).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
} else {
entity.setClosedProjectRatio(BigDecimal.ZERO);
}
}
}));
}

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -86,7 +86,9 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
final String monthId = param.getMonthId();
threadPool.submit(() -> {
try {
long startCpc = System.currentTimeMillis();
calCpcIndexService.calCpcPartyAbility(customerId, monthId);
log.error("党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCpc, param.getCustomerId());
} catch (Exception e) {
log.error("抽取【党员相关数据】发生异常,参数:" + JSON.toJSONString(param), e);
}finally {
@ -95,35 +97,47 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
});
threadPool.submit(() -> {
try {
long startGridGovern = System.currentTimeMillis();
calGridIndexService.calGridIndexGovernAbility(customerId, monthId);
log.error("网格相关-治理能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startGridGovern, param.getCustomerId());
} catch (Exception e) {
log.error("抽取【网格治理能力数据】发生异常,参数:" + JSON.toJSONString(param), e);
}
try {
long startGridParty = System.currentTimeMillis();
calGridIndexService.calGridIndexPartyAbility(customerId, monthId);
log.error("网格相关-党建能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startGridParty, param.getCustomerId());
} catch (Exception e) {
log.error("抽取【网格党建能力数据】发生异常,参数:" + JSON.toJSONString(param), e);
}
try {
long startGridService = System.currentTimeMillis();
calGridIndexService.calGridIndexServiceAbility(customerId, monthId);
log.error("网格相关-服务能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startGridService, param.getCustomerId());
} catch (Exception e) {
log.error("抽取【网格服务能力数据】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startStreet = System.currentTimeMillis();
indexCollStreetService.saveStreetAbility(customerId, monthId);
log.error("街道相关-三大能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startStreet, param.getCustomerId());
}catch (Exception e){
log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startCommunity = System.currentTimeMillis();
indexCollCommunityService.saveCommunityAbility(customerId, monthId);
log.error("街道相关-三大能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCommunity, param.getCustomerId());
}catch (Exception e){
log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startDistrict = System.currentTimeMillis();
indexCollDistrictService.saveDistrictAbility(customerId, monthId);
log.error("全区相关-三大能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startDistrict, param.getCustomerId());
}catch (Exception e){
log.error("抽取【全区治理能力-全区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
@ -135,6 +149,6 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
} catch (InterruptedException e) {
log.error("indexOriginExtractAll countDownLatch exception", e);
}
log.warn("indexOriginExtractAll执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-start, param.getCustomerId());
log.error("indexOriginExtractAll执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-start, param.getCustomerId());
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java

@ -270,7 +270,7 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
BigDecimal avgCost = new BigDecimal(total).divide(new BigDecimal(v.size()),4, BigDecimal.ROUND_HALF_UP);
//efficiencyMap.put(k,BigDecimal.ONE.divide(avgCost,4, BigDecimal.ROUND_HALF_UP));
efficiencyMap.put(k,avgCost.setScale(6,BigDecimal.ROUND_HALF_UP));
efficiencyMap.put(k, null == avgCost ? BigDecimal.ZERO : avgCost.setScale(6, BigDecimal.ROUND_HALF_UP));
}else{
efficiencyMap.put(k,BigDecimal.ZERO);
}

Loading…
Cancel
Save