From b99eac931b0321d8703b6f46c63fccf30f9f5401 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 Jan 2021 13:18:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8-=E6=B2=BB?= =?UTF-8?q?=E7=90=86=E8=83=BD=E5=8A=9B=E4=BF=AE=E6=94=B9end1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexGovrnAblityDeptMonthlyDao.java | 5 +- .../indexcal/impl/DeptScoreServiceImpl.java | 4 +- .../FactIndexGovrnAblityDeptMonthlyDao.xml | 48 +++++++++++++++++-- 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index b4f79644d0..b53a2d7a83 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -18,7 +18,6 @@ package com.epmet.dao.evaluationindex.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -90,7 +89,9 @@ public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao> selectListByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, - @Param("pageSize") Integer pageSize); + @Param("pageSize") Integer pageSize, + @Param("customerAreaCode") String customerAreaCode, + @Param("subCustomerIds") List subCustomerIds); /** * @return com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 00ebad6b5d..9224a2679d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -228,7 +228,9 @@ public class DeptScoreServiceImpl extends BaseServiceImpl> list = null; do { - list = factIndexGovrnAblityDeptMonthlyDao.selectListByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + list = factIndexGovrnAblityDeptMonthlyDao.selectListByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize, + formDTO.getCustomerAreaCode(), + formDTO.getSubCustomerIds()); if (!CollectionUtils.isEmpty(list)) { //遍历指标分组 计算分数 List> crrentFactRecordList = list; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index 404cc2f7f8..30754c9931 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -101,10 +101,24 @@ count( 1 ) AS total FROM fact_index_govrn_ablity_dept_monthly m + inner join screen_customer_dept scd + on( + m.GRID_ID=scd.GRID_ID + and scd.DEL_FLAG='0' + and scd.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID=#{monthId} + + + and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scd.CUSTOMER_ID=#{customerId} + + @@ -127,10 +141,24 @@ MAX(M.SATISFACTION_RATIO) as SATISFACTION_RATIO_MAX FROM fact_index_govrn_ablity_dept_monthly m + inner join screen_customer_dept scd + on( + m.GRID_ID=scd.GRID_ID + and scd.DEL_FLAG='0' + and scd.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scd.CUSTOMER_ID=#{customerId} + + @@ -148,10 +176,24 @@ SATISFACTION_RATIO FROM fact_index_govrn_ablity_dept_monthly m + inner join screen_customer_dept scd + on( + m.GRID_ID=scd.GRID_ID + and scd.DEL_FLAG='0' + and scd.UP_TO_CAL='yes' + ) WHERE m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%') + + + AND m.CUSTOMER_ID =#{customerId} + and scd.CUSTOMER_ID=#{customerId} + + ORDER BY m.DEPT_ID ASC LIMIT #{offset},#{pageSize}