|
|
@@ -1086,15 +1086,15 @@
|
|
|
|
|
|
|
|
|
<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,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,
|
|
|
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
|
|
|
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_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 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)
|
|
|
+ on a.id=l.tid where e.delete_sign in (0,1,2) and e.order_status in (2,4)
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
<if test="role == 0 ">
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
@@ -1106,10 +1106,10 @@ ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.s
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="specially == 0 ">
|
|
|
- and a.split_status !=1
|
|
|
+ and a.split_status in (0,2)
|
|
|
</if>
|
|
|
<if test="specially == 1 ">
|
|
|
- and a.split_status !=2
|
|
|
+ and a.split_status in (0,1)
|
|
|
</if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
@@ -1148,7 +1148,7 @@ ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.s
|
|
|
and a.task_status= #{taskStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="adminName != null">
|
|
|
- and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
+ and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
order by a.task_distribution_time desc
|
|
|
<if test="page_sql!=null">
|
|
|
@@ -1157,8 +1157,8 @@ ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.s
|
|
|
</select>
|
|
|
|
|
|
<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)
|
|
|
+ select count(*) from t_order_task a 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 in (0,1,2) and e.order_status in (2,4)
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
<if test="role == 0 ">
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
@@ -1170,10 +1170,10 @@ ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.s
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="specially == 0 ">
|
|
|
- and a.split_status !=1
|
|
|
+ and a.split_status in (0,2)
|
|
|
</if>
|
|
|
<if test="specially == 1 ">
|
|
|
- and a.split_status !=2
|
|
|
+ and a.split_status in (0,1)
|
|
|
</if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
@@ -1212,7 +1212,7 @@ ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.s
|
|
|
and a.task_status= #{taskStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="adminName != null">
|
|
|
- and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
+ and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
|