67 lines
3.4 KiB
XML
67 lines
3.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.sip.mapper.OmsPayablePaymentDetailMapper">
|
|
|
|
<resultMap type="OmsPayablePaymentDetail" id="OmsPayablePaymentDetailResult">
|
|
<result property="id" column="id" />
|
|
<result property="paymentPlanId" column="payment_plan_id" />
|
|
<result property="payableBillId" column="payable_bill_id" />
|
|
<result property="paymentStatus" column="payment_status" />
|
|
<result property="paymentTime" column="payment_time" />
|
|
<result property="paymentAmount" column="payment_amount" />
|
|
<result property="paymentRate" column="payment_rate" />
|
|
<result property="paymentBillCode" column="payment_bill_code" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<insert id="insertOmsPayablePaymentDetail" parameterType="OmsPayablePaymentDetail" useGeneratedKeys="true" keyProperty="id">
|
|
insert into oms_payable_payment_detail (
|
|
<if test="paymentPlanId != null">payment_plan_id,</if>
|
|
<if test="payableBillId != null">payable_bill_id,</if>
|
|
<if test="paymentStatus != null">payment_status,</if>
|
|
<if test="paymentTime != null">payment_time,</if>
|
|
<if test="paymentAmount != null">payment_amount,</if>
|
|
<if test="paymentRate != null">payment_rate,</if>
|
|
<if test="paymentBillCode != null and paymentBillCode != ''">payment_bill_code,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
create_by,
|
|
create_time
|
|
) values (
|
|
<if test="paymentPlanId != null">#{paymentPlanId},</if>
|
|
<if test="payableBillId != null">#{payableBillId},</if>
|
|
<if test="paymentStatus != null">#{paymentStatus},</if>
|
|
<if test="paymentTime != null">#{paymentTime},</if>
|
|
<if test="paymentAmount != null">#{paymentAmount},</if>
|
|
<if test="paymentRate != null">#{paymentRate},</if>
|
|
<if test="paymentBillCode != null and paymentBillCode != ''">#{paymentBillCode},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
#{createBy},
|
|
sysdate()
|
|
)
|
|
</insert>
|
|
<select id="list" resultType="com.ruoyi.sip.domain.OmsPayablePaymentDetail">
|
|
|
|
SELECT
|
|
t1.*,t2.payment_bill_code,t2.actual_payment_time,t2.payment_status,t2.refund_proof_attachment_id,t2.receipt_attachment_id
|
|
FROM
|
|
oms_payable_payment_detail t1
|
|
LEFT JOIN oms_payment_bill t2 ON t1.payment_bill_code = t2.payment_bill_code
|
|
<where>
|
|
<if test="payableBillId != null">
|
|
and t1.payable_bill_id = #{payableBillId}
|
|
</if>
|
|
<if test="payableBillIdList != null and payableBillIdList.size>0">
|
|
and t1.payable_bill_id in
|
|
<foreach item="item" collection="payableBillIdList" separator="," open="(" close=")" index="">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper> |