<?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.TmsPayableFeeMapper">
|
|
<resultMap type="com.ruoyi.tms.domain.TmsPayableFee" id="TmsPayableFeeResult">
|
<result property="id" column="id" />
|
<result property="systemNo" column="system_no" />
|
<result property="billPayableId" column="bill_payable_id" />
|
<result property="billPayableNo" column="bill_payable_no" />
|
<result property="dispatchId" column="dispatch_id" />
|
<result property="dispatchNo" column="dispatch_no" />
|
<result property="serviceProviderId" column="service_provider_id" />
|
<result property="serviceProviderName" column="service_provider_name" />
|
<result property="serviceProviderType" column="service_provider_type" />
|
<result property="projectId" column="project_id" />
|
<result property="projectName" column="project_name" />
|
<result property="payableRmbAmount" column="payable_rmb_amount" />
|
<result property="payableHkbAmount" column="payable_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="selectTmsPayableFeeVo">
|
select thisTab.id, thisTab.system_no, thisTab.bill_payable_id, thisTab.bill_payable_no, thisTab.dispatch_id, thisTab.dispatch_no, thisTab.service_provider_id, thisTab.service_provider_name, thisTab.service_provider_type, thisTab.project_id, thisTab.project_name, thisTab.payable_rmb_amount, thisTab.payable_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_payable_fee AS thisTab
|
</sql>
|
<sql id="selectTmsPayableFeeVoCount">
|
select count(0) from tms_payable_fee as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="systemNo != null and systemNo != ''"> and thisTab.system_no = #{systemNo}</if>
|
<if test="billPayableId != null "> and thisTab.bill_payable_id = #{billPayableId}</if>
|
<if test="billPayableNo != null and billPayableNo != ''"> and thisTab.bill_payable_no = #{billPayableNo}</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="serviceProviderId != null "> and thisTab.service_provider_id = #{serviceProviderId}</if>
|
<if test="serviceProviderName != null and serviceProviderName != ''"> and thisTab.service_provider_name like concat('%', #{serviceProviderName}, '%')</if>
|
<if test="serviceProviderType != null and serviceProviderType != ''"> and thisTab.service_provider_type = #{serviceProviderType}</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="payableRmbAmount != null "> and thisTab.payable_rmb_amount = #{payableRmbAmount}</if>
|
<if test="payableHkbAmount != null "> and thisTab.payable_hkb_amount = #{payableHkbAmount}</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="selectTmsPayableFeeById" parameterType="Integer" resultMap="TmsPayableFeeResult">
|
<include refid="selectTmsPayableFeeVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectTmsPayableFeeCount" parameterType="com.ruoyi.tms.domain.TmsPayableFee" resultType="int">
|
<include refid="selectTmsPayableFeeVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectTmsPayableFeeList" parameterType="com.ruoyi.tms.domain.TmsPayableFee" resultMap="TmsPayableFeeResult">
|
<include refid="selectTmsPayableFeeVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertTmsPayableFee" parameterType="com.ruoyi.tms.domain.TmsPayableFee" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_payable_fee
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">system_no,</if>
|
<if test="billPayableId != null">bill_payable_id,</if>
|
<if test="billPayableNo != null">bill_payable_no,</if>
|
<if test="dispatchId != null">dispatch_id,</if>
|
<if test="dispatchNo != null">dispatch_no,</if>
|
<if test="serviceProviderId != null">service_provider_id,</if>
|
<if test="serviceProviderName != null">service_provider_name,</if>
|
<if test="serviceProviderType != null">service_provider_type,</if>
|
<if test="projectId != null">project_id,</if>
|
<if test="projectName != null">project_name,</if>
|
<if test="payableRmbAmount != null">payable_rmb_amount,</if>
|
<if test="payableHkbAmount != null">payable_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="billPayableId != null">#{billPayableId},</if>
|
<if test="billPayableNo != null">#{billPayableNo},</if>
|
<if test="dispatchId != null">#{dispatchId},</if>
|
<if test="dispatchNo != null">#{dispatchNo},</if>
|
<if test="serviceProviderId != null">#{serviceProviderId},</if>
|
<if test="serviceProviderName != null">#{serviceProviderName},</if>
|
<if test="serviceProviderType != null">#{serviceProviderType},</if>
|
<if test="projectId != null">#{projectId},</if>
|
<if test="projectName != null">#{projectName},</if>
|
<if test="payableRmbAmount != null">#{payableRmbAmount},</if>
|
<if test="payableHkbAmount != null">#{payableHkbAmount},</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="insertTmsPayableFeeBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_payable_fee
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,system_no,bill_payable_id,bill_payable_no,dispatch_id,dispatch_no,service_provider_id,service_provider_name,service_provider_type,project_id,project_name,payable_rmb_amount,payable_hkb_amount,dispatch_confirm_time,cost_generate_time,status,create_time,create_by,update_by,update_time,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.systemNo},#{item.billPayableId},#{item.billPayableNo},#{item.dispatchId},#{item.dispatchNo},#{item.serviceProviderId},#{item.serviceProviderName},#{item.serviceProviderType},#{item.projectId},#{item.projectName},#{item.payableRmbAmount},#{item.payableHkbAmount},#{item.dispatchConfirmTime},#{item.costGenerateTime},#{item.status},#{item.createTime},#{item.createBy},#{item.updateBy},#{item.updateTime},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateTmsPayableFee" parameterType="com.ruoyi.tms.domain.TmsPayableFee">
|
update tms_payable_fee
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="systemNo != null and systemNo != ''">system_no = #{systemNo},</if>
|
<if test="billPayableId != null">bill_payable_id = #{billPayableId},</if>
|
<if test="billPayableNo != null">bill_payable_no = #{billPayableNo},</if>
|
<if test="dispatchId != null">dispatch_id = #{dispatchId},</if>
|
<if test="dispatchNo != null">dispatch_no = #{dispatchNo},</if>
|
<if test="serviceProviderId != null">service_provider_id = #{serviceProviderId},</if>
|
<if test="serviceProviderName != null">service_provider_name = #{serviceProviderName},</if>
|
<if test="serviceProviderType != null">service_provider_type = #{serviceProviderType},</if>
|
<if test="projectId != null">project_id = #{projectId},</if>
|
<if test="projectName != null">project_name = #{projectName},</if>
|
<if test="payableRmbAmount != null">payable_rmb_amount = #{payableRmbAmount},</if>
|
<if test="payableHkbAmount != null">payable_hkb_amount = #{payableHkbAmount},</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="updateTmsPayableFeeBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update tms_payable_fee
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.systemNo != null and item.systemNo != ''">system_no = #{item.systemNo},</if>
|
<if test="item.billPayableId != null">bill_payable_id = #{item.billPayableId},</if>
|
<if test="item.billPayableNo != null">bill_payable_no = #{item.billPayableNo},</if>
|
<if test="item.dispatchId != null">dispatch_id = #{item.dispatchId},</if>
|
<if test="item.dispatchNo != null">dispatch_no = #{item.dispatchNo},</if>
|
<if test="item.serviceProviderId != null">service_provider_id = #{item.serviceProviderId},</if>
|
<if test="item.serviceProviderName != null">service_provider_name = #{item.serviceProviderName},</if>
|
<if test="item.serviceProviderType != null">service_provider_type = #{item.serviceProviderType},</if>
|
<if test="item.projectId != null">project_id = #{item.projectId},</if>
|
<if test="item.projectName != null">project_name = #{item.projectName},</if>
|
<if test="item.payableRmbAmount != null">payable_rmb_amount = #{item.payableRmbAmount},</if>
|
<if test="item.payableHkbAmount != null">payable_hkb_amount = #{item.payableHkbAmount},</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="deleteTmsPayableFeeById" parameterType="Integer">
|
delete from tms_payable_fee where id = #{id}
|
</delete>
|
<delete id="deleteTmsPayableFeeByIds" parameterType="Integer">
|
delete from tms_payable_fee where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|