This commit is contained in:
parent
2b71b89aa0
commit
2294540e06
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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()) <= 0
|
||||
AND DATEDIFF(mm.next_check_time, CURDATE()) <= 30
|
||||
<if test="status != null and status == 0">
|
||||
AND mm.next_check_time >= CURDATE()
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue