Browse Source

修改评价周期内被吹哨项目数与评价周期内被办结项目数的算法

dev_shibei_match
wangchao 5 years ago
parent
commit
7d0333004a
  1. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -165,7 +165,7 @@
AGENCY_ID, AGENCY_ID,
COUNT(DISTINCT PROJECT_ID) AS count COUNT(DISTINCT PROJECT_ID) AS count
FROM FROM
fact_origin_project_log_daily fact_origin_project_log_daily log
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId} AND CUSTOMER_ID = #{customerId}
AND IS_ACTIVE = '0' AND IS_ACTIVE = '0'
@ -173,13 +173,14 @@
AND MONTH_ID = #{dimId} AND MONTH_ID = #{dimId}
AND NOT EXISTS( AND NOT EXISTS(
SELECT ID SELECT ID
FROM fact_origin_project_log_daily FROM fact_origin_project_log_daily innerLog
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
AND MONTH_ID <![CDATA[ < ]]> #{dimId} AND MONTH_ID <![CDATA[ < ]]> #{dimId}
AND IS_ACTIVE = '0' AND IS_ACTIVE = '0'
AND log.project_id = innerLog.project_id
<if test="agencies != null and agencies.size() > 0"> <if test="agencies != null and agencies.size() > 0">
<foreach collection="agencies" item="agencyId" open="AND (" close=" )" separator=" OR "> <foreach collection="agencies" item="agencyId" open="AND (" close=" )" separator=" OR ">
AGENCY_ID = #{agencyId} innerLog.AGENCY_ID = #{agencyId}
</foreach> </foreach>
</if> </if>
) )
@ -204,13 +205,10 @@
<if test='null != dimId and "" != dimId.trim()'> <if test='null != dimId and "" != dimId.trim()'>
AND log.MONTH_ID = #{dimId} AND log.MONTH_ID = #{dimId}
AND EXISTS ( AND EXISTS (
select id from fact_origin_project_log_daily where del_flag = '0' select innerLog.id from fact_origin_project_log_daily innerLog where innerLog.del_flag = '0'
and customer_id = #{customerId} and month_id = #{dimId} and innerLog.customer_id = #{customerId} and innerLog.month_id = #{dimId}
and action_code like 'close%' and innerLog.action_code like 'close%'
<if test="agencies != null and agencies.size() > 0"> and innerLog.project_id = log.project_id
<foreach collection="agencies" item="agencyId" open="AND (" close=" )" separator=" OR ">
AGENCY_ID = #{agencyId}
</foreach></if>
) )
</if> </if>

Loading…
Cancel
Save