Merge branch 'master' into insp
This commit is contained in:
commit
b5c343fc0e
@ -1093,6 +1093,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// repairTicketsReqVO.setAdviserId(String.valueOf(SecurityFrameworkUtils.getLoginUserId()));
|
||||
} else if (userRoleCode.equals(RepairRoleEnum.REPAIR_STAFF.getCode())) {
|
||||
//维修工,进一步判断是否是班组长
|
||||
//维修工,只查维修中、
|
||||
boolean ifLeader = repairWorkerService.getIfLeader();
|
||||
repairTicketsReqVO.setRoleCode(RepairRoleEnum.REPAIR_STAFF.getCode());
|
||||
if (ifLeader) {
|
||||
|
@ -246,6 +246,10 @@
|
||||
-- 按客户来源查,需要关联客户表 --
|
||||
left join base_customer_main bcm ON drt.user_id = bcm.id
|
||||
</if>
|
||||
<if test="map.roleCode=='repair_staff'">
|
||||
-- 维修工需要关联操作记录,查没有总检记录的工单 --
|
||||
left join dl_repair_records drr ON drt.id = drr.ticket_id AND drr.type='zj'
|
||||
</if>
|
||||
left join dl_repair_titem drti
|
||||
on drt.id = drti.ticket_id AND drti.deleted = '0'
|
||||
where (drt.deleted = '0') AND drt.tickets_status IN ('04','05','01','07','06','02')
|
||||
@ -268,6 +272,10 @@
|
||||
<if test="map.repairType !=null and map.repairType !=''">
|
||||
AND (drt.repair_type=#{map.repairType})
|
||||
</if>
|
||||
<if test="map.roleCode=='repair_staff'">
|
||||
-- 维修工需要关联操作记录,查没有总检记录的工单 --
|
||||
AND (drr.id IS NULL)
|
||||
</if>
|
||||
<if test="map.cusFrom != null and map.cusFrom!=''">
|
||||
<choose>
|
||||
<when test="map.cusFrom == '06'">
|
||||
@ -416,32 +424,20 @@
|
||||
)
|
||||
</if>
|
||||
<if test="map.cusFrom != null and map.cusFrom!=''">
|
||||
<choose>
|
||||
<when test="map.cusFrom == '06'">
|
||||
-- 公务车,查政企客户 --
|
||||
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>
|
||||
-- 客户来源 --
|
||||
AND (bcm.data_from = #{map.cusFrom})
|
||||
</if>
|
||||
<if test="map.adviserId != null and map.adviserId != ''">
|
||||
-- 服务顾问查所有的就是服务顾问是自己的 --
|
||||
and drt.adviser_id = #{map.adviserId}
|
||||
AND (drt.adviser_id = #{map.adviserId})
|
||||
</if>
|
||||
<if test="map.isHandover != null and map.isHandover != ''">
|
||||
-- 是否交车 --
|
||||
and drt.is_handover = #{map.isHandover}
|
||||
AND (drt.is_handover = #{map.isHandover})
|
||||
</if>
|
||||
<if test="map.userIds != null and map.userIds.size > 0">
|
||||
-- 维修工或维修厂长查所有的就是维修人是自己的或者是自己班组内的 --
|
||||
and (
|
||||
AND (
|
||||
<foreach item="item" collection="map.userIds" index="index" open="" separator="or" close="">
|
||||
find_in_set(#{item}, drti.repair_ids) > 0
|
||||
</foreach>
|
||||
|
Loading…
Reference in New Issue
Block a user