diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml index ed2860b..695aab0 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml @@ -241,7 +241,9 @@ LEFT JOIN sys_dept p ON d.dept_id = p.dept_id WHERE d.dept_id IN (SELECT dept_id FROM sys_dept START WITH dept_id = #{deptId} - CONNECT BY PRIOR dept_id = parent_id)) + CONNECT BY PRIOR dept_id = parent_id) + AND TO_CHAR(d.create_time, 'yyyy') = #{year} + ) AND TO_CHAR(d.report_time, 'YYYY') = #{year} GROUP BY d.sn, td.address, p.dept_name, pp.dept_name, ppp.dept_name ORDER BY p.dept_name, pp.dept_name, ppp.dept_name, d.sn