|
|
@@ -35,6 +35,7 @@
|
|
|
<result column="back_status" jdbcType="INTEGER" property="backStatus" />
|
|
|
<result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
|
|
|
<result column="contract_picture_url" jdbcType="VARCHAR" property="contractPictureUrl" />
|
|
|
+ <result column="first_amount" jdbcType="DECIMAL" property="firstAmount" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, order_no, process_state, `status`, `type`, create_time, remarks, voucher_url,
|
|
|
@@ -42,7 +43,7 @@
|
|
|
zxs_cost, zxs_remarks, payment_time, payment_amount, invoice_time, invoice_amount,
|
|
|
invoice_type, cw_cost, refundable_amount, cw_remarks, estimate_cost, estimate_refundable,
|
|
|
refund_Invoice, used_order, refund_status, refund_url, back_status, attachment_url,
|
|
|
- contract_picture_url
|
|
|
+ contract_picture_url, first_amount
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -65,7 +66,8 @@
|
|
|
refundable_amount, cw_remarks, estimate_cost,
|
|
|
estimate_refundable, refund_Invoice, used_order,
|
|
|
refund_status, refund_url, back_status,
|
|
|
- attachment_url, contract_picture_url)
|
|
|
+ attachment_url, contract_picture_url, first_amount
|
|
|
+ )
|
|
|
values (#{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
|
|
|
#{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
|
|
|
#{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
|
|
|
@@ -76,7 +78,8 @@
|
|
|
#{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, #{estimateCost,jdbcType=DECIMAL},
|
|
|
#{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, #{usedOrder,jdbcType=VARCHAR},
|
|
|
#{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
|
|
|
- #{attachmentUrl,jdbcType=VARCHAR}, #{contractPictureUrl,jdbcType=VARCHAR})
|
|
|
+ #{attachmentUrl,jdbcType=VARCHAR}, #{contractPictureUrl,jdbcType=VARCHAR}, #{firstAmount,jdbcType=DECIMAL}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
|
|
|
insert into new_order_change
|
|
|
@@ -177,6 +180,9 @@
|
|
|
<if test="contractPictureUrl != null">
|
|
|
contract_picture_url,
|
|
|
</if>
|
|
|
+ <if test="firstAmount != null">
|
|
|
+ first_amount,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="orderNo != null">
|
|
|
@@ -275,6 +281,9 @@
|
|
|
<if test="contractPictureUrl != null">
|
|
|
#{contractPictureUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="firstAmount != null">
|
|
|
+ #{firstAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.NewOrderChange">
|
|
|
@@ -376,6 +385,9 @@
|
|
|
<if test="contractPictureUrl != null">
|
|
|
contract_picture_url = #{contractPictureUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="firstAmount != null">
|
|
|
+ first_amount = #{firstAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -412,7 +424,8 @@
|
|
|
refund_url = #{refundUrl,jdbcType=VARCHAR},
|
|
|
back_status = #{backStatus,jdbcType=INTEGER},
|
|
|
attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
- contract_picture_url = #{contractPictureUrl,jdbcType=VARCHAR}
|
|
|
+ contract_picture_url = #{contractPictureUrl,jdbcType=VARCHAR},
|
|
|
+ first_amount = #{firstAmount,jdbcType=DECIMAL}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByorderNo" resultType="com.goafanti.order.bo.NewOrderChangeBo">
|
|
|
@@ -423,7 +436,7 @@ 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,a.contract_picture_url contractPictureUrl
|
|
|
+ a.cw_remarks cwRemarks,a.contract_picture_url contractPictureUrl,a.first_amount firstAmount
|
|
|
from new_order_change a where 1 = 1
|
|
|
and a.order_no= #{orderNo}
|
|
|
order by a.create_time desc limit 1
|
|
|
@@ -436,7 +449,7 @@ 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,a.back_status backStatus ,a.contract_picture_url contractPictureUrl
|
|
|
+ a.cw_remarks cwRemarks,a.back_status backStatus ,a.contract_picture_url contractPictureUrl,a.first_amount firstAmount
|
|
|
from new_order_change a where 1 = 1 and status!=4
|
|
|
and a.id= #{ChangeId}
|
|
|
order by a.create_time desc
|
|
|
@@ -448,7 +461,7 @@ select
|
|
|
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,
|
|
|
+ a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,a.first_amount firstAmount,
|
|
|
date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
|
|
|
a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status in (0,1,2,3)
|
|
|
and a.order_no= #{orderNo}
|
|
|
@@ -460,7 +473,7 @@ select
|
|
|
a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,a.refund_url refundUrl,
|
|
|
date_format(a.create_time, '%Y-%m-%d %H:%i:%S')createTimes, a.remarks, a.voucher_url voucherUrl,a.cw_cost cwCost,a.refund_status refundStatus,
|
|
|
a.total_amount totalAmount, a.settlement_amount settlementAmount, (a.total_amount-a.settlement_amount) arrears,a.attachment_url attachmentUrl,
|
|
|
- a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
|
|
|
+ a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,a.first_amount firstAmount,
|
|
|
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,a.estimate_cost estimateCost,estimate_refundable estimateRefundable,refund_Invoice refundInvoice,a.contract_picture_url contractPictureUrl
|