|
|
@@ -891,7 +891,7 @@
|
|
|
,liquidation_status,o.finance_id as financeId,contract_no as contractNo,d.name as departmentName,e.name as outsourceName
|
|
|
from t_order_new o left join `user` u on o.buyer_id = u.id left join admin a on o.salesman_id = a.id
|
|
|
left join department d on o.order_dep=d.id left join (select order_no,max(name)as name from outsource_organization group by order_no) e
|
|
|
- on o.order_no=e.order_no where delete_sign = 0
|
|
|
+ on o.order_no=e.order_no left join t_order_outsource f on f.order_no=o.order_no where delete_sign = 0
|
|
|
and approval in (0,2)
|
|
|
<if test="o.outsource != null">
|
|
|
and o.outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
@@ -936,7 +936,7 @@
|
|
|
</select>
|
|
|
<select id="getAllUnassignedCountOrder" parameterType="Map" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id left join admin a on o.salesman_id = a.id
|
|
|
- where delete_sign = 0 and approval in (0,2)
|
|
|
+ left join t_order_outsource f on f.order_no=o.order_no where delete_sign = 0 and approval in (0,2)
|
|
|
<if test="o.outsource != null">
|
|
|
and o.outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
</if>
|