This commit is contained in:
mashuai 2025-10-17 10:07:47 +08:00
parent 2b71b89aa0
commit 2294540e06
2 changed files with 7 additions and 9 deletions

View File

@ -788,7 +788,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND mm.ma_status = 2
AND sai.ma_id IS NOT NULL
AND mt2.type_id not in (6032,6008,6270,6012,6761)
and bp.pro_id not in (3414,1192,3321,3595)
AND bp.pro_id not in (3414,1192,3321,3595)
AND mm.this_check_time is not null
AND mm.next_check_time is not null
AND mt.jiju_type = 2
<if test="impUnitName != null and impUnitName != ''">
and sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
</if>
@ -837,13 +840,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-- 排序proName和teamName都不为空的排在最前面
ORDER BY
-- 核心排序逻辑:两个字段都不为空的记录优先级最高
CASE
WHEN temp.proName IS NOT NULL AND temp.proName != ''
AND temp.teamName IS NOT NULL AND temp.teamName != '' THEN 0 -- 优先排在前面
ELSE 1 -- 其他情况排在后面
END ASC,
-- 可根据需要添加其他排序字段(如原顺序或时间)
temp.nextCheckTime ASC -- 示例按maId升序排列可选
SUBSTRING( temp.typeName, 1, 1 ) ASC ,
temp.nextCheckTime ASC
</select>
<select id="getTeamNumList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedTeamTotalVo">

View File

@ -238,7 +238,7 @@
AND mm.next_check_time is not null
AND mt.jiju_type = 2
AND mt2.type_id not in (6032,6008,6270,6012,6761)
AND DATEDIFF(mm.next_check_time, CURDATE()) &lt;= 0
AND DATEDIFF(mm.next_check_time, CURDATE()) &lt;= 30
<if test="status != null and status == 0">
AND mm.next_check_time &gt;= CURDATE()
</if>