导出包公表格

This commit is contained in:
2025-06-25 14:47:45 +08:00
parent b317c3541c
commit 24b9b081cb
6 changed files with 73 additions and 5 deletions

View File

@@ -223,4 +223,33 @@
GROUP BY u.user_id, u.nick_name, d.dept_name
ORDER BY u.nick_name
</select>
<select id="selectAll" resultType="com.ruoyi.oa.domain.vo.OaProjectReportVo">
SELECT
opr.*,
u.nick_name,
p.project_name
FROM
oa_project_report opr
LEFT JOIN sys_oa_project p ON opr.project_id = p.project_id
LEFT JOIN sys_user u ON opr.user_id = u.user_id
<where>
<if test="bo.userIds != null and bo.userIds.size() > 0">
opr.user_id IN
<foreach collection="bo.userIds" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</if>
<if test="bo.userId != null and (bo.userIds == null or bo.userIds.size() == 0)">
AND opr.user_id = #{bo.userId}
</if>
<if test="bo.startDate != null">
AND opr.create_time &gt;= #{bo.startDate}
</if>
<if test="bo.endDate != null">
AND opr.create_time &lt;= #{bo.endDate}
</if>
AND opr.del_flag = '0'
</where>
ORDER BY opr.create_time DESC
</select>
</mapper>