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