|
|
@@ -795,9 +795,12 @@
|
|
|
<if test="o.projectType != null and o.projectType != """>
|
|
|
and a.project_type = #{o.projectType}
|
|
|
</if>
|
|
|
- <if test="o.approval != null and o.approval != """>
|
|
|
+ <if test="o.approval != null and o.approval < 3">
|
|
|
and o.approval = #{o.approval}
|
|
|
</if>
|
|
|
+ <if test="o.approval != null and o.approval ==4">
|
|
|
+ and o.approval in (1,2)
|
|
|
+ </if>
|
|
|
<if test="o.buyerName != null and o.buyerName != """>
|
|
|
<bind name="n" value="'%' + o.buyerName + '%'" />
|
|
|
and u.nickname like #{n,jdbcType=VARCHAR}
|
|
|
@@ -869,9 +872,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="o.projectType != null and o.projectType != """>
|
|
|
and a.project_type = #{o.projectType}
|
|
|
</if>
|
|
|
- <if test="o.approval != null and o.approval != """>
|
|
|
+ <if test="o.approval != null and o.approval < 3">
|
|
|
and o.approval = #{o.approval}
|
|
|
</if>
|
|
|
+ <if test="o.approval != null and o.approval ==4">
|
|
|
+ and o.approval in (1,2)
|
|
|
+ </if>
|
|
|
<if test="o.buyerName != null and o.buyerName != """>
|
|
|
<bind name="n" value="'%' + o.buyerName + '%'" />
|
|
|
and u.nickname like #{n,jdbcType=VARCHAR}
|
|
|
@@ -945,9 +951,11 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="specially == 0">
|
|
|
- and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
|
|
|
+ <if test="approval ==null">
|
|
|
+ and a.approval in(0,1,2)
|
|
|
+ </if>
|
|
|
+ and a.order_status in(0,1,2,4)
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
-
|
|
|
</if>
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status = 1 and a.order_status = 1
|
|
|
@@ -979,6 +987,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
+ and a.approval =1
|
|
|
+ </if>
|
|
|
+ <if test="approval ==2">
|
|
|
+ and a.approval =2
|
|
|
+ </if>
|
|
|
+ <if test="approval ==4">
|
|
|
and a.approval in (1,2)
|
|
|
</if>
|
|
|
</if>
|
|
|
@@ -1091,15 +1105,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="specially == 0">
|
|
|
- and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
|
|
|
- and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
- <if test="approval ==0">
|
|
|
- and a.approval = 0
|
|
|
+ <if test="approval ==null">
|
|
|
+ and a.approval in(0,1,2)
|
|
|
</if>
|
|
|
- <if test="approval ==1">
|
|
|
- and a.approval in (1,2)
|
|
|
- </if>
|
|
|
- </if>
|
|
|
+ and a.order_status in(0,1,2,4)
|
|
|
+ and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status = 1 and a.order_status = 1
|
|
|
<!-- and c.department_id in (#{deps,jdbcType=VARCHAR}) -->
|
|
|
@@ -1130,6 +1141,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
+ and a.approval =1
|
|
|
+ </if>
|
|
|
+ <if test="approval ==2">
|
|
|
+ and a.approval =2
|
|
|
+ </if>
|
|
|
+ <if test="approval ==4">
|
|
|
and a.approval in (1,2)
|
|
|
</if>
|
|
|
</if>
|
|
|
@@ -1446,9 +1463,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="o.projectType != null and o.projectType != """>
|
|
|
and a.project_type = #{o.projectType}
|
|
|
</if>
|
|
|
- <if test="o.approval != null and o.approval != """>
|
|
|
+ <if test="o.approval != null and o.approval < 3">
|
|
|
and o.approval = #{o.approval}
|
|
|
</if>
|
|
|
+ <if test="o.approval != null and o.approval ==4">
|
|
|
+ and o.approval in (1,2)
|
|
|
+ </if>
|
|
|
<if test="o.buyerName != null and o.buyerName != """>
|
|
|
<bind name="n" value="'%' + o.buyerName + '%'" />
|
|
|
and u.nickname like #{n,jdbcType=VARCHAR}
|