|
|
@@ -1323,13 +1323,14 @@
|
|
|
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,
|
|
|
- a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId
|
|
|
+ a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,ttm.contract_term contractTerm,ttm.service_year serviceYear
|
|
|
from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
|
|
|
where task_allocator=#{aid ,jdbcType=VARCHAR}) 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
|
|
|
+ left join t_task_member ttm on a.id=ttm.tid
|
|
|
where e.delete_sign in(0,2,3)
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|