zhangback
2025-11-15 73a4a892517ac3f60334b0c4132bf619726b4854
tms/src/main/resources/mapper/tms/TmsQuoteDetailMapper.xml
@@ -1,7 +1,7 @@
<?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">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.tms.mapper.TmsQuoteDetailMapper">
    <resultMap type="com.ruoyi.tms.domain.TmsQuoteDetail" id="TmsQuoteDetailResult">
@@ -69,7 +69,20 @@
            <include refid="whereCondition"/>
        </where>
    </select>
    <select id="countSameCustomerRouteVehicle" parameterType="com.ruoyi.tms.domain.TmsQuoteDetail" resultType="int">
        SELECT COUNT(0)
        FROM tms_quote_plan AS p
                 INNER JOIN tms_quote_detail AS d
                            ON p.id = d.quote_plan_id
                                AND d.transport_route = #{transportRoute}
                                AND d.vehicle_type = #{vehicleType}
        WHERE p.id &lt;&gt; #{quotePlanId}
          AND p.customer_id = #{customerId}
        <if test="id != '' and id != null">
            d.id &lt;&gt; #{id}
        </if>
    </select>
    <select id="selectTmsQuoteDetailList" parameterType="com.ruoyi.tms.domain.TmsQuoteDetail" resultMap="TmsQuoteDetailResult">
        <include refid="selectTmsQuoteDetailVo"/>
        <where>
@@ -104,7 +117,7 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
            <if test="quotePlanId != null">#{quotePlanId},</if>
@@ -128,7 +141,7 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
         </trim>
        </trim>
    </insert>
    <insert id="insertTmsQuoteDetailBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
@@ -200,7 +213,7 @@
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
            </trim>
        where id = #{item.id}
            where id = #{item.id}
        </foreach>
    </update>