Browse Source

区直部门-治理能力修改end1

dev_shibei_match
yinzuomei 5 years ago
parent
commit
b99eac931b
  1. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  3. 48
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml

5
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.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO;
import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -90,7 +89,9 @@ public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao<FactIndexGov
List<Map<String, Object>> selectListByMonthId(@Param("customerId") String customerId, List<Map<String, Object>> selectListByMonthId(@Param("customerId") String customerId,
@Param("monthId") String monthId, @Param("monthId") String monthId,
@Param("offset") Integer offset, @Param("offset") Integer offset,
@Param("pageSize") Integer pageSize); @Param("pageSize") Integer pageSize,
@Param("customerAreaCode") String customerAreaCode,
@Param("subCustomerIds") List<String> subCustomerIds);
/** /**
* @return com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity * @return com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity

4
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<DeptScoreDao, DeptScor
//分页查询 要计算的原始数据 //分页查询 要计算的原始数据
List<Map<String, Object>> list = null; List<Map<String, Object>> list = null;
do { 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)) { if (!CollectionUtils.isEmpty(list)) {
//遍历指标分组 计算分数 //遍历指标分组 计算分数
List<Map<String, Object>> crrentFactRecordList = list; List<Map<String, Object>> crrentFactRecordList = list;

48
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml

@ -101,10 +101,24 @@
count( 1 ) AS total count( 1 ) AS total
FROM FROM
fact_index_govrn_ablity_dept_monthly m 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 WHERE
m.DEL_FLAG = '0' m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID=#{monthId} AND m.MONTH_ID=#{monthId}
<choose>
<when test="null!=subCustomerIds and subCustomerIds.size()>0">
and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%')
</when>
<otherwise>
AND m.CUSTOMER_ID =#{customerId}
and scd.CUSTOMER_ID=#{customerId}
</otherwise>
</choose>
</select> </select>
<!-- 计算最大最小值 --> <!-- 计算最大最小值 -->
@ -127,10 +141,24 @@
MAX(M.SATISFACTION_RATIO) as SATISFACTION_RATIO_MAX MAX(M.SATISFACTION_RATIO) as SATISFACTION_RATIO_MAX
FROM FROM
fact_index_govrn_ablity_dept_monthly m 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 WHERE
m.DEL_FLAG = '0' m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID =#{monthId} AND m.MONTH_ID =#{monthId}
<choose>
<when test="null!=subCustomerIds and subCustomerIds.size()>0">
and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%')
</when>
<otherwise>
AND m.CUSTOMER_ID =#{customerId}
and scd.CUSTOMER_ID=#{customerId}
</otherwise>
</choose>
</select> </select>
<!-- 分页查询事实记录 --> <!-- 分页查询事实记录 -->
@ -148,10 +176,24 @@
SATISFACTION_RATIO SATISFACTION_RATIO
FROM FROM
fact_index_govrn_ablity_dept_monthly m 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 WHERE
m.DEL_FLAG = '0' m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.MONTH_ID =#{monthId} AND m.MONTH_ID =#{monthId}
<choose>
<when test="null!=subCustomerIds and subCustomerIds.size()>0">
and scd.AREA_CODE LIKE concat( #{customerAreaCode}, '%')
</when>
<otherwise>
AND m.CUSTOMER_ID =#{customerId}
and scd.CUSTOMER_ID=#{customerId}
</otherwise>
</choose>
ORDER BY ORDER BY
m.DEPT_ID ASC m.DEPT_ID ASC
LIMIT #{offset},#{pageSize} LIMIT #{offset},#{pageSize}

Loading…
Cancel
Save