|
|
@@ -1060,6 +1060,7 @@
|
|
|
where a.delete_sign = 0
|
|
|
<if test="specially == 0">
|
|
|
and a.order_status not in(3,5,6) and a.approval !=3
|
|
|
+ and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status =1 and a.order_status=1
|
|
|
@@ -1073,16 +1074,15 @@
|
|
|
<if test="specially == 4">
|
|
|
and a.process_status in (4,5,6)
|
|
|
</if>
|
|
|
+ <if test="specially == 4">
|
|
|
+ and c.department_id=(select department_id from admin where id= #{aid,jdbcType=VARCHAR})
|
|
|
+ </if>
|
|
|
<if test="distribution == 1">
|
|
|
and a.process_status = 5
|
|
|
</if>
|
|
|
<if test="distribution == 2">
|
|
|
and a.process_status = 6
|
|
|
</if>
|
|
|
-
|
|
|
- <if test="aid != null">
|
|
|
- and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null">
|
|
|
and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
@@ -1102,7 +1102,6 @@
|
|
|
select
|
|
|
count(*)
|
|
|
from t_order_new a left join `user` b on a.buyer_id=b.id
|
|
|
- from t_order_new a left join `user` b on a.buyer_id=b.id
|
|
|
left join admin c on a.salesman_id=c.id
|
|
|
left join admin d on a.finance_id=d.id
|
|
|
<if test="specially == 2">
|
|
|
@@ -1116,6 +1115,7 @@
|
|
|
where a.delete_sign = 0
|
|
|
<if test="specially == 0">
|
|
|
and a.order_status not in(3,5,6) and a.approval !=3
|
|
|
+ and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status =1 and a.order_status=1
|
|
|
@@ -1129,16 +1129,15 @@
|
|
|
<if test="specially == 4">
|
|
|
and a.process_status in (4,5,6)
|
|
|
</if>
|
|
|
+ <if test="specially == 4">
|
|
|
+ and c.department_id=(select department_id from admin where id= #{aid,jdbcType=VARCHAR})
|
|
|
+ </if>
|
|
|
<if test="distribution == 1">
|
|
|
and a.process_status = 5
|
|
|
</if>
|
|
|
<if test="distribution == 2">
|
|
|
and a.process_status = 6
|
|
|
</if>
|
|
|
-
|
|
|
- <if test="aid != null">
|
|
|
- and a.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null">
|
|
|
and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
@@ -1268,4 +1267,4 @@
|
|
|
left join t_order_new b on a.order_no=b.order_no
|
|
|
where a.id= #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|