|
|
@@ -869,10 +869,10 @@
|
|
|
and e.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
- and e.approval = 1
|
|
|
+ and e.approval in(1,2)
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
- and e.approval > 1
|
|
|
+ and e.approval in (4,5)
|
|
|
</if>
|
|
|
<if test="cid != null">
|
|
|
and c.id = #{cid}
|
|
|
@@ -895,9 +895,6 @@
|
|
|
<if test="name != null">
|
|
|
and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
- <if test="orderNo != null">
|
|
|
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="taskId != null">
|
|
|
and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
|
|
|
</if>
|
|
|
@@ -917,9 +914,18 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectOrderTaskListCount" resultType="java.lang.Integer">
|
|
|
- select count(*) from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
|
|
|
- left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id left join admin g on e.salesman_id=g.id
|
|
|
- left join t_order_outsource l on a.id=l.tid left join department h on g.department_id=h.id
|
|
|
+ select count(*) from t_order_task a
|
|
|
+ left join t_order_new e on a.order_no=e.order_no
|
|
|
+ <if test="cid != null">
|
|
|
+ left join business_project b on a.commodity_id=b.id
|
|
|
+ left join business_category c on b.cid=c.id
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ left join user f on e.buyer_id=f.id
|
|
|
+ </if>
|
|
|
+ <if test="outsourceStatus !=null">
|
|
|
+ left join t_order_outsource l on a.id=l.tid
|
|
|
+ </if>
|
|
|
where e.delete_sign in (0,2,3) and e.order_status in (2,4)
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
<if test="role == 0 ">
|
|
|
@@ -941,10 +947,10 @@
|
|
|
and e.approval = 0
|
|
|
</if>
|
|
|
<if test="approval ==1">
|
|
|
- and e.approval = 1
|
|
|
+ and e.approval in(1,2)
|
|
|
</if>
|
|
|
<if test="approval ==2">
|
|
|
- and e.approval > 1
|
|
|
+ and e.approval in (4,5)
|
|
|
</if>
|
|
|
<if test="cid != null">
|
|
|
and c.id = #{cid}
|
|
|
@@ -967,9 +973,6 @@
|
|
|
<if test="name != null">
|
|
|
and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
- <if test="orderNo != null">
|
|
|
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="taskId != null">
|
|
|
and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
|
|
|
</if>
|