优化财务单据

This commit is contained in:
季圣华
2021-07-01 00:53:46 +08:00
parent c5b7a44740
commit 16b5194842
8 changed files with 196 additions and 173 deletions

View File

@@ -8,6 +8,7 @@
<result column="hands_person_id" jdbcType="BIGINT" property="handsPersonId" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
<result column="discount_money" jdbcType="DECIMAL" property="discountMoney" />
<result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
<result column="account_id" jdbcType="BIGINT" property="accountId" />
<result column="bill_no" jdbcType="VARCHAR" property="billNo" />
@@ -76,8 +77,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, type, organ_id, hands_person_id, creator, change_amount, total_price, account_id,
bill_no, bill_time, remark, file_name, tenant_id, delete_flag
id, type, organ_id, hands_person_id, creator, change_amount, discount_money, total_price,
account_id, bill_no, bill_time, remark, file_name, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="BaseResultMap">
select
@@ -112,14 +113,16 @@
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountHead">
insert into jsh_account_head (id, type, organ_id,
hands_person_id, creator, change_amount,
total_price, account_id, bill_no,
bill_time, remark, file_name,
tenant_id, delete_flag)
discount_money, total_price, account_id,
bill_no, bill_time, remark,
file_name, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{totalPrice,jdbcType=DECIMAL}, #{accountId,jdbcType=BIGINT}, #{billNo,jdbcType=VARCHAR},
#{billTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
#{discountMoney,jdbcType=DECIMAL}, #{totalPrice,jdbcType=DECIMAL}, #{accountId,jdbcType=BIGINT},
#{billNo,jdbcType=VARCHAR}, #{billTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{fileName,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
insert into jsh_account_head
@@ -142,6 +145,9 @@
<if test="changeAmount != null">
change_amount,
</if>
<if test="discountMoney != null">
discount_money,
</if>
<if test="totalPrice != null">
total_price,
</if>
@@ -186,6 +192,9 @@
<if test="changeAmount != null">
#{changeAmount,jdbcType=DECIMAL},
</if>
<if test="discountMoney != null">
#{discountMoney,jdbcType=DECIMAL},
</if>
<if test="totalPrice != null">
#{totalPrice,jdbcType=DECIMAL},
</if>
@@ -239,6 +248,9 @@
<if test="record.changeAmount != null">
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
</if>
<if test="record.discountMoney != null">
discount_money = #{record.discountMoney,jdbcType=DECIMAL},
</if>
<if test="record.totalPrice != null">
total_price = #{record.totalPrice,jdbcType=DECIMAL},
</if>
@@ -276,6 +288,7 @@
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
discount_money = #{record.discountMoney,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
account_id = #{record.accountId,jdbcType=BIGINT},
bill_no = #{record.billNo,jdbcType=VARCHAR},
@@ -306,6 +319,9 @@
<if test="changeAmount != null">
change_amount = #{changeAmount,jdbcType=DECIMAL},
</if>
<if test="discountMoney != null">
discount_money = #{discountMoney,jdbcType=DECIMAL},
</if>
<if test="totalPrice != null">
total_price = #{totalPrice,jdbcType=DECIMAL},
</if>
@@ -340,6 +356,7 @@
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
change_amount = #{changeAmount,jdbcType=DECIMAL},
discount_money = #{discountMoney,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
account_id = #{accountId,jdbcType=BIGINT},
bill_no = #{billNo,jdbcType=VARCHAR},