|
|
@@ -654,7 +654,8 @@ select
|
|
|
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}
|
|
|
+ a.cw_remarks cwRemarks,a.estimate_cost estimateCost,estimate_refundable estimateRefundable,refund_Invoice refundInvoice
|
|
|
+ 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
|
|
|
@@ -726,7 +727,7 @@ select
|
|
|
and (a.process_state > 5 and a.process_state < 9) or (a.process_state =9 and a.status=4)
|
|
|
</if>
|
|
|
<if test="complete ==2 and processState == 7">
|
|
|
- and ((a.process_state = 7 and (a.status = 4 or a.status = 2)or a.process_state > 7)
|
|
|
+ and ((a.process_state = 7 and (a.status = 4 or a.status = 2))or a.process_state > 7)
|
|
|
</if>
|
|
|
<if test="complete ==2 and processState == 8">
|
|
|
and a.process_state = 8 and (a.status = 4 or a.status = 2)
|
|
|
@@ -800,7 +801,7 @@ select
|
|
|
and (a.process_state > 5 and a.process_state < 9) or (a.process_state =9 and a.status=4)
|
|
|
</if>
|
|
|
<if test="complete ==2 and processState == 7">
|
|
|
- and ((a.process_state = 7 and (a.status = 4 or a.status = 2)or a.process_state > 7)
|
|
|
+ and ((a.process_state = 7 and (a.status = 4 or a.status = 2))or a.process_state > 7)
|
|
|
</if>
|
|
|
<if test="complete ==2 and processState == 8">
|
|
|
and a.process_state = 8 and (a.status = 4 or a.status = 2)
|
|
|
@@ -808,12 +809,12 @@ select
|
|
|
</select>
|
|
|
<update id="addRefundInvoice" >
|
|
|
update new_order_change
|
|
|
- set `refund_Invoice`=`refund_Invoice`+ #{amount}
|
|
|
+ set `refund_Invoice`=ifnull(`refund_Invoice`,0)+ #{amount}
|
|
|
where order_no= #{orderNo}
|
|
|
</update>
|
|
|
<update id="subtractRefundInvoice">
|
|
|
update new_order_change
|
|
|
- set `refund_Invoice`=`refund_Invoice`- #{amount}
|
|
|
+ set `refund_Invoice`=ifnull(`refund_Invoice`,0)- #{amount}
|
|
|
where order_no= #{orderNo}
|
|
|
</update>
|
|
|
</mapper>
|