|
@@ -781,7 +781,7 @@
|
|
|
select
|
|
select
|
|
|
io.orderno as orderno,
|
|
io.orderno as orderno,
|
|
|
io.quoteno as quoteno,
|
|
io.quoteno as quoteno,
|
|
|
- io.orderstatus as orderstatus,
|
|
|
|
|
|
|
+ iac.orderstatus as orderstatus,
|
|
|
io.carinfo as carinfo,
|
|
io.carinfo as carinfo,
|
|
|
io.userid as userid,
|
|
io.userid as userid,
|
|
|
io.username as username,
|
|
io.username as username,
|
|
@@ -818,7 +818,7 @@
|
|
|
<foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
|
|
<foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</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" >
|
|
<if test="deptIds != null and deptIds.size>0" >
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
|
|
<foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
|
|
@@ -827,7 +827,6 @@
|
|
|
)
|
|
)
|
|
|
</if>
|
|
</if>
|
|
|
)
|
|
)
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
|
|
<if test="flag" >
|
|
<if test="flag" >
|
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
</if>
|
|
</if>
|
|
@@ -839,8 +838,7 @@
|
|
|
<foreach collection="agreeIds" item="item" open="(" separator="," close=")">
|
|
<foreach collection="agreeIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
- AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
|
|
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
|
|
|
|
+ AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = #{orderQueryVo.userId} ) )
|
|
|
<if test="flag" >
|
|
<if test="flag" >
|
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
</if>
|
|
</if>
|
|
@@ -853,7 +851,7 @@
|
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
|
</if>
|
|
</if>
|
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
|
- and io.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
|
|
|
|
+ and iac.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
|
and io.frameno = #{orderQueryVo.frameNo}
|
|
and io.frameno = #{orderQueryVo.frameNo}
|
|
@@ -897,7 +895,7 @@
|
|
|
<foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
|
|
<foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</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" >
|
|
<if test="deptIds != null and deptIds.size>0" >
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
|
|
<foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
|
|
@@ -906,7 +904,6 @@
|
|
|
)
|
|
)
|
|
|
</if>
|
|
</if>
|
|
|
)
|
|
)
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
|
|
<if test="flag" >
|
|
<if test="flag" >
|
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
</if>
|
|
</if>
|
|
@@ -918,8 +915,7 @@
|
|
|
<foreach collection="agreeIds" item="item" open="(" separator="," close=")">
|
|
<foreach collection="agreeIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
- AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
|
|
|
|
|
- OR iac.new_operator_id = #{orderQueryVo.userId}
|
|
|
|
|
|
|
+ AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = #{orderQueryVo.userId} ) )
|
|
|
<if test="flag" >
|
|
<if test="flag" >
|
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
OR iac.operator_id = #{orderQueryVo.userId}
|
|
|
</if>
|
|
</if>
|
|
@@ -932,7 +928,7 @@
|
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
|
</if>
|
|
</if>
|
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
|
- and io.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
|
|
|
|
+ and iac.orderstatus= #{orderQueryVo.orderStatus}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
|
and io.frameno = #{orderQueryVo.frameNo}
|
|
and io.frameno = #{orderQueryVo.frameNo}
|