diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index d0cb1d1726..40118c9253 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -33,6 +33,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 组织机构信息 @@ -99,6 +100,14 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectAgencyIdAndParentId(@Param("customerId") String customerId); + /** * 返回当前客户下,未匹配到的 【乡(镇、街道)级、区县级】 组织信息 * 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 92aae2fe95..df8515ad11 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 @@ -222,7 +222,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); - + Map agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId); // key:agencyId,value:sampleCount样本量 Map gridPartyScoreSampleCountMap = new HashMap<>(); //党建能力平均值 @@ -242,7 +242,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List index1SampleValues = new ArrayList<>(); party.forEach(c -> { if (!c.getParentId().equals(NumConstant.ZERO_STR)) { - pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); +// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + pid.put(c.getParentId(), agencyMap.get(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); } @@ -314,6 +315,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict Map pid = new HashMap<>(); // key:agencyId,value:sampleCount样本量 Map gridPartyScoreSampleCountMap = new HashMap<>(); + Map agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); @@ -335,7 +337,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { if (!c.getParentId().equals(NumConstant.ZERO_STR)) { - pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); +// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + pid.put(c.getParentId(), agencyMap.get(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); } @@ -405,6 +408,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict Map pid = new HashMap<>(); // key:agencyId,value:sampleCount样本量 Map gridPartyScoreSampleCountMap = new HashMap<>(); + Map agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { @@ -429,7 +433,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List index1SampleValues = new ArrayList<>(); serviceAvg.forEach(c -> { if (!c.getParentId().equals(NumConstant.ZERO_STR)) { - pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); +// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + pid.put(c.getParentId(), agencyMap.get(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); } @@ -643,6 +648,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + Map agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId); //党建能力平均值 indexDetailList.forEach(detail -> { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { @@ -657,7 +663,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List index1SampleValues = new ArrayList<>(); party.forEach(c -> { if (!c.getParentId().equals(NumConstant.ZERO_STR)) { - pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); +// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + pid.put(c.getParentId(), agencyMap.get(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); }else { @@ -727,6 +734,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + Map agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); @@ -745,7 +753,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { if (!c.getParentId().equals(NumConstant.ZERO_STR)) { - pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); +// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + pid.put(c.getParentId(), agencyMap.get(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); }else { @@ -813,6 +822,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + Map agencyMap = customerAgencyDao.selectAgencyIdAndParentId(customerId); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { @@ -833,7 +843,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List index1SampleValues = new ArrayList<>(); serviceAvg.forEach(c -> { if (!c.getParentId().equals(NumConstant.ZERO_STR)) { - pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); +// pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); + pid.put(c.getParentId(), agencyMap.get(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); }else { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index acb10f1bad..8d5a681938 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -426,4 +426,16 @@ (SELECT GRID_ID AS orgId FROM screen_customer_grid WHERE DEL_FLAG = 0 AND CUSTOMER_ID = #{customerId}) UNION ALL (SELECT DEPT_ID AS orgId FROM screen_customer_dept WHERE DEL_FLAG = 0 AND CUSTOMER_ID = #{customerId}) + + +