diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java index 4939d2b514..180ce535bc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java @@ -114,6 +114,18 @@ public interface FactOriginProjectLogDailyDao extends BaseDao selectProjectParticipatedAgency(@Param("agencies") List agencies, @Param("customerId") String customerId,@Param("dimId") String dimId); + + /*** + * @Description 评价周期内被吹哨次数 + * @param agencies + * @param customerId + * @param dimId + * @return java.util.List + * @author wangc + * @date 2020.10.15 11:20 + */ + List selectAgencyWhistledCount(@Param("agencies") List agencies, @Param("customerId") String customerId,@Param("dimId") String dimId); + /*** * @Description 查询机关办结次数 * @param agencies diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java index dbf40fc0a1..e33f7a4982 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java @@ -137,13 +137,13 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService //办结数 List agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); - Map agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month"); Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month"); list.forEach(entity ->{ entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); BigDecimal element = new BigDecimal(entity.getClosedProjectCount()); //分母,即机关参与过的项目数(去重) - Integer denominator = agencyParticipatedCount.get(entity.getAgencyId()); + //“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数” + Integer denominator = entity.getTransferedCount(); if (null != denominator && denominator != NumConstant.ZERO) { //办结率 entity.setClosedProjectRatio( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java index 4337f9699b..1e576f2ba3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java @@ -130,13 +130,14 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService { //办结数 List agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); - Map agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month"); + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month"); list.forEach(entity ->{ entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); BigDecimal element = new BigDecimal(entity.getClosedProjectCount()); //分母,即机关参与过的项目数(去重) - Integer denominator = agencyParticipatedCount.get(entity.getAgencyId()); + //“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数” + Integer denominator = entity.getTransferedCount(); if (null != denominator && denominator != NumConstant.ZERO) { //办结率 entity.setClosedProjectRatio( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java index dcf3a43dcf..edd1742ec0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java @@ -128,15 +128,16 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { //办结数 List agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); - Map agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month"); + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month"); list.forEach(entity ->{ entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); BigDecimal element = new BigDecimal(entity.getClosedProjectCount()); - //分母,即机关参与过的项目数(去重) - Integer denominator = agencyParticipatedCount.get(entity.getAgencyId()); + //分母,吹哨次数 + Integer denominator = entity.getTransferedCount(); if (null != denominator && denominator != NumConstant.ZERO) { //办结率 + //“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数” entity.setClosedProjectRatio( element.divide(new BigDecimal(denominator), NumConstant.SIX, RoundingMode.HALF_UP) ); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 9daf39ba7a..b389aa1aa3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -160,6 +160,26 @@ GROUP BY AGENCY_ID + +