|
|
@@ -586,24 +586,28 @@
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByorderNo" resultType="com.goafanti.order.bo.NewOrderChangeBo">
|
|
|
- select a.id,a.order_no orderNo,a.process_state processState,a.status,a.`type`,date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes, a.remarks,
|
|
|
-a.voucher_url voucherUrl,a.total_amount totalAmount,a.settlement_amount settlementAmount,a.change_amount changeAmount,a.applicant,a.dep_name depName,
|
|
|
-a.project_state projectState,a.zxs_cost zxsCost, a.zxs_remarks zxsRemarks,date_format(a.payment_time,'%Y-%m-%d')paymentTimes,
|
|
|
-a.payment_amount paymentAmount,date_format(a. invoice_time,'%Y-%m-%d') invoiceTimes,a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
|
|
|
-a.cw_cost cwCost,a.refundable_amount refundableAmount,a.cw_remarks cwRemarks
|
|
|
-from new_order_change a where 1=1
|
|
|
+select
|
|
|
+ a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,
|
|
|
+ date_format(a.create_time, '%Y-%m-%d %H:%i:%S')createTimes, a.remarks, a.voucher_url voucherUrl,a.cw_cost cwCost,
|
|
|
+ a.total_amount totalAmount, a.settlement_amount settlementAmount, (a.total_amount-a.settlement_amount) arrears,
|
|
|
+ a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
|
|
|
+ a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
|
|
|
+ date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
|
|
|
+ a.cw_remarks cwRemarks from new_order_change a where 1 = 1
|
|
|
and a.order_no= #{orderNo}
|
|
|
order by a.create_time desc
|
|
|
limit 1
|
|
|
</select>
|
|
|
|
|
|
<select id="selectById" resultType="com.goafanti.order.bo.NewOrderChangeBo">
|
|
|
- select a.id,a.order_no orderNo,a.process_state processState,a.status,a.`type`,date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes, a.remarks,
|
|
|
-a.voucher_url voucherUrl,a.total_amount totalAmount,a.settlement_amount settlementAmount,a.change_amount changeAmount,a.applicant,a.dep_name depName,
|
|
|
-a.project_state projectState,a.zxs_cost zxsCost, a.zxs_remarks zxsRemarks,date_format(a.payment_time,'%Y-%m-%d')paymentTimes,
|
|
|
-a.payment_amount paymentAmount,date_format(a. invoice_time,'%Y-%m-%d') invoiceTimes,a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
|
|
|
-a.cw_cost cwCost,a.refundable_amount refundableAmount,a.cw_remarks cwRemarks
|
|
|
-from new_order_change a where 1=1 and a.id= #{id}
|
|
|
+ select
|
|
|
+ a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,
|
|
|
+ date_format(a.create_time, '%Y-%m-%d %H:%i:%S')createTimes, a.remarks, a.voucher_url voucherUrl,a.cw_cost cwCost,
|
|
|
+ a.total_amount totalAmount, a.settlement_amount settlementAmount, (a.total_amount-a.settlement_amount) arrears,
|
|
|
+ a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
|
|
|
+ a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
|
|
|
+ date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
|
|
|
+ a.cw_remarks cwRemarks from new_order_change a where 1 = 1 and a.id= #{id}
|
|
|
</select>
|
|
|
<select id="checkOderNo" resultType="java.lang.Integer">
|
|
|
select count(*) from new_order_change
|