From d9a013697ac5271e3c0bfed18e564a52f5cbdaa1 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 22 Jun 2021 11:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=A4=9A=E5=AE=A2=E6=88=B7=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E7=9A=84=E8=AE=A1=E7=AE=97=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=B9=B3=E5=9D=87=E5=80=BC=E6=8C=87=E6=A0=87=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E8=AE=A1=E7=AE=97=E6=95=B0=E9=87=8F=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexCalculateCommunityServiceImpl.java | 21 +++++++++++-- .../IndexCalculateDistrictServiceImpl.java | 27 +++++++++++++++++ .../impl/IndexCalculateStreetServiceImpl.java | 30 +++++++++++++++++++ .../indexcal/AgencyScoreDao.xml | 1 + .../indexcal/CommunityScoreDao.xml | 1 + .../evaluationindex/indexcal/GridScoreDao.xml | 1 + 6 files changed, 78 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 8a12ec8c1e..d9b9677a41 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -646,9 +646,13 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); //下属所有网格的党建能力平均值 + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCodeNew(form.getMonthId(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); + subGridPartyAvgScore.stream().forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL); } else { @@ -702,7 +706,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); deleteOldRecord(form.getCustomerId(),form.getMonthId()); result.getFiveLevel().forEach(s->{ - s.setSampleCount(0); + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? 0 : sampleCount); }); deleteAndInsert(result); return true; @@ -724,10 +729,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni String yearId = DateUtils.getYearId(form.getMonthId()); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { // 社区下属所有网格治理能力汇总(平均值) if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCodeNew(form.getMonthId(),IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); + subGridGovernAvg.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.warn("社区下级治理能力平均分集合为空"); }else{ @@ -779,7 +788,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); result.getFiveLevel().forEach(s->{ - s.setSampleCount(0); + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? 0 : sampleCount); }); deleteAndInsert(result); return true; @@ -802,10 +812,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni String yearId = DateUtils.getYearId(form.getMonthId()); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCodeNew(form.getMonthId(),IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); + subGridServiceAvg.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subGridServiceAvg)) { log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); } else { @@ -857,7 +871,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); result.getFiveLevel().forEach(s->{ - s.setSampleCount(0); + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? 0 : sampleCount); }); deleteAndInsert(result); return true; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 468c974c74..9c8e1579d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -645,10 +645,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict Map pid = new HashMap<>(); Map agencyMap = agencyMap(customerId); //党建能力平均值 + // key:agencyId,value:sampleCount样本量 + Map gridPartyScoreSampleCountMap = new HashMap<>(); indexDetailList.forEach(detail -> { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); + subGridPartyAvgScore.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); } else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { @@ -709,6 +714,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtPartyAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); + result.getFiveLevel().forEach(s -> { + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); + }); insertDetail(result); return true; } @@ -732,11 +741,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); Map agencyMap = agencyMap(customerId); + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { // 治理能力平均值 List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); + districtGovernAvgList.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode()), s.getSampleCount()); + }); for (int i = 0; i < districtGovernAvgList.size(); i++) { if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ districtGovernAvgList.remove(districtGovernAvgList.get(i)); @@ -800,6 +813,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtGovernAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + // 赋值样本量 + result.getFiveLevel().forEach(s -> { + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); + }); insertDetail(result); return true; } @@ -823,11 +841,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); Map agencyMap = agencyMap(customerId); + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); log.info("subStreetAvgList:::"+subStreetAvgList.toString()); + subStreetAvgList.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode()), s.getSampleCount()); + }); for (int i = 0; i < subStreetAvgList.size(); i++) { if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ subStreetAvgList.remove(subStreetAvgList.get(i)); @@ -867,6 +889,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtServiceAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + // 赋值样本量 + result.getFiveLevel().forEach(s -> { + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); + }); insertDetail(result); } return true; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index f148e3d83e..bdcd026d07 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -659,12 +659,17 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); //下属所有社区的党建能力平均值 + // key:agencyId,value:sampleCount样本量 + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { // 下属所有社区的党建能力平均值 List dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); // 数据处理 List subCommPartyAvgScore = disposeSubAvg(dispose, form); + dispose.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { @@ -718,6 +723,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetPartyAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); + // 赋值样本量 + result.getFiveLevel().forEach(s -> { + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); + }); insertDetail(result); return true; } @@ -739,6 +749,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ String quarterId = DateUtils.getQuarterId(monthId); String yearId = DateUtils.getYearId(monthId); List indexInputVOS = new ArrayList<>(); + // key:agencyId,value:sampleCount样本量 + Map gridPartyScoreSampleCountMap = new HashMap<>(); Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { @@ -746,6 +758,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); // 孔村数据处理 List subGridGovernAvg = disposeSubAvg(dispose,form); + subGridGovernAvg.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.warn("查询街道下属所有社区治理能力汇总为空"); }else if (subGridGovernAvg.size() > NumConstant.ZERO) { @@ -797,6 +812,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetGovernAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + // 赋值样本量 + result.getFiveLevel().forEach(s -> { + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); + }); insertDetail(result); return true; } @@ -819,6 +839,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ String yearId = DateUtils.getYearId(monthId); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + // key:agencyId,value:sampleCount样本量 + Map gridPartyScoreSampleCountMap = new HashMap<>(); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { @@ -826,6 +848,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); // 孔村数据处理 List subCommServiceAvg = disposeSubAvg(dispose,form); + subCommServiceAvg.forEach(s -> { + gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode()), s.getSampleCount()); + }); if (CollectionUtils.isEmpty(subCommServiceAvg)) { log.warn("查询街道下属社区服务能力得分平均值为空"); } else if (subCommServiceAvg.size() > NumConstant.ZERO) { @@ -877,6 +902,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetServiceAbilityCalculateExistsSub getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + // 赋值样本量 + result.getFiveLevel().forEach(s -> { + Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode())); + s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); + }); insertDetail(result); return true; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index c940e8b71d..9cceffc4df 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -255,6 +255,7 @@ #{quarterId} AS quarterId, #{yearId} AS yearId, IFNULL(ROUND(AVG( fics.score ),6),0) AS score, + COUNT(1) AS sample_count, sca.customer_id AS customerId, (SELECT AGENCY_ID FROM screen_customer_agency WHERE AREA_CODE = #{areaCode} AND DEL_FLAG = 0) AS parentId FROM screen_customer_agency sca diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index 214ca9f017..22e0ba9ca4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -156,6 +156,7 @@ #{quarterId} AS quarterId, #{yearId} AS yearId, IFNULL(ROUND(AVG( fics.score ),6),0) AS score, + COUNT(1) AS sampleCount, sca.customer_id, sca.pid AS parentId FROM screen_customer_agency sca diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index d37bfbd30b..e1622ebd23 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -235,6 +235,7 @@ #{quarterId} as quarterId, #{yearId} as yearId, IFNULL(ROUND(AVG( figc.score ),6),0) AS score, + COUNT(1) AS sample_count, sca.customer_id as customerId, sca.pid AS parentId FROM screen_customer_agency sca