<?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.tms.mapper.TmsArSettlementMapper">
|
|
<resultMap type="com.ruoyi.tms.domain.TmsArSettlement" id="TmsArSettlementResult">
|
<result property="id" column="id" />
|
<result property="systemNo" column="system_no" />
|
<result property="billId" column="bill_id" />
|
<result property="settleAmount" column="settle_amount" />
|
<result property="remark" column="remark" />
|
<result property="attachment" column="attachment" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectTmsArSettlementVo">
|
select thisTab.id, thisTab.system_no, thisTab.bill_id, thisTab.settle_amount, thisTab.remark, thisTab.attachment, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time from tms_ar_settlement AS thisTab
|
</sql>
|
<sql id="selectTmsArSettlementVoCount">
|
select count(0) from tms_ar_settlement as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="systemNo != null and systemNo != ''"> and thisTab.system_no = #{systemNo}</if>
|
<if test="billId != null "> and thisTab.bill_id = #{billId}</if>
|
<if test="settleAmount != null "> and thisTab.settle_amount = #{settleAmount}</if>
|
<if test="attachment != null and attachment != ''"> and thisTab.attachment = #{attachment}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectTmsArSettlementById" parameterType="Integer" resultMap="TmsArSettlementResult">
|
<include refid="selectTmsArSettlementVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectTmsArSettlementCount" parameterType="com.ruoyi.tms.domain.TmsArSettlement" resultType="int">
|
<include refid="selectTmsArSettlementVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectTmsArSettlementList" parameterType="com.ruoyi.tms.domain.TmsArSettlement" resultMap="TmsArSettlementResult">
|
<include refid="selectTmsArSettlementVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertTmsArSettlement" parameterType="com.ruoyi.tms.domain.TmsArSettlement" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_ar_settlement
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">system_no,</if>
|
<if test="billId != null">bill_id,</if>
|
<if test="settleAmount != null">settle_amount,</if>
|
<if test="remark != null">remark,</if>
|
<if test="attachment != null">attachment,</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>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">#{systemNo},</if>
|
<if test="billId != null">#{billId},</if>
|
<if test="settleAmount != null">#{settleAmount},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="attachment != null">#{attachment},</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>
|
</trim>
|
</insert>
|
|
<insert id="insertTmsArSettlementBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_ar_settlement
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,system_no,bill_id,settle_amount,remark,attachment,create_by,create_time,update_by,update_time,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.systemNo},#{item.billId},#{item.settleAmount},#{item.remark},#{item.attachment},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateTmsArSettlement" parameterType="com.ruoyi.tms.domain.TmsArSettlement">
|
update tms_ar_settlement
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">system_no = #{systemNo},</if>
|
<if test="billId != null">bill_id = #{billId},</if>
|
<if test="settleAmount != null">settle_amount = #{settleAmount},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="attachment != null">attachment = #{attachment},</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>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateTmsArSettlementBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update tms_ar_settlement
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.systemNo != null and item.systemNo != ''">system_no = #{item.systemNo},</if>
|
<if test="item.billId != null">bill_id = #{item.billId},</if>
|
<if test="item.settleAmount != null">settle_amount = #{item.settleAmount},</if>
|
<if test="item.remark != null">remark = #{item.remark},</if>
|
<if test="item.attachment != null">attachment = #{item.attachment},</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>
|
</trim>
|
where id = #{item.id}
|
</foreach>
|
</update>
|
|
<!--删除-->
|
<delete id="deleteTmsArSettlementById" parameterType="Integer">
|
delete from tms_ar_settlement where id = #{id}
|
</delete>
|
<delete id="deleteTmsArSettlementByIds" parameterType="Integer">
|
delete from tms_ar_settlement where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|