diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 6e102c0366..209e776ee7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/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; } // 网格会根据中央区选择具体某个街道,变化 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java index 3ccdfa136f..04ab678c75 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java +++ b/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); + } } })); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java index f6038e0e4e..b1e48c25d5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java +++ b/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()); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index b0c794e759..9bb920fe54 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/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