|
|
@@ -997,10 +997,11 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
|
|
|
- select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
|
|
|
+ select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
|
|
|
a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
|
|
|
a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName,ifnull(i.alreadyNumber,0)as alreadyNumber
|
|
|
- from t_task_log x left join t_order_task a on x.task_id=a.id
|
|
|
+ from (select task_id from t_task_log a where task_receiver='e36eba1b-3b1a-4297-9c03-17952205d84e ' UNION select task_id from t_task_log a
|
|
|
+ where task_allocator='e36eba1b-3b1a-4297-9c03-17952205d84e') x left join t_order_task a on x.task_id=a.id
|
|
|
left join business_project b on a.commodity_id=b.id
|
|
|
left join business_category c on b.cid=c.id
|
|
|
left join admin d on a.task_receiver=d.id
|
|
|
@@ -1009,7 +1010,6 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
|
|
|
left join department h on e.order_dep=h.id
|
|
|
left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
|
|
|
where e.delete_sign=0
|
|
|
- and (x.task_receiver= #{aid,jdbcType=VARCHAR} or x.task_allocator= #{aid,jdbcType=VARCHAR})
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -1039,12 +1039,16 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
|
|
|
|
|
|
<select id="selectTaskListCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
- from t_task_log x left join t_order_task a on x.task_id=a.id
|
|
|
+ from (select task_id from t_task_log a where task_receiver='e36eba1b-3b1a-4297-9c03-17952205d84e ' UNION select task_id from t_task_log a
|
|
|
+ where task_allocator='e36eba1b-3b1a-4297-9c03-17952205d84e') x left join t_order_task a on x.task_id=a.id
|
|
|
+ left join business_project b on a.commodity_id=b.id
|
|
|
+ left join business_category c on b.cid=c.id
|
|
|
left join admin d on a.task_receiver=d.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 department h on e.order_dep=h.id
|
|
|
+ left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
|
|
|
where e.delete_sign=0
|
|
|
- and (x.task_receiver= #{aid,jdbcType=VARCHAR} or x.task_allocator= #{aid,jdbcType=VARCHAR})
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|