fix: 贷款账单,功能完善,新增时插入数据,修改明细时也进行自动转账。

This commit is contained in:
tianyongbao
2025-10-19 12:34:21 +08:00
parent f8fb4b0645
commit 8e4282f519
7 changed files with 73 additions and 5 deletions

View File

@@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="type" column="type" />
<result property="periods" column="periods" />
<result property="bankCardLendName" column="bank_card_lend_name" />
<result property="repaymentAccountId" column="repayment_account_id" />
<result property="repaymentAccountName" column="repayment_account_name" />
</resultMap>
<sql id="selectInstallmentHistoryDetailVo">
@@ -42,16 +44,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.remark,
a.type,
a.periods,
a.repayment_account_id,
CONCAT(bcl."name",
'',
right(bcl.code,
4),
'') as bank_card_lend_name
'') as bank_card_lend_name,
CONCAT(debit."name",
'',
right(debit.code,
4),
'') as repayment_account_name
from
installment_history_detail a
left join bank_card_lend bcl on
bcl.id = a.bank_card_lend_id
left join installment_history ih on ih.id=a.installment_history_id
left join bank_card_lend debit on
debit.id = a.repayment_account_id
</sql>
<select id="selectInstallmentHistoryDetailList" parameterType="InstallmentHistoryDetailDto" resultMap="InstallmentHistoryDetailResult">
@@ -108,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if>
<if test="type != null">type,</if>
<if test="periods != null">periods,</if>
<if test="repaymentAccountId != null">repayment_account_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -126,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">#{remark},</if>
<if test="type != null">#{type},</if>
<if test="periods != null">#{periods},</if>
<if test="repaymentAccountId != null">#{repaymentAccountId},</if>
</trim>
</insert>
@@ -147,6 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark = #{remark},</if>
<if test="type != null">type = #{type},</if>
<if test="periods != null">periods = #{periods},</if>
<if test="repaymentAccountId != null">repayment_account_id = #{repaymentAccountId},</if>
</trim>
where id = #{id}
</update>