<?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.TmsReceivableFeeMapper">
|
|
<resultMap type="com.ruoyi.tms.domain.TmsReceivableFee" id="TmsReceivableFeeResult">
|
<result property="id" column="id" />
|
<result property="systemNo" column="system_no" />
|
<result property="billRelationId" column="bill_relation_id" />
|
<result property="billRelationNo" column="bill_relation_no" />
|
<result property="dispatchId" column="dispatch_id" />
|
<result property="dispatchNo" column="dispatch_no" />
|
<result property="customerId" column="customer_id" />
|
<result property="customerName" column="customer_name" />
|
<result property="projectId" column="project_id" />
|
<result property="projectName" column="project_name" />
|
<result property="receivableRMBAmount" column="receivable_rmb_amount" />
|
<result property="receivableHKBAmount" column="receivable_hkb_amount" />
|
<result property="dispatchConfirmTime" column="dispatch_confirm_time" />
|
<result property="costGenerateTime" column="cost_generate_time" />
|
<result property="status" column="status" />
|
<result property="createTime" column="create_time" />
|
<result property="createBy" column="create_by" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectTmsReceivableFeeVo">
|
select thisTab.id, thisTab.system_no, thisTab.bill_relation_id, thisTab.bill_relation_no, thisTab.dispatch_id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.project_id, thisTab.project_name, thisTab.receivable_rmb_amount,thisTab.receivable_hkb_amount, thisTab.dispatch_confirm_time, thisTab.cost_generate_time, thisTab.status, thisTab.create_time, thisTab.create_by, thisTab.update_by, thisTab.update_time from tms_receivable_fee AS thisTab
|
</sql>
|
<sql id="selectTmsReceivableFeeVoCount">
|
select count(0) from tms_receivable_fee as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="systemNo != null and systemNo != ''"> and thisTab.system_no = #{systemNo}</if>
|
<if test="billRelationId != null "> and thisTab.bill_relation_id = #{billRelationId}</if>
|
<if test="billRelationNo != null and billRelationNo != ''"> and thisTab.bill_relation_no = #{billRelationNo}</if>
|
<if test="dispatchId != null "> and thisTab.dispatch_id = #{dispatchId}</if>
|
<if test="dispatchNo != null and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if>
|
<if test="customerId != null "> and thisTab.customer_id = #{customerId}</if>
|
<if test="customerName != null and customerName != ''"> and thisTab.customer_name like concat('%', #{customerName}, '%')</if>
|
<if test="projectId != null "> and thisTab.project_id = #{projectId}</if>
|
<if test="projectName != null and projectName != ''"> and thisTab.project_name like concat('%', #{projectName}, '%')</if>
|
<if test="receivableRMBAmount != null "> and thisTab.receivable_rmb_amount = #{receivableRMBAmount}</if>
|
<if test="receivableHKBAmount != null "> and thisTab.receivable_hkb_amount = #{receivableHKBAmount}</if>
|
<if test="dispatchConfirmTime != null "> and thisTab.dispatch_confirm_time = #{dispatchConfirmTime}</if>
|
<if test="costGenerateTime != null "> and thisTab.cost_generate_time = #{costGenerateTime}</if>
|
<if test="status != null "> and thisTab.status = #{status}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectTmsReceivableFeeById" parameterType="Integer" resultMap="TmsReceivableFeeResult">
|
<include refid="selectTmsReceivableFeeVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectTmsReceivableFeeCount" parameterType="com.ruoyi.tms.domain.TmsReceivableFee" resultType="int">
|
<include refid="selectTmsReceivableFeeVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectTmsReceivableFeeList" parameterType="com.ruoyi.tms.domain.TmsReceivableFee" resultMap="TmsReceivableFeeResult">
|
<include refid="selectTmsReceivableFeeVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertTmsReceivableFee" parameterType="com.ruoyi.tms.domain.TmsReceivableFee" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_receivable_fee
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">system_no,</if>
|
<if test="billRelationId != null">bill_relation_id,</if>
|
<if test="billRelationNo != null">bill_relation_no,</if>
|
<if test="dispatchId != null">dispatch_id,</if>
|
<if test="dispatchNo != null">dispatch_no,</if>
|
<if test="customerId != null">customer_id,</if>
|
<if test="customerName != null">customer_name,</if>
|
<if test="projectId != null">project_id,</if>
|
<if test="projectName != null">project_name,</if>
|
<if test="receivableRMBAmount != null">receivable_rmb_amount,</if>
|
<if test="receivableHKBAmount != null">receivable_hkb_amount,</if>
|
<if test="dispatchConfirmTime != null">dispatch_confirm_time,</if>
|
<if test="costGenerateTime != null">cost_generate_time,</if>
|
<if test="status != null">status,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="createBy != null">create_by,</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="billRelationId != null">#{billRelationId},</if>
|
<if test="billRelationNo != null">#{billRelationNo},</if>
|
<if test="dispatchId != null">#{dispatchId},</if>
|
<if test="dispatchNo != null">#{dispatchNo},</if>
|
<if test="customerId != null">#{customerId},</if>
|
<if test="customerName != null">#{customerName},</if>
|
<if test="projectId != null">#{projectId},</if>
|
<if test="projectName != null">#{projectName},</if>
|
<if test="receivableRMBAmount != null">#{receivableRMBAmount},</if>
|
<if test="receivableHKBAmount != null">#{receivableHKBAmount},</if>
|
<if test="dispatchConfirmTime != null">#{dispatchConfirmTime},</if>
|
<if test="costGenerateTime != null">#{costGenerateTime},</if>
|
<if test="status != null">#{status},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
</trim>
|
</insert>
|
|
<insert id="insertTmsReceivableFeeBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_receivable_fee
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
system_no,bill_relation_id,bill_relation_no,dispatch_id,dispatch_no,customer_id,customer_name,project_id,project_name,receivable_rmb_amount,receivable_hkb_amount,dispatch_confirm_time,cost_generate_time,status,create_by,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.systemNo},#{item.billRelationId},#{item.billRelationNo},#{item.dispatchId},#{item.dispatchNo},#{item.customerId},#{item.customerName},#{item.projectId},#{item.projectName},#{item.receivableRMBAmount},#{item.receivableHKBAmount},#{item.dispatchConfirmTime},#{item.costGenerateTime},#{item.status},#{item.createBy},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateTmsReceivableFee" parameterType="com.ruoyi.tms.domain.TmsReceivableFee">
|
update tms_receivable_fee
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">system_no = #{systemNo},</if>
|
<if test="billRelationId != null">bill_relation_id = #{billRelationId},</if>
|
<if test="billRelationNo != null">bill_relation_no = #{billRelationNo},</if>
|
<if test="dispatchId != null">dispatch_id = #{dispatchId},</if>
|
<if test="dispatchNo != null">dispatch_no = #{dispatchNo},</if>
|
<if test="customerId != null">customer_id = #{customerId},</if>
|
<if test="customerName != null">customer_name = #{customerName},</if>
|
<if test="projectId != null">project_id = #{projectId},</if>
|
<if test="projectName != null">project_name = #{projectName},</if>
|
<if test="receivableRMBAmount != null">receivable_rmb_amount = #{receivableRMBAmount},</if>
|
<if test="receivableHKBAmount != null">receivable_hkb_amount = #{receivableHKBAmount},</if>
|
<if test="dispatchConfirmTime != null">dispatch_confirm_time = #{dispatchConfirmTime},</if>
|
<if test="costGenerateTime != null">cost_generate_time = #{costGenerateTime},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateTmsReceivableFeeBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update tms_receivable_fee
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.systemNo != null and item.systemNo != ''">system_no = #{item.systemNo},</if>
|
<if test="item.billRelationId != null">bill_relation_id = #{item.billRelationId},</if>
|
<if test="item.billRelationNo != null">bill_relation_no = #{item.billRelationNo},</if>
|
<if test="item.dispatchId != null">dispatch_id = #{item.dispatchId},</if>
|
<if test="item.dispatchNo != null">dispatch_no = #{item.dispatchNo},</if>
|
<if test="item.customerId != null">customer_id = #{item.customerId},</if>
|
<if test="item.customerName != null">customer_name = #{item.customerName},</if>
|
<if test="item.projectId != null">project_id = #{item.projectId},</if>
|
<if test="item.projectName != null">project_name = #{item.projectName},</if>
|
<if test="item.receivableRMBAmount != null">receivable_rmb_amount = #{item.receivableRMBAmount},</if>
|
<if test="item.receivableHKBAmount != null">receivable_hkb_amount = #{item.receivableHKBAmount},</if>
|
<if test="item.dispatchConfirmTime != null">dispatch_confirm_time = #{item.dispatchConfirmTime},</if>
|
<if test="item.costGenerateTime != null">cost_generate_time = #{item.costGenerateTime},</if>
|
<if test="item.status != null">status = #{item.status},</if>
|
<if test="item.createTime != null">create_time = #{item.createTime},</if>
|
<if test="item.createBy != null">create_by = #{item.createBy},</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="deleteTmsReceivableFeeById" parameterType="Integer">
|
delete from tms_receivable_fee where id = #{id}
|
</delete>
|
<delete id="deleteTmsReceivableFeeByIds" parameterType="Integer">
|
delete from tms_receivable_fee where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|