|
|
@@ -1223,14 +1223,14 @@ select
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTaskHoursListByPage" 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,dep.name as depName,a.project_status projectStatus,
|
|
|
+ select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name as receiverName,dep.name as depName,a.project_status projectStatus,
|
|
|
a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
|
|
|
e.contract_no as contractNo,date_format(e.create_time,'%Y-%m-%d %H:%i:%S')as creteTime,date_format(e.sign_time,'%Y-%m-%d')as signTime,a.outsource,
|
|
|
date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S')taskDistributionTime, date_format(a.task_end_time,'%Y-%m-%d')taskEndTime,tm.salesman_name salesmanName,
|
|
|
a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId
|
|
|
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 admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id
|
|
|
- left join user f on e.buyer_id=f.id left join (select task_id,sum(hours) as hours from t_task_hours group by task_id) g on a.id=g.task_id
|
|
|
+ left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id
|
|
|
+ left join user f on e.buyer_id=f.id left join (select tid,sum(hours)hours from task_hours_count group by tid) g on a.id=g.tid
|
|
|
left join t_order_mid tm on a.order_no=tm.order_no where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
|
|
|
<if test="shiroType == 1 and aid !=null">
|
|
|
and tm.finance_id= #{aid,jdbcType=VARCHAR}
|
|
|
@@ -1269,9 +1269,9 @@ select
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTaskHoursListCount" 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 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 t_order_mid tm on a.order_no=tm.order_no where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
|
|
|
+ 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 t_order_mid tm on a.order_no=tm.order_no
|
|
|
+ where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
|
|
|
<if test="shiroType == 1 and aid !=null">
|
|
|
and tm.finance_id= #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|