|
@@ -1425,8 +1425,8 @@
|
|
|
select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
|
|
select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
|
|
|
a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
|
|
a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
|
|
|
e.approval,l.refund_status outsourceStatus,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
|
|
e.approval,l.refund_status outsourceStatus,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
|
|
|
-ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType,ttm.cost_amount costAmount,ttm.party_amount partyAmount,
|
|
|
|
|
-a.commodity_price commodityPrice
|
|
|
|
|
|
|
+ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType,ifnull(ttm.cost_amount,0) costAmount,
|
|
|
|
|
+ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice
|
|
|
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
|
|
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_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
|
|
left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress
|
|
@@ -1487,8 +1487,8 @@ a.commodity_price commodityPrice
|
|
|
<if test="adminName != null">
|
|
<if test="adminName != null">
|
|
|
and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="startSignTime != null and endSignTime != null">
|
|
|
|
|
- and e.sign_time between #{startSignTime} and #{endSignTime}
|
|
|
|
|
|
|
+ <if test="startTime != null and endTime != null">
|
|
|
|
|
+ and e.sign_time between #{startTime} and #{endTime}
|
|
|
</if>
|
|
</if>
|
|
|
order by a.task_distribution_time desc
|
|
order by a.task_distribution_time desc
|
|
|
<if test="page_sql!=null">
|
|
<if test="page_sql!=null">
|
|
@@ -1554,8 +1554,8 @@ a.commodity_price commodityPrice
|
|
|
<if test="adminName != null">
|
|
<if test="adminName != null">
|
|
|
and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="startSignTime != null and endSignTime != null">
|
|
|
|
|
- and e.sign_time between #{startSignTime} and #{endSignTime}
|
|
|
|
|
|
|
+ <if test="startTime != null and endTime != null">
|
|
|
|
|
+ and e.sign_time between #{startTime} and #{endTime}
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
|
|
<select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
|
|
@@ -1585,11 +1585,12 @@ select
|
|
|
a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
|
|
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,
|
|
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,
|
|
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
|
|
|
|
|
|
|
+ a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,ifnull(ttm.cost_amount,0) costAmount,ifnull(ttm.party_amount,0) partyAmount
|
|
|
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
|
|
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 department dep on e.order_dep=dep.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 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)
|
|
|
|
|
|
|
+ left join t_order_mid tm on a.order_no=tm.order_no left join t_task_mid ttm on a.id=ttm.tid
|
|
|
|
|
+ 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">
|
|
<if test="shiroType == 1 and aid !=null">
|
|
|
and tm.finance_id= #{aid,jdbcType=VARCHAR}
|
|
and tm.finance_id= #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|