|
|
@@ -806,6 +806,18 @@
|
|
|
left join t_order_new b on a.order_no=b.order_no
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getInvoiceDetails" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TOrderInvoiceDetails">
|
|
|
+ select a.id ,a.order_no as orderNo,a.`type`,a.status,a.reject_reason as rejectReason,a.remarks,a.invoice_type as invoiceType,
|
|
|
+ a.unit_name as unitName,a.tax_number as taxNumber,a.amount,a.banks,a.content,a.unit_address as unitAddress,
|
|
|
+ a.invoice_remarks as invoiceRemarks,a.unit_mobile as unitMobile,a.voucher_url as voucherUrl ,a.post,a.addressee,
|
|
|
+ a.addressee_area as addresseeArea,a.addressee_city as addresseeCity,a.addressee_province as addresseeProvince,
|
|
|
+ a.addressee_mobile as addresseeMobile,a.recipient_address as recipientAddress,a.create_time,a.update_time,a.approval,
|
|
|
+ a.already_amount as alreadyAmount,b.contract_no as contractNo from t_order_invoice a
|
|
|
+ left join t_order_new b on a.order_no=b.order_no
|
|
|
+ where a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
+ and a.create_time=(select max(create_time) from t_order_invoice where order_no= #{orderNo,jdbcType=VARCHAR})
|
|
|
+ </select>
|
|
|
<select id="conutAmountByOrderNo" resultType="java.math.BigDecimal">
|
|
|
select ifnull(sum(a.amount),0) amount from t_order_invoice a
|
|
|
where a.status=2 and a.order_no= #{orderNo,jdbcType=VARCHAR}
|