This commit is contained in:
Vinjor 2025-01-22 16:35:02 +08:00
parent fdf3790444
commit 053706ec89

View File

@ -424,32 +424,20 @@
) )
</if> </if>
<if test="map.cusFrom != null and map.cusFrom!=''"> <if test="map.cusFrom != null and map.cusFrom!=''">
<choose> -- 客户来源 --
<when test="map.cusFrom == '06'"> AND (bcm.data_from = #{map.cusFrom})
-- 公务车,查政企客户 --
AND (bcm.type_code='03')
</when>
<when test="map.cusFrom == '04'">
-- 企业用车,查代办客户 --
AND (bcm.type_code='02')
</when>
<otherwise>
-- 家庭自用车01、客户转介绍02、员工转介绍03、救援转维修05 --
AND (bcm.inviter_type=#{map.cusFrom})
</otherwise>
</choose>
</if> </if>
<if test="map.adviserId != null and map.adviserId != ''"> <if test="map.adviserId != null and map.adviserId != ''">
-- 服务顾问查所有的就是服务顾问是自己的 -- -- 服务顾问查所有的就是服务顾问是自己的 --
and drt.adviser_id = #{map.adviserId} AND (drt.adviser_id = #{map.adviserId})
</if> </if>
<if test="map.isHandover != null and map.isHandover != ''"> <if test="map.isHandover != null and map.isHandover != ''">
-- 是否交车 -- -- 是否交车 --
and drt.is_handover = #{map.isHandover} AND (drt.is_handover = #{map.isHandover})
</if> </if>
<if test="map.userIds != null and map.userIds.size > 0"> <if test="map.userIds != null and map.userIds.size > 0">
-- 维修工或维修厂长查所有的就是维修人是自己的或者是自己班组内的 -- -- 维修工或维修厂长查所有的就是维修人是自己的或者是自己班组内的 --
and ( AND (
<foreach item="item" collection="map.userIds" index="index" open="" separator="or" close=""> <foreach item="item" collection="map.userIds" index="index" open="" separator="or" close="">
find_in_set(#{item}, drti.repair_ids) > 0 find_in_set(#{item}, drti.repair_ids) > 0
</foreach> </foreach>