1.消防检查二维码
parent
25752ec5ef
commit
bd4185fcb7
|
@ -1031,5 +1031,57 @@
|
||||||
frp.EQUIPMENT_POINT_ID = #{EQUIPMENT_POINT_ID}
|
frp.EQUIPMENT_POINT_ID = #{EQUIPMENT_POINT_ID}
|
||||||
AND frp.ISDELETE = '0'
|
AND frp.ISDELETE = '0'
|
||||||
</select>
|
</select>
|
||||||
|
<select id="datalistPageV3" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.Page">
|
||||||
|
SELECT
|
||||||
|
cl.FIRE_CHECK_STANDARD_NAME,
|
||||||
|
fr.FIRE_CHECK_ID,
|
||||||
|
cl.FIRE_CHECK_TYPE AS FIRE_CHECK_TYPE_ID,
|
||||||
|
d.`NAME` AS DEPARTMENT_NAME,
|
||||||
|
su.`NAME` AS USER_NAME,
|
||||||
|
count(
|
||||||
|
IF
|
||||||
|
( fr.FINISHED = 0, NULL, fr.FINISHED )) COUNT,
|
||||||
|
IF
|
||||||
|
( temp.FINISHED > 0, temp.FINISHED, 0 ) checkCount,
|
||||||
|
cl.STATE,
|
||||||
|
sys_dictionaries.`NAME` AS PERIODNAME
|
||||||
|
FROM
|
||||||
|
bus_fire_record AS fr
|
||||||
|
LEFT JOIN bus_fire_record_point AS cp ON fr.FIRE_CHECK_ID = cp.FIRE_CHECK_ID
|
||||||
|
LEFT JOIN bus_fire_checklist AS cl ON cp.FIRE_CHECK_ID = cl.FIRE_CHECK_ID
|
||||||
|
LEFT JOIN oa_department AS d ON cl.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||||
|
LEFT JOIN sys_user AS su ON cl.USER_ID = su.USER_ID
|
||||||
|
LEFT JOIN sys_dictionaries ON cl.FIRE_CHECK_TYPE = sys_dictionaries.BIANMA
|
||||||
|
LEFT JOIN ( SELECT count(FINISHED) FINISHED ,FIRE_CHECK_ID FROM bus_fire_record WHERE
|
||||||
|
CONCAT(date_format(current_date(),'%Y-%m-%d'),' 00:00:00') BETWEEN PERIODSTART AND PERIODEND and isdelete = 0 and FINISHED = '1' GROUP BY
|
||||||
|
FIRE_CHECK_ID ) temp ON
|
||||||
|
fr.FIRE_CHECK_ID = temp.FIRE_CHECK_ID
|
||||||
|
LEFT JOIN ( SELECT * FROM bus_fire_record WHERE CONCAT(date_format(current_date()-1,'%Y-%m-%d'),' 00:00:00')
|
||||||
|
BETWEEN PERIODSTART AND
|
||||||
|
PERIODEND GROUP BY FIRE_CHECK_ID ) st ON fr.FIRE_CHECK_ID = st.FIRE_CHECK_ID
|
||||||
|
WHERE
|
||||||
|
fr.ISDELETE = 0
|
||||||
|
AND cl.ISDELETE = 0
|
||||||
|
<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 -->
|
||||||
|
<choose>
|
||||||
|
<!--公司领导-->
|
||||||
|
<when test='pd.roleLevel == "0"'>
|
||||||
|
<if test="pd.CORPINFO_ID!=null and pd.CORPINFO_ID != ''">
|
||||||
|
AND cp.CORPINFO_ID = #{pd.CORPINFO_ID,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</when>
|
||||||
|
<when test='pd.roleLevel == "1"'>
|
||||||
|
and cl.DEPARTMENT_ID in (${pd.supDeparIds})
|
||||||
|
</when>
|
||||||
|
<when test='pd.roleLevel == "2"'>
|
||||||
|
<if test="pd.FIRE_POINT_ID != null and pd.FIRE_POINT_ID != ''">
|
||||||
|
AND cp.FIRE_POINT_ID = #{pd.FIRE_POINT_ID}
|
||||||
|
</if>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
FIRE_CHECK_ID
|
||||||
|
order by fr. CREATTIME
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue