代码提交

This commit is contained in:
liang.chao 2025-08-23 19:24:46 +08:00
parent b5bf04e682
commit 77f4998c98
1 changed files with 8 additions and 3 deletions

View File

@ -80,7 +80,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
WHERE bp.pro_id = #{proId} where 1=1
<if test="type != null and type == 0">
AND bp.pro_id = #{proId}
</if>
AND mm.next_check_time IS NOT NULL AND mm.next_check_time IS NOT NULL
GROUP BY bp.pro_id GROUP BY bp.pro_id
</select> </select>
@ -107,8 +110,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_dept sd on bp.imp_unit = sd.dept_id LEFT JOIN sys_dept sd on bp.imp_unit = sd.dept_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
WHERE bp.pro_id = #{proId} WHERE mm.next_check_time IS NOT NULL
AND mm.next_check_time IS NOT NULL <if test="proId != null">
AND bp.pro_id = #{proId}
</if>
<if test="type != null and type == 0"> <if test="type != null and type == 0">
AND mm.next_check_time BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 30 DAY) AND mm.next_check_time BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 30 DAY)
</if> </if>