From 7d13637747120561cbe9914c849da909aeb53a9f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 23 Jun 2021 10:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=94=E6=9D=91=EF=BC=8C=E6=A6=86=E5=B1=B1?= =?UTF-8?q?=EF=BC=8C=E9=94=A6=E6=B0=B4pid=E6=9B=B4=E4=B8=BA=E5=B9=B3?= =?UTF-8?q?=E9=98=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IndexCalculateStreetServiceImpl.java | 11 ++++++----- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml | 4 ++-- .../indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml | 2 +- .../indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml | 4 ++-- .../screen/ScreenCustomerAgencyDao.xml | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) 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..5bb89adff4 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 @@ -674,7 +674,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ partition.forEach(publish -> { List index1SampleValues = new ArrayList<>(); publish.forEach(c -> { - c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); +// c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -754,7 +754,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { - c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); +// c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -835,7 +835,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); List index1SampleValues = new ArrayList<>(); serviceAvg.forEach(c -> { - c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); +// c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -932,6 +932,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ orgIds.forEach(org -> { SubCommunityAvgResultDTO s = new SubCommunityAvgResultDTO(); s.setAgencyId(org.getOrgId()); + s.setParentId(org.getPid()); subAvgScores.add(s); }); // 把除去孔村镇的数据赋值,孔村在下边单独处理 @@ -983,7 +984,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (!CollectionUtils.isEmpty(kongCunGovernAbility)){ kongCunGovernAbility.forEach(k -> { k.put("AGENCY_ID",k.get("AGENCY_ID")); - k.put("PARENT_ID",NumConstant.ZERO_STR); + k.put("PARENT_ID",k.get("PARENT_ID")); }); } if (!CollectionUtils.isEmpty(communityGovernAbility)){ @@ -1012,7 +1013,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (!CollectionUtils.isEmpty(kongCunActivityCountList)){ kongCunActivityCountList.forEach(k -> { k.put("AGENCY_ID",k.get("AGENCY_ID")); - k.put("PARENT_ID",NumConstant.ZERO_STR); + k.put("PARENT_ID",k.get("PARENT_ID")); }); } if (!CollectionUtils.isEmpty(ActivityCountList)){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index d1db2b9588..76ab745264 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -288,7 +288,7 @@ SELECT sca.AGENCY_ID, - sca.PID AS PARENT_ID, + IF(sca.PID = '0',(SELECT AGENCY_ID FROM screen_customer_agency WHERE AREA_CODE = #{areaCode} AND DEL_FLAG = 0),sca.PID) AS PARENT_ID, #{monthId} AS MONTH_ID, #{quarterId} AS QUARTER_ID, #{yearId} AS YEAR_ID, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 016cd62b24..1c0941a04b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -176,7 +176,7 @@ SELECT sca.AGENCY_ID, - sca.PID AS PARENT_ID, + IF(sca.PID = '0',(SELECT AGENCY_ID FROM screen_customer_agency WHERE AREA_CODE = #{areaCode} AND DEL_FLAG = 0),sca.PID) AS PARENT_ID, #{monthId} AS MONTH_ID, #{quarterId} AS QUARTER_ID, #{yearId} AS YEAR_ID, @@ -222,7 +222,7 @@