|
|
@@ -891,8 +891,11 @@
|
|
|
,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 and order_status = 2
|
|
|
- and approval in (0,2) and outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
+ on o.order_no=e.order_no where delete_sign = 0
|
|
|
+ and approval in (0,2)
|
|
|
+ <if test="o.outsource != null">
|
|
|
+ and outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
and process_status >= 2
|
|
|
<if test="o.processStatus == 2">
|
|
|
and (o.finance_id is null or o.finance_id='')
|
|
|
@@ -930,7 +933,10 @@
|
|
|
</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 order_status = 2 and approval in (0,2) and outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
+ where delete_sign = 0 and approval in (0,2)
|
|
|
+ <if test="o.outsource != null">
|
|
|
+ and outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
and process_status >= 2
|
|
|
<if test="o.processStatus == 2">
|
|
|
and (o.finance_id is null or o.finance_id='')
|