|
|
@@ -640,13 +640,20 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="financeOrderInvoiceList" resultType="com.goafanti.order.bo.TOrderInvoiceBo">
|
|
|
- select a.id,a.unit_name as unitName,a.order_no as orderNo,c.name,b.project_status as projectStatus,a.amount,
|
|
|
- ifnull(d.sumAmount,0) as sumAmount, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')as createTime ,a.status,b.process_status processStatus,
|
|
|
- b.settlement_amount as settlementAmount, (b.total_amount-b.settlement_amount) as notAmount from t_order_invoice a
|
|
|
- left join t_order_new b on a.order_no=b.order_no left join admin c on b.salesman_id=c.id
|
|
|
- left join (select order_no,sum(amount)as sumAmount from t_order_invoice where status =2 group by order_no) d
|
|
|
- on a.order_no=d.order_no left join department e on b.order_dep=e.id
|
|
|
- where a.status in (1,2) and a.approval in (0,2)
|
|
|
+ select a.id,a.unit_name as unitName,a.order_no as orderNo,c.name,b.project_status as projectStatus,a.amount,a.approval,
|
|
|
+ ifnull(d.sumAmount,0) as sumAmount, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')as createTime ,a.status,b.process_status processStatus,
|
|
|
+ b.settlement_amount as settlementAmount, (b.total_amount-b.settlement_amount) as notAmount from t_order_invoice a
|
|
|
+ left join t_order_new b on a.order_no=b.order_no left join admin c on b.salesman_id=c.id
|
|
|
+ left join (select order_no,sum(amount)as sumAmount from t_order_invoice where status =2 group by order_no) d
|
|
|
+ on a.order_no=d.order_no left join department e on b.order_dep=e.id
|
|
|
+ where b.delete_sign in (0,2)
|
|
|
+ <if test="all ==0">
|
|
|
+ and a.status in (1,2)
|
|
|
+ and a.approval in (0,2)
|
|
|
+ </if>
|
|
|
+ <if test="all ==1">
|
|
|
+ and a.status in (1,2,3)
|
|
|
+ </if>
|
|
|
<if test="type !=null">
|
|
|
and a.`type`= #{type,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -685,7 +692,14 @@
|
|
|
left join t_order_new b on a.order_no=b.order_no
|
|
|
left join admin c on b.salesman_id=c.id
|
|
|
left join department e on b.order_dep=e.id
|
|
|
- where a.status in (1,2) and a.approval in (0,2)
|
|
|
+ where b.delete_sign in (0,2)
|
|
|
+ <if test="all ==0">
|
|
|
+ and a.status in (1,2)
|
|
|
+ and a.approval in (0,2)
|
|
|
+ </if>
|
|
|
+ <if test="all ==1">
|
|
|
+ and a.status in (1,2,3)
|
|
|
+ </if>
|
|
|
<if test="type !=null">
|
|
|
and a.`type`= #{type,jdbcType=INTEGER}
|
|
|
</if>
|