|
@@ -113,7 +113,8 @@
|
|
|
enforce_job ej
|
|
|
WHERE
|
|
|
ej.is_deleted = 0 AND ej.job_status = 'ARCHIVED'
|
|
|
- <if test="pm.enforceOrgId != null and pm.enforceOrgId != ''">
|
|
|
+ AND ej.enforce_org_id not in ('55c99876ec0f425aac6925a92cceeb17','256069491270746112')
|
|
|
+ <if test="pm.enforceOrgId != null and pm.enforceOrgId != ''">
|
|
|
and ej.enforce_org_id = #{pm.enforceOrgId}
|
|
|
</if>
|
|
|
<if test="pm.enforceOrgIds !=null and pm.enforceOrgIds.size>0">
|
|
@@ -192,6 +193,7 @@
|
|
|
ej.is_deleted = 0
|
|
|
AND ej.job_type in ('REPORT','NORMAL','REVIEW')
|
|
|
AND ej.time_out = 1
|
|
|
+ AND ej.enforce_org_id not in ('55c99876ec0f425aac6925a92cceeb17','256069491270746112')
|
|
|
<if test="pm.enforceOrgId != null and pm.enforceOrgId != ''">
|
|
|
and ej.enforce_org_id = #{pm.enforceOrgId}
|
|
|
</if>
|
|
@@ -268,21 +270,22 @@
|
|
|
|
|
|
<select id="selectEnforceJobAverageTime" resultType="com.zfjg.manage.api.dto.enforce.job.EnforcementJobAverageTimeDTO">
|
|
|
SELECT
|
|
|
- *,round( ( headCorpsAvgTime / orgAvgTime ) * 100, 2 ) rate
|
|
|
+ *,
|
|
|
+ round( ( headCorpsAvgTime / orgAvgTime ) * 100, 2 ) rate
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- ej.id,
|
|
|
- ej.job_no,
|
|
|
- ej.job_type,
|
|
|
- ej.enforce_result,
|
|
|
- ej.executor_names,
|
|
|
- ej.finish_time,
|
|
|
- ej.enforce_obj_id,
|
|
|
- ej.enforce_obj_name,
|
|
|
- ej.enforce_org_id,
|
|
|
- ej.enforce_org_name,
|
|
|
- round( sum( time_consuming / 1000 / 60 ) / count( * ), 2 ) orgAvgTime,
|
|
|
+ id,
|
|
|
+ 任务编号 jobNo,
|
|
|
+ 任务类型 jobTypeName,
|
|
|
+ 检察员名称 executorNames,
|
|
|
+ 检察员ID executorIds,
|
|
|
+ 结束执行任务时间 finishTime,
|
|
|
+ 检查对象 enforceObjId,
|
|
|
+ 检查对象名称 enforceObjName,
|
|
|
+ 执法机构id enforceOrgId,
|
|
|
+ 执法机构名称 enforceOrgName,
|
|
|
+ round( sum( 检查耗时 / 1000 / 60 ) , 2 ) orgAvgTime,
|
|
|
round(
|
|
|
sum(
|
|
|
(
|
|
@@ -292,38 +295,44 @@
|
|
|
enforce_video C
|
|
|
WHERE
|
|
|
c.is_deleted = 0
|
|
|
- AND c.enfore_job_id = ej.id
|
|
|
+ AND c.enfore_job_id = a.id
|
|
|
)
|
|
|
- ) / count( * ) / 60,
|
|
|
+ ) / 60,
|
|
|
2
|
|
|
) headCorpsAvgTime
|
|
|
FROM
|
|
|
- enforce_job ej
|
|
|
+ v_rw a
|
|
|
WHERE
|
|
|
- ej.is_deleted = 0 AND ej.job_status = 'ARCHIVED' and ej.time_consuming <![CDATA[ <= ]]> 28800000 and ej.job_type = 'NORMAL'
|
|
|
+ 状态 = '已归档'
|
|
|
+ AND 是否删除 = '正常'
|
|
|
+ AND 检查耗时 <![CDATA[ <= ]]> 28800000
|
|
|
+ AND 执法机构id NOT IN ( '55c99876ec0f425aac6925a92cceeb17', '256069491270746112' )
|
|
|
+ AND 任务类型 = '日常检查'
|
|
|
<if test="pm.enforceOrgId != null and pm.enforceOrgId != ''">
|
|
|
- and ej.enforce_org_id = #{pm.enforceOrgId}
|
|
|
+ and 执法机构id = #{pm.enforceOrgId}
|
|
|
</if>
|
|
|
<if test="pm.enforceOrgIds !=null and pm.enforceOrgIds.size>0">
|
|
|
- and ej.enforce_org_id in
|
|
|
+ and 执法机构id in
|
|
|
<foreach item="item" index="i" collection="pm.enforceOrgIds" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="pm.executorId != null and pm.executorId != ''">
|
|
|
- and ${pm.executorId} in (ej.executor_ids)
|
|
|
+ and ${pm.executorId} in (检察员ID)
|
|
|
</if>
|
|
|
- <if test="pm.jobType != null and pm.jobType != ''">
|
|
|
- and ej.job_type = #{pm.jobType}
|
|
|
+ <if test="pm.jobTypeName != null and pm.jobTypeName != ''">
|
|
|
+ and 任务类型 = #{pm.jobTypeName}
|
|
|
</if>
|
|
|
<if test="pm.startDate != null and pm.startDate !=''">
|
|
|
- AND ej.finish_time <![CDATA[ >= ]]> #{pm.startDate}
|
|
|
+ AND 结束执行任务时间 <![CDATA[ >= ]]> #{pm.startDate}
|
|
|
</if>
|
|
|
<if test="pm.endDate != null and pm.endDate !=''">
|
|
|
- AND ej.finish_time <![CDATA[ <= ]]> #{pm.endDate}
|
|
|
+ AND 结束执行任务时间 <![CDATA[ <= ]]> #{pm.endDate}
|
|
|
</if>
|
|
|
- group by ej.id
|
|
|
- ) t order by rate
|
|
|
+ group by id
|
|
|
+ ) t
|
|
|
+ ORDER BY
|
|
|
+ rate,enforceOrgId
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|