|
@@ -850,7 +850,11 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
left join admin f on e.task_receiver=f.id
|
|
left join admin f on e.task_receiver=f.id
|
|
|
left join (select order_no from new_order_change group by order_no)g on a.order_no=g.order_no
|
|
left join (select order_no from new_order_change group by order_no)g on a.order_no=g.order_no
|
|
|
</if>
|
|
</if>
|
|
|
- where a.delete_sign !=1
|
|
|
|
|
|
|
+ <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
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where a.delete_sign in(0,2)
|
|
|
<if test="specially ==7">
|
|
<if test="specially ==7">
|
|
|
and a.process_status > 4
|
|
and a.process_status > 4
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
@@ -858,8 +862,11 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="specially ==8">
|
|
<if test="specially ==8">
|
|
|
and a.process_status > 4
|
|
and a.process_status > 4
|
|
|
<if test="uid !=null">
|
|
<if test="uid !=null">
|
|
|
- and a.buyer_id = #{uid}
|
|
|
|
|
|
|
+ and a.buyer_id = #{uid}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="specially ==9">
|
|
|
|
|
+ and a.process_status > 4 and bp.type=5
|
|
|
<if test="aid !=null">
|
|
<if test="aid !=null">
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
@@ -973,14 +980,26 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
select count(*)
|
|
select count(*)
|
|
|
from t_order_new a left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
|
|
from t_order_new a left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
|
|
|
left join department dep on a.order_dep=dep.id
|
|
left join department dep on a.order_dep=dep.id
|
|
|
- where a.delete_sign !=1
|
|
|
|
|
|
|
+ <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
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where a.delete_sign in(0,2)
|
|
|
<if test="specially ==7">
|
|
<if test="specially ==7">
|
|
|
and a.process_status > 4
|
|
and a.process_status > 4
|
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="specially ==8">
|
|
<if test="specially ==8">
|
|
|
and a.process_status > 4
|
|
and a.process_status > 4
|
|
|
- and a.buyer_id = #{uid}
|
|
|
|
|
|
|
+ <if test="uid !=null">
|
|
|
|
|
+ and a.buyer_id = #{uid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="specially ==9">
|
|
|
|
|
+ and a.process_status > 4 and bp.type=5
|
|
|
|
|
+ <if test="aid !=null">
|
|
|
|
|
+ and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="outsource != null">
|
|
<if test="outsource != null">
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|