修改日期
This commit is contained in:
parent
9e4d29f9c9
commit
0d328d0c8f
|
@ -52,8 +52,8 @@
|
|||
JOIN
|
||||
sys_dept p ON d.dept_id = p.dept_id
|
||||
WHERE
|
||||
r.REPORT_TIME >= TO_DATE(#{date}, 'YYYY-MM-DD') - 3
|
||||
AND r.REPORT_TIME < TO_DATE(#{date}, 'YYYY-MM-DD') + 1
|
||||
TRUNC(r.REPORT_TIME) >= TO_DATE(#{date}, 'YYYY-MM-DD') - 3
|
||||
AND TRUNC(r.REPORT_TIME) < TO_DATE(#{date}, 'YYYY-MM-DD') + 1
|
||||
GROUP BY
|
||||
p.dept_name
|
||||
HAVING
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
AND d.sn = #{sn}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''">
|
||||
AND d.report_time >= TO_DATE(#{params.beginTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
AND TRUNC(d.REPORT_TIME)>= TO_DATE(#{params.beginTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''">
|
||||
AND d.report_time <= TO_DATE(#{params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
AND TRUNC(d.REPORT_TIME)<= TO_DATE(#{params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
|
||||
</if>
|
||||
ORDER BY d.report_time ASC
|
||||
</select>
|
||||
|
@ -53,8 +53,8 @@
|
|||
WHERE d.dept_id IN (SELECT dept_id
|
||||
FROM sys_dept START WITH dept_id = #{deptId}
|
||||
CONNECT BY PRIOR dept_id = parent_id))
|
||||
AND d.report_time >= TO_DATE(#{startMonth}, 'YYYY-MM')
|
||||
AND d.report_time <= ADD_MONTHS(TO_DATE(#{endMonth}, 'YYYY-MM'), 1)
|
||||
AND TRUNC(d.REPORT_TIME) >= TO_DATE(#{startMonth}, 'YYYY-MM')
|
||||
AND TRUNC(d.REPORT_TIME)<= ADD_MONTHS(TO_DATE(#{endMonth}, 'YYYY-MM'), 1)
|
||||
GROUP BY TO_CHAR(d.report_time, 'YYYY-MM')
|
||||
ORDER BY month
|
||||
</select>
|
||||
|
@ -73,8 +73,8 @@
|
|||
LEFT JOIN th_device td ON d.sn = td.sn
|
||||
LEFT JOIN sys_dept p ON td.dept_id = p.dept_id
|
||||
WHERE td.dept_id IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} OR parent_id = #{deptId})
|
||||
AND d.report_time >= TO_DATE(#{startMonth}, 'YYYY-MM')
|
||||
AND d.report_time <= ADD_MONTHS(TO_DATE(#{endMonth}, 'YYYY-MM'), 1)
|
||||
AND TRUNC(d.REPORT_TIME) >= TO_DATE(#{startMonth}, 'YYYY-MM')
|
||||
AND TRUNC(d.REPORT_TIME)<= ADD_MONTHS(TO_DATE(#{endMonth}, 'YYYY-MM'), 1)
|
||||
GROUP BY d.sn, p.dept_name, td.name, td.address, td.longitude, td.latitude
|
||||
ORDER BY p.dept_name
|
||||
</select>
|
||||
|
@ -199,8 +199,8 @@
|
|||
WHERE d.dept_id IN (SELECT dept_id
|
||||
FROM sys_dept START WITH dept_id = #{deptId}
|
||||
CONNECT BY PRIOR dept_id = parent_id))
|
||||
AND d.report_time >= TO_DATE(#{beginDate}, 'YYYY-MM-DD')
|
||||
AND d.report_time <= TO_DATE(#{endDate}, 'YYYY-MM-DD')
|
||||
AND TRUNC(d.REPORT_TIME) >= TO_DATE(#{beginDate}, 'YYYY-MM-DD')
|
||||
AND TRUNC(d.REPORT_TIME) <= TO_DATE(#{endDate}, 'YYYY-MM-DD')
|
||||
GROUP BY TO_CHAR(d.report_time, 'YYYY-MM-DD')
|
||||
ORDER BY day
|
||||
</select>
|
||||
|
@ -227,8 +227,8 @@
|
|||
WHERE d.dept_id IN (SELECT dept_id
|
||||
FROM sys_dept START WITH dept_id = #{deptId}
|
||||
CONNECT BY PRIOR dept_id = parent_id))
|
||||
AND d.report_time >= TO_DATE(#{beginDate}, 'YYYY-MM-DD')
|
||||
AND d.report_time <= TO_DATE(#{endDate}, 'YYYY-MM-DD')
|
||||
AND TRUNC(d.REPORT_TIME) >= TO_DATE(#{beginDate}, 'YYYY-MM-DD')
|
||||
AND TRUNC(d.REPORT_TIME) <= TO_DATE(#{endDate}, 'YYYY-MM-DD')
|
||||
AND (d.zt = '一级报警' OR d.zt = '二级报警')
|
||||
GROUP BY d.sn, p.dept_name, pp.dept_name, ppp.dept_name, td.address, td.name, d.zt
|
||||
ORDER BY count DESC
|
||||
|
|
Loading…
Reference in New Issue