优化收款单
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<result column="header_id" jdbcType="BIGINT" property="headerId" />
|
||||
<result column="account_id" jdbcType="BIGINT" property="accountId" />
|
||||
<result column="in_out_item_id" jdbcType="BIGINT" property="inOutItemId" />
|
||||
<result column="bill_id" jdbcType="BIGINT" property="billId" />
|
||||
<result column="each_amount" jdbcType="DECIMAL" property="eachAmount" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
@@ -70,7 +71,8 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, header_id, account_id, in_out_item_id, each_amount, remark, tenant_id, delete_flag
|
||||
id, header_id, account_id, in_out_item_id, bill_id, each_amount, remark, tenant_id,
|
||||
delete_flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -104,11 +106,13 @@
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountItem">
|
||||
insert into jsh_account_item (id, header_id, account_id,
|
||||
in_out_item_id, each_amount, remark,
|
||||
tenant_id, delete_flag)
|
||||
in_out_item_id, bill_id, each_amount,
|
||||
remark, tenant_id, delete_flag
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT},
|
||||
#{inOutItemId,jdbcType=BIGINT}, #{eachAmount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
#{inOutItemId,jdbcType=BIGINT}, #{billId,jdbcType=BIGINT}, #{eachAmount,jdbcType=DECIMAL},
|
||||
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
|
||||
insert into jsh_account_item
|
||||
@@ -125,6 +129,9 @@
|
||||
<if test="inOutItemId != null">
|
||||
in_out_item_id,
|
||||
</if>
|
||||
<if test="billId != null">
|
||||
bill_id,
|
||||
</if>
|
||||
<if test="eachAmount != null">
|
||||
each_amount,
|
||||
</if>
|
||||
@@ -151,6 +158,9 @@
|
||||
<if test="inOutItemId != null">
|
||||
#{inOutItemId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="billId != null">
|
||||
#{billId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="eachAmount != null">
|
||||
#{eachAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
@@ -186,6 +196,9 @@
|
||||
<if test="record.inOutItemId != null">
|
||||
in_out_item_id = #{record.inOutItemId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.billId != null">
|
||||
bill_id = #{record.billId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.eachAmount != null">
|
||||
each_amount = #{record.eachAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
@@ -209,6 +222,7 @@
|
||||
header_id = #{record.headerId,jdbcType=BIGINT},
|
||||
account_id = #{record.accountId,jdbcType=BIGINT},
|
||||
in_out_item_id = #{record.inOutItemId,jdbcType=BIGINT},
|
||||
bill_id = #{record.billId,jdbcType=BIGINT},
|
||||
each_amount = #{record.eachAmount,jdbcType=DECIMAL},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
@@ -229,6 +243,9 @@
|
||||
<if test="inOutItemId != null">
|
||||
in_out_item_id = #{inOutItemId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="billId != null">
|
||||
bill_id = #{billId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="eachAmount != null">
|
||||
each_amount = #{eachAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
@@ -249,6 +266,7 @@
|
||||
set header_id = #{headerId,jdbcType=BIGINT},
|
||||
account_id = #{accountId,jdbcType=BIGINT},
|
||||
in_out_item_id = #{inOutItemId,jdbcType=BIGINT},
|
||||
bill_id = #{billId,jdbcType=BIGINT},
|
||||
each_amount = #{eachAmount,jdbcType=DECIMAL},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.AccountItemVo4List">
|
||||
<result column="AccountName" jdbcType="VARCHAR" property="accountName" />
|
||||
<result column="InOutItemName" jdbcType="VARCHAR" property="inOutItemName" />
|
||||
<result column="billNumber" jdbcType="VARCHAR" property="billNumber" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByConditionAccountItem" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap">
|
||||
@@ -47,9 +48,10 @@
|
||||
</select>
|
||||
|
||||
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="ResultWithInfoExMap">
|
||||
select ai.*,a.Name AccountName,ioi.Name InOutItemName
|
||||
select ai.*,a.Name AccountName,ioi.Name InOutItemName, dh.number billNumber
|
||||
from jsh_account_item ai left join jsh_account a on ai.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
left join jsh_in_out_item ioi on ai.in_out_item_id = ioi.id and ifnull(ioi.delete_Flag,'0') !='1'
|
||||
left join jsh_depot_head dh on ai.bill_id = dh.id and ifnull(dh.delete_Flag,'0') !='1'
|
||||
where ai.header_id = #{headerId}
|
||||
and ifnull(ai.delete_flag,'0') !='1'
|
||||
order by ai.id asc
|
||||
|
||||
Reference in New Issue
Block a user