🐞 fix: 报告生成-厂界在线正确检索设备年份

This commit is contained in:
LokerL 2024-10-29 17:11:42 +08:00
parent 2346ffc7c1
commit 0050fd0d27
1 changed files with 3 additions and 1 deletions

View File

@ -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