diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
index b4f104aa..a6847dcf 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
@@ -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
and sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
@@ -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