| | |
| | | <?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"> |
| | |
| | | <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 <> #{quotePlanId} |
| | | AND p.customer_id = #{customerId} |
| | | <if test="id != '' and id != null"> |
| | | d.id <> #{id} |
| | | </if> |
| | | </select> |
| | | <select id="selectTmsQuoteDetailList" parameterType="com.ruoyi.tms.domain.TmsQuoteDetail" resultMap="TmsQuoteDetailResult"> |
| | | <include refid="selectTmsQuoteDetailVo"/> |
| | | <where> |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | <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> |
| | | |