|
|
@@ -1026,7 +1026,7 @@
|
|
|
|
|
|
|
|
|
<select id="selectOrderTaskListByPage" 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,a.project_status as projectStatus,e.contract_no contractNo,
|
|
|
+ select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as 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,e.approval,l.refund_status outsourceStatus,
|
|
|
ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, j.name as outsourceName ,ifnull(k.hours,0) hours,a.split_status splitStatus
|
|
|
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
|
|
|
@@ -1034,9 +1034,14 @@
|
|
|
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 (select order_no,max(name)as name from outsource_organization group by order_no) j
|
|
|
on a.order_no=j.order_no left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
|
|
|
- on a.id=l.tid where e.delete_sign !=1 and e.order_status not in (5,7) and a.split_status !=2 and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
- <if test="specially == 0 or specially == 1">
|
|
|
+ on a.id=l.tid where e.delete_sign !=1 and e.order_status not in (5,7)
|
|
|
+ and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
+ <if test="specially == 0 ">
|
|
|
+ and a.split_status !=1
|
|
|
+ </if>
|
|
|
+ <if test="specially == 1 ">
|
|
|
+ and a.split_status !=2
|
|
|
</if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
@@ -1086,10 +1091,13 @@
|
|
|
<select id="selectOrderTaskListCount" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_task a 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 admin g on e.salesman_id=g.id left join department h on g.department_id=h.id where e.delete_sign !=1 and e.order_status not in (5,7)
|
|
|
- and a.split_status !=2
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
- <if test="specially == 0 or specially == 1">
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
+ <if test="specially == 0 ">
|
|
|
+ and a.split_status !=1
|
|
|
+ </if>
|
|
|
+ <if test="specially == 1 ">
|
|
|
+ and a.split_status !=2
|
|
|
</if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
@@ -1353,7 +1361,7 @@ from t_order_task a left join business_project b on a.commodity_id=b.id left joi
|
|
|
</select>
|
|
|
|
|
|
<select id="splitProjectList" 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,a.project_status as projectStatus,e.contract_no contractNo,
|
|
|
+ select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as 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,e.approval,l.refund_status outsourceStatus,
|
|
|
ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, j.name as outsourceName ,ifnull(k.hours,0) hours,a.split_status splitStatus,
|
|
|
a.split_super splitSuper,date_format(a.split_time,'%Y-%m-%d %H:%i:%S') splitTimes,ad.name splitAname
|