|
@@ -35,28 +35,21 @@
|
|
|
<select id="selectEvaluateList" resultType="com.zfjg.manage.api.dto.enforce.job.EnforceEvaluateDTO">
|
|
|
select enforce_org_id,enforce_org_name,(
|
|
|
SELECT
|
|
|
- count( 1 )
|
|
|
+ COUNT( 1 )
|
|
|
FROM
|
|
|
enforce_job ej
|
|
|
+ LEFT JOIN enforce_video ev ON ej.id = ev.enfore_job_id
|
|
|
+ AND ev.is_deleted = 0
|
|
|
WHERE
|
|
|
- ej.is_deleted = '0'
|
|
|
- AND ej.job_status = 'ARCHIVED'
|
|
|
- AND ej.enforce_org_id = eo.enforce_org_id
|
|
|
- AND ej.id NOT IN (
|
|
|
- SELECT
|
|
|
- ev.enfore_job_id
|
|
|
- FROM
|
|
|
- enforce_video ev
|
|
|
- WHERE
|
|
|
- is_deleted = 0
|
|
|
- AND ev.enfore_job_id IS NOT NULL
|
|
|
- AND ev.enforce_org_id = eo.enforce_org_id
|
|
|
- )
|
|
|
+ ej.enforce_org_id = eo.enforce_org_id
|
|
|
+ and ej.job_status = 'ARCHIVED'
|
|
|
+ AND ej.is_deleted = '0'
|
|
|
+ AND ev.enfore_job_id IS NULL;
|
|
|
<if test="pm.startDate != null and pm.startDate !=''">
|
|
|
- AND finish_time <![CDATA[ >= ]]> #{pm.startDate}
|
|
|
+ AND ej.finish_time <![CDATA[ >= ]]> #{pm.startDate}
|
|
|
</if>
|
|
|
<if test="pm.endDate != null and pm.endDate !=''">
|
|
|
- AND finish_time <![CDATA[ <= ]]> #{pm.endDate}
|
|
|
+ AND ej.finish_time <![CDATA[ <= ]]> #{pm.endDate}
|
|
|
</if>
|
|
|
) noProcessCount,
|
|
|
(
|
|
@@ -66,8 +59,8 @@
|
|
|
enforce_job a
|
|
|
WHERE
|
|
|
a.enforce_org_id = eo.enforce_org_id
|
|
|
- AND job_type in ('REVIEW','NORMAL','REPORT')
|
|
|
AND time_out = 1
|
|
|
+ AND job_type in ('REVIEW','NORMAL','REPORT')
|
|
|
AND a.is_deleted = 0
|
|
|
<if test="pm.startDate != null and pm.startDate !=''">
|
|
|
AND a.last_enforce_date <![CDATA[ >= ]]> #{pm.startDate}
|
|
@@ -107,6 +100,27 @@
|
|
|
</if>
|
|
|
) deductScore
|
|
|
from enforce_organize eo
|
|
|
+ left join (
|
|
|
+ SELECT
|
|
|
+ COUNT( 1 )
|
|
|
+ FROM
|
|
|
+ enforce_job ej
|
|
|
+ LEFT JOIN enforce_video ev ON ej.id = ev.enfore_job_id
|
|
|
+ AND ev.is_deleted = 0
|
|
|
+ WHERE
|
|
|
+ ej.enforce_org_id = eo.enforce_org_id
|
|
|
+ and ej.job_status = 'ARCHIVED'
|
|
|
+ AND ej.is_deleted = '0'
|
|
|
+ AND ev.enfore_job_id IS NULL;
|
|
|
+ <if test="pm.startDate != null and pm.startDate !=''">
|
|
|
+ AND ej.finish_time <![CDATA[ >= ]]> #{pm.startDate}
|
|
|
+ </if>
|
|
|
+ <if test="pm.endDate != null and pm.endDate !=''">
|
|
|
+ AND ej.finish_time <![CDATA[ <= ]]> #{pm.endDate}
|
|
|
+ </if>
|
|
|
+ )t1 on t1
|
|
|
+
|
|
|
+
|
|
|
where eo.enforce_org_id not in ('55c99876ec0f425aac6925a92cceeb17','256069491270746112')
|
|
|
<if test="pm.enforceOrgId != null and pm.enforceOrgId != ''">
|
|
|
and eo.enforce_org_id = #{pm.enforceOrgId}
|