|
@@ -66,7 +66,7 @@
|
|
<resultMap id="EnforceAverageTimeDtoResultMap" type="com.zfjg.manage.api.dto.statistics.EnforceAverageTimeDto">
|
|
<resultMap id="EnforceAverageTimeDtoResultMap" type="com.zfjg.manage.api.dto.statistics.EnforceAverageTimeDto">
|
|
<id property="orgName" column="执法机构"/>
|
|
<id property="orgName" column="执法机构"/>
|
|
<result property="orgAvgTime" column="支队平均时长"/>
|
|
<result property="orgAvgTime" column="支队平均时长"/>
|
|
- <result property="headCorpsAvgTime" column="总队平均时长"/>
|
|
|
|
|
|
+ <result property="headCorpsAvgTime" column="视频时长"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectEnforcementProcess" resultMap="EnforcementProcessResultMap">
|
|
<select id="selectEnforcementProcess" resultMap="EnforcementProcessResultMap">
|
|
@@ -82,9 +82,12 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectEnforceAverageTime" resultMap="EnforceAverageTimeDtoResultMap">
|
|
<select id="selectEnforceAverageTime" resultMap="EnforceAverageTimeDtoResultMap">
|
|
- select * from (select (select enforce_org_name from enforce_organize where enforce_org_id = 执法机构id ) 执法机构,round(sum(检查耗时/1000/60)/count(*),2) 支队平均时长 from v_rw where 状态= '已归档' and 检查期限 >= '2024-10-01' and 检查期限 <= '2024-10-31' and 是否删除 = '正常' and 任务类型 = '日常检查'
|
|
|
|
- group by 执法机构id) m left join
|
|
|
|
- (select round(sum(检查耗时/1000/60)/count(*),2) 总队平均时长 from v_rw where 状态= '已归档' and 检查期限 >= '2024-10-01' and 检查期限 <= '2024-10-31' and 是否删除 = '正常' and 任务类型 = '日常检查' and 检查耗时 < 28800000) r on 1=1
|
|
|
|
|
|
+ select (select enforce_org_name from enforce_organize where enforce_org_id = 执法机构id ) 执法机构,
|
|
|
|
+ round(sum(检查耗时/1000/60)/count(*),2) 支队平均时长,
|
|
|
|
+ round(sum((SELECT sum(case when media_id = '-1' then duration else TIMESTAMPDIFF(SECOND,video_begin_time, video_end_time) end ) zfzsc FROM enforce_video C WHERE c.is_deleted = 0 AND c.enfore_job_id = a.id))/count(*)/60,2) 视频时长
|
|
|
|
+ from v_rw a where 状态= '已归档' and `开始执行任务时间` >= '2024-10-01' and 开始执行任务时间 <= '2024-10-31' and 是否删除 = '正常' and 检查耗时 <= 28800000 and 执法机构id != '55c99876ec0f425aac6925a92cceeb17'
|
|
|
|
+ and 任务类型= '日常检查'
|
|
|
|
+ group by 执法机构id
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|