|
|
@@ -214,7 +214,8 @@
|
|
|
iac.payment_link,
|
|
|
iac.accident_info,
|
|
|
iac.tax_arrears,
|
|
|
- iac.cross_insurance
|
|
|
+ iac.cross_insurance,
|
|
|
+ iac.ubi_predicted_info_score
|
|
|
from ins_orders as o
|
|
|
join ins_area_company iac on o.orderno = iac.orderno
|
|
|
where iac.id = #{companyId}
|
|
|
@@ -780,7 +781,7 @@
|
|
|
select
|
|
|
io.orderno as orderno,
|
|
|
io.quoteno as quoteno,
|
|
|
- io.orderstatus as orderstatus,
|
|
|
+ iac.orderstatus as orderstatus,
|
|
|
io.carinfo as carinfo,
|
|
|
io.userid as userid,
|
|
|
io.username as username,
|
|
|
@@ -817,17 +818,18 @@
|
|
|
<foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' )
|
|
|
+ AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = #{orderQueryVo.userId} )
|
|
|
<if test="deptIds != null and deptIds.size>0" >
|
|
|
AND (
|
|
|
<foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
|
|
|
- io.deptid like CONCAT('%', #{item}, '%')
|
|
|
+ io.deptid like CONCAT('', #{item}, '%')
|
|
|
</foreach>
|
|
|
)
|
|
|
</if>
|
|
|
)
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
- OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ <if test="flag" >
|
|
|
+ OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ </if>
|
|
|
)
|
|
|
</if>
|
|
|
<if test="agreeIds != null and agreeIds.size>0">
|
|
|
@@ -836,9 +838,10 @@
|
|
|
<foreach collection="agreeIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
- OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = #{orderQueryVo.userId} ) )
|
|
|
+ <if test="flag" >
|
|
|
+ OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ </if>
|
|
|
)
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderNo != null and orderQueryVo.orderNo != ''">
|
|
|
@@ -848,7 +851,7 @@
|
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
|
- and io.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
+ and iac.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
|
and io.frameno = #{orderQueryVo.frameNo}
|
|
|
@@ -865,7 +868,12 @@
|
|
|
<if test="orderQueryVo.companyId != null and orderQueryVo.companyId != ''">
|
|
|
and iac.company_id = #{orderQueryVo.companyId}
|
|
|
</if>
|
|
|
-
|
|
|
+ <if test="orderQueryVo.operatorId != null and orderQueryVo.operatorId != ''">
|
|
|
+ and io.userid = #{orderQueryVo.operatorId}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.operatorName != null and orderQueryVo.operatorName != ''">
|
|
|
+ and io.username = #{orderQueryVo.operatorName}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by io.createtime desc
|
|
|
</select>
|
|
|
@@ -887,17 +895,18 @@
|
|
|
<foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' )
|
|
|
+ AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = #{orderQueryVo.userId} )
|
|
|
<if test="deptIds != null and deptIds.size>0" >
|
|
|
AND (
|
|
|
<foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
|
|
|
- io.deptid like CONCAT('%', #{item}, '%')
|
|
|
+ io.deptid like CONCAT('', #{item}, '%')
|
|
|
</foreach>
|
|
|
)
|
|
|
</if>
|
|
|
)
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
+ <if test="flag" >
|
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ </if>
|
|
|
)
|
|
|
</if>
|
|
|
<if test="agreeIds != null and agreeIds.size>0">
|
|
|
@@ -906,9 +915,10 @@
|
|
|
<foreach collection="agreeIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
- OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = #{orderQueryVo.userId} ) )
|
|
|
+ <if test="flag" >
|
|
|
+ OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
+ </if>
|
|
|
)
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderNo != null and orderQueryVo.orderNo != ''">
|
|
|
@@ -918,7 +928,7 @@
|
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
|
- and io.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
+ and iac.orderstatus= #{orderQueryVo.orderStatus}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
|
and io.frameno = #{orderQueryVo.frameNo}
|
|
|
@@ -935,6 +945,12 @@
|
|
|
<if test="orderQueryVo.companyId != null and orderQueryVo.companyId != ''">
|
|
|
and iac.company_id = #{orderQueryVo.companyId}
|
|
|
</if>
|
|
|
+ <if test="orderQueryVo.operatorId != null and orderQueryVo.operatorId != ''">
|
|
|
+ and io.userid = #{orderQueryVo.operatorId}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.operatorName != null and orderQueryVo.operatorName != ''">
|
|
|
+ and io.username = #{orderQueryVo.operatorName}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
) as s
|
|
|
</select>
|