|
|
@@ -1032,35 +1032,36 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="specially == 3">
|
|
|
- and a.order_status=2 and dep.approval_aid= #{aid,jdbcType=VARCHAR}
|
|
|
-
|
|
|
- <if test="approval ==0">
|
|
|
- and a.process_status in(4)
|
|
|
- and a.approval = 0
|
|
|
- </if>
|
|
|
- <if test="approval ==1">
|
|
|
- and a.process_status in(4)
|
|
|
- and a.approval in(1)
|
|
|
- </if>
|
|
|
- <if test="approval ==2">
|
|
|
- and a.approval in (2,3)
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- <if test="specially == 11">
|
|
|
and a.order_status=2
|
|
|
+ <if test="manageType ==0">
|
|
|
+ and dep.approval_aid= #{aid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="approval ==0">
|
|
|
and a.process_status in(4)
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
and a.process_status in(4)
|
|
|
- and a.approval in (4)
|
|
|
+ and a.approval in
|
|
|
+ <if test="manageType ==0">
|
|
|
+ (1)
|
|
|
+ </if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (4)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
- and a.approval in (5,6)
|
|
|
+ and a.approval in
|
|
|
+ <if test="manageType ==0">
|
|
|
+ (2,3)
|
|
|
+ </if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (5,6)
|
|
|
+ </if>
|
|
|
+
|
|
|
</if>
|
|
|
</if>
|
|
|
- <if test="specially !=3 and specially !=11">
|
|
|
+ <if test="specially !=3 ">
|
|
|
<if test="approval ==0">
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
@@ -1199,29 +1200,17 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.process_status = 1 and a.order_status in (0,1,2)
|
|
|
and mg.manager_id= #{aid}
|
|
|
</if>
|
|
|
- <if test="specially == 1">
|
|
|
- and a.process_status = 2 and a.order_status in (0,1,2)
|
|
|
- </if>
|
|
|
- <if test="specially == 2">
|
|
|
- and a.order_status in(3,5)
|
|
|
- and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
+ <if test="specially == 1">
|
|
|
+ and a.process_status = 2 and a.order_status in (0,1,2)
|
|
|
+ </if>
|
|
|
+ <if test="specially == 2">
|
|
|
+ and a.order_status in(3,5)
|
|
|
+ and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="specially == 3">
|
|
|
- and a.order_status=2 and dep.approval_aid= #{aid,jdbcType=VARCHAR}
|
|
|
-
|
|
|
- <if test="approval ==0">
|
|
|
- and a.process_status in(4)
|
|
|
- and a.approval = 0
|
|
|
- </if>
|
|
|
- <if test="approval ==1">
|
|
|
- and a.process_status in(4)
|
|
|
- and a.approval in(1)
|
|
|
+ <if test="manageType ==0">
|
|
|
+ and dep.approval_aid= #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="approval ==2">
|
|
|
- and a.approval in (2,3)
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- <if test="specially == 11">
|
|
|
and a.order_status=2
|
|
|
<if test="approval ==0">
|
|
|
and a.process_status in(4)
|
|
|
@@ -1229,13 +1218,26 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
and a.process_status in(4)
|
|
|
- and a.approval in (4)
|
|
|
+ and a.approval in
|
|
|
+ <if test="manageType ==0">
|
|
|
+ (1)
|
|
|
+ </if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (4)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
- and a.approval in (5,6)
|
|
|
+ and a.approval in
|
|
|
+ <if test="manageType ==0">
|
|
|
+ (2,3)
|
|
|
+ </if>
|
|
|
+ <if test="manageType ==1">
|
|
|
+ (5,6)
|
|
|
+ </if>
|
|
|
+
|
|
|
</if>
|
|
|
</if>
|
|
|
- <if test="specially !=3 and specially !=11">
|
|
|
+ <if test="specially !=3 ">
|
|
|
<if test="approval ==0">
|
|
|
and a.approval = 0
|
|
|
</if>
|