<?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.cwgl.mapper.FundFlowMapper">
|
|
<resultMap type="com.ruoyi.cwgl.domain.FundFlow" id="FundFlowResult">
|
<result property="id" column="id" />
|
<result property="bankFlowNo" column="bank_flow_no" />
|
<result property="company" column="company" />
|
<result property="ourAccount" column="our_account" />
|
<result property="ourBankName" column="our_bank_name" />
|
<result property="incomeExpenseFlag" column="income_expense_flag" />
|
<result property="transactionAmount" column="transaction_amount" />
|
<result property="currency" column="currency" />
|
<result property="counterpartyAccount" column="counterparty_account" />
|
<result property="counterpartyName" column="counterparty_name" />
|
<result property="transactionDate" column="transaction_date" />
|
<result property="purpose" column="purpose" />
|
<result property="summary" column="summary" />
|
<result property="remarks" column="remarks" />
|
<result property="status" column="status" />
|
<result property="claimedAmount" column="claimed_amount" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="delFlag" column="del_flag" />
|
<result property="billType" column="bill_type" />
|
<result property="subAccountNo" column="sub_account_no" />
|
<result property="counterpartyBank" column="counterparty_bank" />
|
<result property="accountBalance" column="account_balance" />
|
<result property="transactionChannel" column="transaction_channel" />
|
<result property="urid" column="urid" />
|
<result property="orgNo" column="org_no" />
|
<result property="payerAcctName" column="payer_acct_name" />
|
<result property="valueDate" column="value_date" />
|
<result property="natureNames" column="nature_names" />
|
<result property="postdate" column="postdate" />
|
<result property="isReturn" column="is_return" />
|
<result property="customizedSerialNum" column="customized_serial_num" />
|
<result property="srcNoteCode" column="src_note_code" />
|
<result property="currNo" column="curr_no" />
|
</resultMap>
|
|
<sql id="selectFundFlowVo">
|
select thisTab.id, thisTab.bank_flow_no, thisTab.company, thisTab.our_account, thisTab.our_bank_name, thisTab.income_expense_flag, thisTab.transaction_amount, thisTab.currency, thisTab.counterparty_account, thisTab.counterparty_name, thisTab.transaction_date, thisTab.purpose, thisTab.summary, thisTab.remarks, thisTab.status, thisTab.claimed_amount, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.del_flag , thisTab.bill_type, thisTab.sub_account_no, thisTab.counterparty_bank, thisTab.account_balance, thisTab.transaction_channel, thisTab.urid, thisTab.org_no, thisTab.payer_acct_name, thisTab.value_date, thisTab.nature_names, thisTab.postdate, thisTab.is_return, thisTab.customized_serial_num, thisTab.src_note_code, thisTab.curr_no from fund_flow AS thisTab
|
</sql>
|
<sql id="selectFundFlowVoCount">
|
select count(0) from fund_flow as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="bankFlowNo != null and bankFlowNo != ''"> and thisTab.bank_flow_no = #{bankFlowNo}</if>
|
<if test="company != null and company != ''"> and thisTab.company = #{company}</if>
|
<if test="ourAccount != null and ourAccount != ''"> and thisTab.our_account = #{ourAccount}</if>
|
<if test="ourBankName != null and ourBankName != ''"> and thisTab.our_bank_name like concat('%', #{ourBankName}, '%')</if>
|
<if test="incomeExpenseFlag != null "> and thisTab.income_expense_flag = #{incomeExpenseFlag}</if>
|
<if test="transactionAmount != null "> and thisTab.transaction_amount = #{transactionAmount}</if>
|
<if test="currency != null and currency != ''"> and thisTab.currency = #{currency}</if>
|
<if test="counterpartyAccount != null and counterpartyAccount != ''"> and thisTab.counterparty_account = #{counterpartyAccount}</if>
|
<if test="counterpartyName != null and counterpartyName != ''"> and thisTab.counterparty_name like concat('%', #{counterpartyName}, '%')</if>
|
<if test="transactionDate != null "> and thisTab.transaction_date = #{transactionDate}</if>
|
<if test="billType != null "> and thisTab.bill_type = #{billType}</if>
|
<if test="purpose != null and purpose != ''"> and thisTab.purpose = #{purpose}</if>
|
<if test="summary != null and summary != ''"> and thisTab.summary = #{summary}</if>
|
<if test="remarks != null and remarks != ''"> and thisTab.remarks = #{remarks}</if>
|
<if test="status != null and status != ''"> and thisTab.status = #{status}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectFundFlowById" parameterType="Integer" resultMap="FundFlowResult">
|
<include refid="selectFundFlowVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectFundFlowCount" parameterType="com.ruoyi.cwgl.domain.FundFlow" resultType="int">
|
<include refid="selectFundFlowVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectFundFlowList" parameterType="com.ruoyi.cwgl.domain.FundFlow" resultMap="FundFlowResult">
|
<include refid="selectFundFlowVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertFundFlow" parameterType="com.ruoyi.cwgl.domain.FundFlow" useGeneratedKeys="true" keyProperty="id">
|
insert into fund_flow
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="bankFlowNo != null and bankFlowNo != ''">bank_flow_no,</if>
|
<if test="company != null">company,</if>
|
<if test="ourAccount != null">our_account,</if>
|
<if test="ourBankName != null">our_bank_name,</if>
|
<if test="incomeExpenseFlag != null">income_expense_flag,</if>
|
<if test="transactionAmount != null">transaction_amount,</if>
|
<if test="currency != null">currency,</if>
|
<if test="counterpartyAccount != null">counterparty_account,</if>
|
<if test="counterpartyName != null">counterparty_name,</if>
|
<if test="transactionDate != null">transaction_date,</if>
|
<if test="purpose != null">purpose,</if>
|
<if test="summary != null">summary,</if>
|
<if test="remarks != null">remarks,</if>
|
<if test="status != null">status,</if>
|
<if test="claimedAmount != null">claimed_amount,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="delFlag != null">del_flag,</if>
|
<if test="billType != null">bill_type,</if>
|
<if test="subAccountNo != null">sub_account_no,</if>
|
<if test="counterpartyBank != null">counterparty_bank,</if>
|
<if test="accountBalance != null">account_balance,</if>
|
<if test="transactionChannel != null">transaction_channel,</if>
|
<if test="urid != null">urid,</if>
|
<if test="orgNo != null">org_no,</if>
|
<if test="payerAcctName != null">payer_acct_name,</if>
|
<if test="valueDate != null">value_date,</if>
|
<if test="natureNames != null">nature_names,</if>
|
<if test="postdate != null">postdate,</if>
|
<if test="isReturn != null">is_return,</if>
|
<if test="customizedSerialNum != null">customized_serial_num,</if>
|
<if test="srcNoteCode != null">src_note_code,</if>
|
<if test="currNo != null">curr_no,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="bankFlowNo != null and bankFlowNo != ''">#{bankFlowNo},</if>
|
<if test="company != null">#{company},</if>
|
<if test="ourAccount != null">#{ourAccount},</if>
|
<if test="ourBankName != null">#{ourBankName},</if>
|
<if test="incomeExpenseFlag != null">#{incomeExpenseFlag},</if>
|
<if test="transactionAmount != null">#{transactionAmount},</if>
|
<if test="currency != null">#{currency},</if>
|
<if test="counterpartyAccount != null">#{counterpartyAccount},</if>
|
<if test="counterpartyName != null">#{counterpartyName},</if>
|
<if test="transactionDate != null">#{transactionDate},</if>
|
<if test="purpose != null">#{purpose},</if>
|
<if test="summary != null">#{summary},</if>
|
<if test="remarks != null">#{remarks},</if>
|
<if test="status != null">#{status},</if>
|
<if test="claimedAmount != null">#{claimedAmount},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
<if test="billType != null">#{billType},</if>
|
<if test="subAccountNo != null">#{subAccountNo},</if>
|
<if test="counterpartyBank != null">#{counterpartyBank},</if>
|
<if test="accountBalance != null">#{accountBalance},</if>
|
<if test="transactionChannel != null">#{transactionChannel},</if>
|
<if test="urid != null">#{urid},</if>
|
<if test="orgNo != null">#{orgNo},</if>
|
<if test="payerAcctName != null">#{payerAcctName},</if>
|
<if test="valueDate != null">#{valueDate},</if>
|
<if test="natureNames != null">#{natureNames},</if>
|
<if test="postdate != null">#{postdate},</if>
|
<if test="isReturn != null">#{isReturn},</if>
|
<if test="customizedSerialNum != null">#{customizedSerialNum},</if>
|
<if test="srcNoteCode != null">#{srcNoteCode},</if>
|
<if test="currNo != null">#{currNo},</if>
|
</trim>
|
</insert>
|
|
<insert id="insertFundFlowBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into fund_flow
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,bank_flow_no,company,our_account,our_bank_name,income_expense_flag,transaction_amount,currency,counterparty_account,counterparty_name,transaction_date,purpose,summary,remarks,status,claimed_amount,create_by,create_time,update_by,update_time,del_flag,sub_account_no,counterparty_bank,account_balance,transaction_channel,urid,org_no,payer_acct_name,value_date,nature_names,postdate,is_return,customized_serial_num,src_note_code,curr_no,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
#{item.id},#{item.bankFlowNo},#{item.company},#{item.ourAccount},#{item.ourBankName},#{item.incomeExpenseFlag},#{item.transactionAmount},#{item.currency},#{item.counterpartyAccount},#{item.counterpartyName},#{item.transactionDate},#{item.purpose},#{item.summary},#{item.remarks},#{item.status},#{item.claimedAmount},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.delFlag},#{item.subAccountNo},#{item.counterpartyBank},#{item.accountBalance},#{item.transactionChannel},#{item.urid},#{item.orgNo},#{item.payerAcctName},#{item.valueDate},#{item.natureNames},#{item.postdate},#{item.isReturn},#{item.customizedSerialNum},#{item.srcNoteCode},#{item.currNo},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateFundFlow" parameterType="com.ruoyi.cwgl.domain.FundFlow">
|
update fund_flow
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="bankFlowNo != null and bankFlowNo != ''">bank_flow_no = #{bankFlowNo},</if>
|
<if test="company != null">company = #{company},</if>
|
<if test="ourAccount != null">our_account = #{ourAccount},</if>
|
<if test="ourBankName != null">our_bank_name = #{ourBankName},</if>
|
<if test="incomeExpenseFlag != null">income_expense_flag = #{incomeExpenseFlag},</if>
|
<if test="transactionAmount != null">transaction_amount = #{transactionAmount},</if>
|
<if test="currency != null">currency = #{currency},</if>
|
<if test="counterpartyAccount != null">counterparty_account = #{counterpartyAccount},</if>
|
<if test="counterpartyName != null">counterparty_name = #{counterpartyName},</if>
|
<if test="transactionDate != null">transaction_date = #{transactionDate},</if>
|
<if test="purpose != null">purpose = #{purpose},</if>
|
<if test="summary != null">summary = #{summary},</if>
|
<if test="remarks != null">remarks = #{remarks},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="claimedAmount != null">claimed_amount = #{claimedAmount},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="billType != null">bill_type = #{billType},</if>
|
<if test="subAccountNo != null">sub_account_no = #{subAccountNo},</if>
|
<if test="counterpartyBank != null">counterparty_bank = #{counterpartyBank},</if>
|
<if test="accountBalance != null">account_balance = #{accountBalance},</if>
|
<if test="transactionChannel != null">transaction_channel = #{transactionChannel},</if>
|
<if test="urid != null">urid = #{urid},</if>
|
<if test="orgNo != null">org_no = #{orgNo},</if>
|
<if test="payerAcctName != null">payer_acct_name = #{payerAcctName},</if>
|
<if test="valueDate != null">value_date = #{valueDate},</if>
|
<if test="natureNames != null">nature_names = #{natureNames},</if>
|
<if test="postdate != null">postdate = #{postdate},</if>
|
<if test="isReturn != null">is_return = #{isReturn},</if>
|
<if test="customizedSerialNum != null">customized_serial_num = #{customizedSerialNum},</if>
|
<if test="srcNoteCode != null">src_note_code = #{srcNoteCode},</if>
|
<if test="currNo != null">curr_no = #{currNo},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateFundFlowBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update fund_flow
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.bankFlowNo != null and item.bankFlowNo != ''">bank_flow_no = #{item.bankFlowNo},</if>
|
<if test="item.company != null">company = #{item.company},</if>
|
<if test="item.ourAccount != null">our_account = #{item.ourAccount},</if>
|
<if test="item.ourBankName != null">our_bank_name = #{item.ourBankName},</if>
|
<if test="item.incomeExpenseFlag != null">income_expense_flag = #{item.incomeExpenseFlag},</if>
|
<if test="item.transactionAmount != null">transaction_amount = #{item.transactionAmount},</if>
|
<if test="item.currency != null">currency = #{item.currency},</if>
|
<if test="item.counterpartyAccount != null">counterparty_account = #{item.counterpartyAccount},</if>
|
<if test="item.counterpartyName != null">counterparty_name = #{item.counterpartyName},</if>
|
<if test="item.transactionDate != null">transaction_date = #{item.transactionDate},</if>
|
<if test="item.purpose != null">purpose = #{item.purpose},</if>
|
<if test="item.summary != null">summary = #{item.summary},</if>
|
<if test="item.remarks != null">remarks = #{item.remarks},</if>
|
<if test="item.status != null">status = #{item.status},</if>
|
<if test="item.createBy != null">create_by = #{item.createBy},</if>
|
<if test="item.createTime != null">create_time = #{item.createTime},</if>
|
<if test="item.updateBy != null">update_by = #{item.updateBy},</if>
|
<if test="item.updateTime != null">update_time = #{item.updateTime},</if>
|
<if test="item.delFlag != null">del_flag = #{item.delFlag},</if>
|
<if test="item.subAccountNo != null">sub_account_no = #{item.subAccountNo},</if>
|
<if test="item.counterpartyBank != null">counterparty_bank = #{item.counterpartyBank},</if>
|
<if test="item.accountBalance != null">account_balance = #{item.accountBalance},</if>
|
<if test="item.transactionChannel != null">transaction_channel = #{item.transactionChannel},</if>
|
<if test="item.urid != null">urid = #{item.urid},</if>
|
<if test="item.orgNo != null">org_no = #{item.orgNo},</if>
|
<if test="item.payerAcctName != null">payer_acct_name = #{item.payerAcctName},</if>
|
<if test="item.valueDate != null">value_date = #{item.valueDate},</if>
|
<if test="item.natureNames != null">nature_names = #{item.natureNames},</if>
|
<if test="item.postdate != null">postdate = #{item.postdate},</if>
|
<if test="item.isReturn != null">is_return = #{item.isReturn},</if>
|
<if test="item.customizedSerialNum != null">customized_serial_num = #{item.customizedSerialNum},</if>
|
<if test="item.srcNoteCode != null">src_note_code = #{item.srcNoteCode},</if>
|
<if test="item.currNo != null">curr_no = #{item.currNo},</if>
|
</trim>
|
where id = #{item.id}
|
</foreach>
|
</update>
|
|
<!--删除-->
|
<delete id="deleteFundFlowById" parameterType="Integer">
|
delete from fund_flow where id = #{id}
|
</delete>
|
<delete id="deleteFundFlowByIds" parameterType="Integer">
|
delete from fund_flow where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<select id="selectFundFlowByBankFlowNo" parameterType="String" resultMap="FundFlowResult">
|
<include refid="selectFundFlowVo"/>
|
where thisTab.bank_flow_no = #{bankFlowNo}
|
</select>
|
|
<select id="selectFundFlowByUrid" parameterType="String" resultMap="FundFlowResult">
|
<include refid="selectFundFlowVo"/>
|
where thisTab.urid = #{urid}
|
</select>
|
|
</mapper>
|