|
|
@@ -662,14 +662,16 @@
|
|
|
|
|
|
|
|
|
<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,
|
|
|
+ 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
|
|
|
+ a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName
|
|
|
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 admin g on e.salesman_id=g.id
|
|
|
+ left join department h on g.department_id=h.id
|
|
|
where e.delete_sign=0 and e.order_status not in (5,7)
|
|
|
<if test="specially == 0">
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
@@ -685,6 +687,9 @@
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and g.department_id= #{depId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="name != null">
|
|
|
and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
@@ -711,6 +716,8 @@
|
|
|
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=0 and e.order_status not in (5,7)
|
|
|
<if test="specially == 0">
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
@@ -726,6 +733,9 @@
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and g.department_id= #{depId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="name != null">
|
|
|
and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
@@ -812,13 +822,15 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
|
|
|
<select id="selectTaskListByPage" 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,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
|
|
|
+ a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName
|
|
|
from t_task_log 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 admin g on e.salesman_id=g.id
|
|
|
+ left join department h on g.department_id=h.id
|
|
|
where e.delete_sign=0
|
|
|
and x.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
<if test="orderNo != null">
|
|
|
@@ -830,6 +842,9 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and g.department_id= #{depId ,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="taskId != null">
|
|
|
and a.id= #{taskId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -858,6 +873,9 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
|
|
|
<if test="name != null">
|
|
|
and a.commodity_name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and g.department_id= #{depId ,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|