|
|
@@ -953,8 +953,11 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
left join (select order_no from new_order_change group by order_no)g on a.order_no=g.order_no
|
|
|
</if>
|
|
|
<if test="specially == 9">
|
|
|
- left join t_order_task tot on a.order_no =tot.order_no
|
|
|
- left join business_project bp on tot.commodity_id =bp.id
|
|
|
+ left join t_order_task tot on a.order_no =tot.order_no
|
|
|
+ left join business_project bp on tot.commodity_id =bp.id
|
|
|
+ </if>
|
|
|
+ <if test="specially == 10">
|
|
|
+ left join admin mg on a.salesman_id=mg.id
|
|
|
</if>
|
|
|
where a.delete_sign in(0,2)
|
|
|
<if test="specially ==7">
|
|
|
@@ -983,9 +986,13 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
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
|
|
|
- </if>
|
|
|
+ <if test="specially == 10">
|
|
|
+ and a.process_status = 1 and a.order_status = 1
|
|
|
+ and mg.manager_id= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="specially == 1">
|
|
|
+ and a.process_status = 2 and a.order_status = 1
|
|
|
+ </if>
|
|
|
<if test="specially == 2">
|
|
|
and a.order_status in(3,5)
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
@@ -993,11 +1000,11 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="specially == 3">
|
|
|
and a.order_status=2
|
|
|
<if test="approval ==0">
|
|
|
- and a.process_status in(7)
|
|
|
+ and a.process_status in(4)
|
|
|
and a.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
- and a.process_status in(7)
|
|
|
+ and a.process_status in(4)
|
|
|
and a.approval in
|
|
|
<if test="manageType ==0">
|
|
|
(1)
|
|
|
@@ -1041,13 +1048,13 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="distribution == 0">
|
|
|
- and a.process_status < 5
|
|
|
+ and a.process_status < 6
|
|
|
</if>
|
|
|
<if test="distribution == 1">
|
|
|
- and a.process_status = 5
|
|
|
+ and a.process_status = 6
|
|
|
</if>
|
|
|
<if test="distribution == 2">
|
|
|
- and a.process_status = 6
|
|
|
+ and a.process_status = 7
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
@@ -1115,6 +1122,9 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
left join t_order_task tot on a.order_no =tot.order_no
|
|
|
left join business_project bp on tot.commodity_id =bp.id
|
|
|
</if>
|
|
|
+ <if test="specially == 10">
|
|
|
+ left join admin mg on a.salesman_id=mg.id
|
|
|
+ </if>
|
|
|
where a.delete_sign in(0,2)
|
|
|
<if test="specially ==7">
|
|
|
and a.process_status > 4
|
|
|
@@ -1142,6 +1152,10 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and a.order_status in(0,1,2,4)
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="specially == 10">
|
|
|
+ and a.process_status = 1 and a.order_status = 1
|
|
|
+ and mg.manager_id= #{aid}
|
|
|
+ </if>
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status = 1 and a.order_status = 1
|
|
|
</if>
|