<?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.FundFlowClaimDetailMapper">
|
|
<resultMap type="com.ruoyi.cwgl.domain.FundFlowClaimDetail" id="FundFlowClaimDetailResult">
|
<result property="id" column="id" />
|
<result property="fundFlowId" column="fund_flow_id" />
|
<result property="billNo" column="bill_no" />
|
<result property="relatedCompanyType" column="related_company_type" />
|
<result property="relatedCompanyName" column="related_company_name" />
|
<result property="billAmount" column="bill_amount" />
|
<result property="billPendingAmount" column="bill_pending_amount" />
|
<result property="claimAmount" column="claim_amount" />
|
<result property="claimDate" column="claim_date" />
|
<result property="remarks" column="remarks" />
|
<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" />
|
</resultMap>
|
|
<sql id="selectFundFlowClaimDetailVo">
|
select thisTab.id, thisTab.fund_flow_id, thisTab.bill_no, thisTab.related_company_type, thisTab.related_company_name, thisTab.bill_amount, thisTab.bill_pending_amount, thisTab.claim_amount, thisTab.claim_date, thisTab.remarks, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.del_flag from fund_flow_claim_detail AS thisTab
|
</sql>
|
<sql id="selectFundFlowClaimDetailVoCount">
|
select count(0) from fund_flow_claim_detail as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="fundFlowId != null "> and thisTab.fund_flow_id = #{fundFlowId}</if>
|
<if test="billNo != null and billNo != ''"> and thisTab.bill_no = #{billNo}</if>
|
<if test="relatedCompanyType != null and relatedCompanyType != ''"> and thisTab.related_company_type = #{relatedCompanyType}</if>
|
<if test="relatedCompanyName != null and relatedCompanyName != ''"> and thisTab.related_company_name like concat('%', #{relatedCompanyName}, '%')</if>
|
<if test="billAmount != null "> and thisTab.bill_amount = #{billAmount}</if>
|
<if test="billPendingAmount != null "> and thisTab.bill_pending_amount = #{billPendingAmount}</if>
|
<if test="claimAmount != null "> and thisTab.claim_amount = #{claimAmount}</if>
|
<if test="claimDate != null "> and thisTab.claim_date = #{claimDate}</if>
|
<if test="remarks != null and remarks != ''"> and thisTab.remarks = #{remarks}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectFundFlowClaimDetailById" parameterType="Integer" resultMap="FundFlowClaimDetailResult">
|
<include refid="selectFundFlowClaimDetailVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectFundFlowClaimDetailCount" parameterType="com.ruoyi.cwgl.domain.FundFlowClaimDetail" resultType="int">
|
<include refid="selectFundFlowClaimDetailVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectFundFlowClaimDetailList" parameterType="com.ruoyi.cwgl.domain.FundFlowClaimDetail" resultMap="FundFlowClaimDetailResult">
|
<include refid="selectFundFlowClaimDetailVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertFundFlowClaimDetail" parameterType="com.ruoyi.cwgl.domain.FundFlowClaimDetail" useGeneratedKeys="true" keyProperty="id">
|
insert into fund_flow_claim_detail
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="fundFlowId != null">fund_flow_id,</if>
|
<if test="billNo != null and billNo != ''">bill_no,</if>
|
<if test="relatedCompanyType != null">related_company_type,</if>
|
<if test="relatedCompanyName != null">related_company_name,</if>
|
<if test="billAmount != null">bill_amount,</if>
|
<if test="billPendingAmount != null">bill_pending_amount,</if>
|
<if test="claimAmount != null">claim_amount,</if>
|
<if test="claimDate != null">claim_date,</if>
|
<if test="remarks != null">remarks,</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>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="fundFlowId != null">#{fundFlowId},</if>
|
<if test="billNo != null and billNo != ''">#{billNo},</if>
|
<if test="relatedCompanyType != null">#{relatedCompanyType},</if>
|
<if test="relatedCompanyName != null">#{relatedCompanyName},</if>
|
<if test="billAmount != null">#{billAmount},</if>
|
<if test="billPendingAmount != null">#{billPendingAmount},</if>
|
<if test="claimAmount != null">#{claimAmount},</if>
|
<if test="claimDate != null">#{claimDate},</if>
|
<if test="remarks != null">#{remarks},</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>
|
</trim>
|
</insert>
|
|
<insert id="insertFundFlowClaimDetailBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into fund_flow_claim_detail
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,fund_flow_id,bill_no,related_company_type,related_company_name,bill_amount,bill_pending_amount,claim_amount,claim_date,remarks,create_by,create_time,update_by,update_time,del_flag,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.fundFlowId},#{item.billNo},#{item.relatedCompanyType},#{item.relatedCompanyName},#{item.billAmount},#{item.billPendingAmount},#{item.claimAmount},#{item.claimDate},#{item.remarks},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.delFlag},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateFundFlowClaimDetail" parameterType="com.ruoyi.cwgl.domain.FundFlowClaimDetail">
|
update fund_flow_claim_detail
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="fundFlowId != null">fund_flow_id = #{fundFlowId},</if>
|
<if test="billNo != null and billNo != ''">bill_no = #{billNo},</if>
|
<if test="relatedCompanyType != null">related_company_type = #{relatedCompanyType},</if>
|
<if test="relatedCompanyName != null">related_company_name = #{relatedCompanyName},</if>
|
<if test="billAmount != null">bill_amount = #{billAmount},</if>
|
<if test="billPendingAmount != null">bill_pending_amount = #{billPendingAmount},</if>
|
<if test="claimAmount != null">claim_amount = #{claimAmount},</if>
|
<if test="claimDate != null">claim_date = #{claimDate},</if>
|
<if test="remarks != null">remarks = #{remarks},</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>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateFundFlowClaimDetailBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update fund_flow_claim_detail
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.fundFlowId != null">fund_flow_id = #{item.fundFlowId},</if>
|
<if test="item.billNo != null and item.billNo != ''">bill_no = #{item.billNo},</if>
|
<if test="item.relatedCompanyType != null">related_company_type = #{item.relatedCompanyType},</if>
|
<if test="item.relatedCompanyName != null">related_company_name = #{item.relatedCompanyName},</if>
|
<if test="item.billAmount != null">bill_amount = #{item.billAmount},</if>
|
<if test="item.billPendingAmount != null">bill_pending_amount = #{item.billPendingAmount},</if>
|
<if test="item.claimAmount != null">claim_amount = #{item.claimAmount},</if>
|
<if test="item.claimDate != null">claim_date = #{item.claimDate},</if>
|
<if test="item.remarks != null">remarks = #{item.remarks},</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>
|
</trim>
|
where id = #{item.id}
|
</foreach>
|
</update>
|
|
<!--删除-->
|
<delete id="deleteFundFlowClaimDetailById" parameterType="Integer">
|
delete from fund_flow_claim_detail where id = #{id}
|
</delete>
|
<delete id="deleteFundFlowClaimDetailByIds" parameterType="Integer">
|
delete from fund_flow_claim_detail where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|