|  | @@ -1,31 +1,48 @@
 | 
	
		
			
				|  |  |  <?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.shipping.mapper.TCtnpriceMapper">
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      <resultMap type="TCtnprice" id="TCtnpriceResult">
 | 
	
		
			
				|  |  | -        <result property="fId"    column="f_id"    />
 | 
	
		
			
				|  |  | -        <result property="fPortofloadid"    column="f_portofloadid"    />
 | 
	
		
			
				|  |  | -        <result property="fDistinationid"    column="f_distinationid"    />
 | 
	
		
			
				|  |  | -        <result property="fPortoftransshipment"    column="f_portoftransshipment"    />
 | 
	
		
			
				|  |  | -        <result property="fEtd"    column="f_ETD"    />
 | 
	
		
			
				|  |  | -        <result property="fEta"    column="f_ETA"    />
 | 
	
		
			
				|  |  | -        <result property="fDays"    column="f_days"    />
 | 
	
		
			
				|  |  | -        <result property="fBegindate"    column="f_begindate"    />
 | 
	
		
			
				|  |  | -        <result property="fEnd"    column="f_end"    />
 | 
	
		
			
				|  |  | -        <result property="fTeu"    column="f_teu"    />
 | 
	
		
			
				|  |  | -        <result property="fDates"    column="f_dates"    />
 | 
	
		
			
				|  |  | -        <result property="fStatus"    column="f_status"    />
 | 
	
		
			
				|  |  | -        <result property="createBy"    column="create_by"    />
 | 
	
		
			
				|  |  | -        <result property="createTime"    column="create_time"    />
 | 
	
		
			
				|  |  | -        <result property="updateBy"    column="update_by"    />
 | 
	
		
			
				|  |  | -        <result property="updateTime"    column="update_time"    />
 | 
	
		
			
				|  |  | -        <result property="remark"    column="remark"    />
 | 
	
		
			
				|  |  | +        <result property="fId" column="f_id"/>
 | 
	
		
			
				|  |  | +        <result property="fPortofloadid" column="f_portofloadid"/>
 | 
	
		
			
				|  |  | +        <result property="fDistinationid" column="f_distinationid"/>
 | 
	
		
			
				|  |  | +        <result property="fPortoftransshipment" column="f_portoftransshipment"/>
 | 
	
		
			
				|  |  | +        <result property="fEtd" column="f_ETD"/>
 | 
	
		
			
				|  |  | +        <result property="fEta" column="f_ETA"/>
 | 
	
		
			
				|  |  | +        <result property="fDays" column="f_days"/>
 | 
	
		
			
				|  |  | +        <result property="fBegindate" column="f_begindate"/>
 | 
	
		
			
				|  |  | +        <result property="fEnd" column="f_end"/>
 | 
	
		
			
				|  |  | +        <result property="fTeu" column="f_teu"/>
 | 
	
		
			
				|  |  | +        <result property="fDates" column="f_dates"/>
 | 
	
		
			
				|  |  | +        <result property="fStatus" column="f_status"/>
 | 
	
		
			
				|  |  | +        <result property="createBy" column="create_by"/>
 | 
	
		
			
				|  |  | +        <result property="createTime" column="create_time"/>
 | 
	
		
			
				|  |  | +        <result property="updateBy" column="update_by"/>
 | 
	
		
			
				|  |  | +        <result property="updateTime" column="update_time"/>
 | 
	
		
			
				|  |  | +        <result property="remark" column="remark"/>
 | 
	
		
			
				|  |  |      </resultMap>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <sql id="selectTCtnpriceVo">
 | 
	
		
			
				|  |  | -        select f_id, f_portofloadid, f_distinationid, f_portoftransshipment, f_ETD, f_ETA, f_days, f_begindate, f_end, f_teu, f_dates, f_status, create_by, create_time, update_by, update_time, remark from t_ctnprice
 | 
	
		
			
				|  |  | +        select f_id,
 | 
	
		
			
				|  |  | +               f_portofloadid,
 | 
	
		
			
				|  |  | +               f_distinationid,
 | 
	
		
			
				|  |  | +               f_portoftransshipment,
 | 
	
		
			
				|  |  | +               f_ETD,
 | 
	
		
			
				|  |  | +               f_ETA,
 | 
	
		
			
				|  |  | +               f_days,
 | 
	
		
			
				|  |  | +               f_begindate,
 | 
	
		
			
				|  |  | +               f_end,
 | 
	
		
			
				|  |  | +               f_teu,
 | 
	
		
			
				|  |  | +               f_dates,
 | 
	
		
			
				|  |  | +               f_status,
 | 
	
		
			
				|  |  | +               create_by,
 | 
	
		
			
				|  |  | +               create_time,
 | 
	
		
			
				|  |  | +               update_by,
 | 
	
		
			
				|  |  | +               update_time,
 | 
	
		
			
				|  |  | +               remark
 | 
	
		
			
				|  |  | +        from t_ctnprice
 | 
	
		
			
				|  |  |      </sql>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectTCtnpriceList" parameterType="TCtnprice" resultMap="TCtnpriceResult">
 | 
	
	
		
			
				|  | @@ -58,18 +75,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |          LEFT JOIN t_address ta ON tc.f_portofloadid = ta.f_id
 | 
	
		
			
				|  |  |          LEFT JOIN t_address tr ON tc.f_distinationid = tr.f_id
 | 
	
		
			
				|  |  |          LEFT JOIN t_address ts ON tc.f_portoftransshipment = ts.f_id
 | 
	
		
			
				|  |  | -        <where>  
 | 
	
		
			
				|  |  | -            <if test="fPortofloadid != null "> and tc.f_portofloadid = #{fPortofloadid}</if>
 | 
	
		
			
				|  |  | -            <if test="fDistinationid != null "> and tc.f_distinationid = #{fDistinationid}</if>
 | 
	
		
			
				|  |  | -            <if test="fPortoftransshipment != null "> and tc.f_portoftransshipment = #{fPortoftransshipment}</if>
 | 
	
		
			
				|  |  | -            <if test="fEtd != null "> and tc.f_ETD = #{fEtd}</if>
 | 
	
		
			
				|  |  | -            <if test="fEta != null "> and tc.f_ETA = #{fEta}</if>
 | 
	
		
			
				|  |  | -            <if test="fDays != null "> and tc.f_days = #{fDays}</if>
 | 
	
		
			
				|  |  | -            <if test="fBegindate != null "> and tc.f_begindate = #{fBegindate}</if>
 | 
	
		
			
				|  |  | -            <if test="fEnd != null "> and tc.f_end = #{fEnd}</if>
 | 
	
		
			
				|  |  | -            <if test="fTeu != null  and fTeu != ''"> and tc.f_teu = #{fTeu}</if>
 | 
	
		
			
				|  |  | -            <if test="fDates != null  and fDates != ''"> and tc.f_dates = #{fDates}</if>
 | 
	
		
			
				|  |  | -            <if test="fStatus != null  and fStatus != ''"> and tc.f_status = #{fStatus}</if>
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +            <if test="fPortofloadid != null ">and tc.f_portofloadid = #{fPortofloadid}</if>
 | 
	
		
			
				|  |  | +            <if test="fDistinationid != null ">and tc.f_distinationid = #{fDistinationid}</if>
 | 
	
		
			
				|  |  | +            <if test="fPortoftransshipment != null ">and tc.f_portoftransshipment = #{fPortoftransshipment}</if>
 | 
	
		
			
				|  |  | +            <if test="fEtd != null ">and tc.f_ETD = #{fEtd}</if>
 | 
	
		
			
				|  |  | +            <if test="fEta != null ">and tc.f_ETA = #{fEta}</if>
 | 
	
		
			
				|  |  | +            <if test="fDays != null ">and tc.f_days = #{fDays}</if>
 | 
	
		
			
				|  |  | +            <if test="fBegindate != null ">and tc.f_begindate = #{fBegindate}</if>
 | 
	
		
			
				|  |  | +            <if test="fEnd != null ">and tc.f_end = #{fEnd}</if>
 | 
	
		
			
				|  |  | +            <if test="fTeu != null  and fTeu != ''">and tc.f_teu = #{fTeu}</if>
 | 
	
		
			
				|  |  | +            <if test="fDates != null  and fDates != ''">and tc.f_dates = #{fDates}</if>
 | 
	
		
			
				|  |  | +            <if test="fStatus != null  and fStatus != ''">and tc.f_status = #{fStatus}</if>
 | 
	
		
			
				|  |  |              <if test="createBy != null  and createBy != ''">and tc.create_by like concat('%', #{createBy}, '%')</if>
 | 
	
		
			
				|  |  |              <if test="remark != null  and remark != ''">and tc.remark like concat('%', #{remark}, '%')</if>
 | 
	
		
			
				|  |  |              <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
 | 
	
	
		
			
				|  | @@ -80,12 +97,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  |          </where>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      <select id="selectTCtnpriceById" parameterType="Long" resultMap="TCtnpriceResult">
 | 
	
		
			
				|  |  |          <include refid="selectTCtnpriceVo"/>
 | 
	
		
			
				|  |  |          where f_id = #{fId}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      <insert id="insertTCtnprice" parameterType="TCtnprice" useGeneratedKeys="true" keyProperty="fId">
 | 
	
		
			
				|  |  |          insert into t_ctnprice
 | 
	
		
			
				|  |  |          <trim prefix="(" suffix=")" suffixOverrides=",">
 | 
	
	
		
			
				|  | @@ -105,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |              <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="fPortofloadid != null">#{fPortofloadid},</if>
 | 
	
		
			
				|  |  |              <if test="fDistinationid != null">#{fDistinationid},</if>
 | 
	
	
		
			
				|  | @@ -123,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |              <if test="updateBy != null">#{updateBy},</if>
 | 
	
		
			
				|  |  |              <if test="updateTime != null">#{updateTime},</if>
 | 
	
		
			
				|  |  |              <if test="remark != null">#{remark},</if>
 | 
	
		
			
				|  |  | -         </trim>
 | 
	
		
			
				|  |  | +        </trim>
 | 
	
		
			
				|  |  |      </insert>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <update id="updateTCtnprice" parameterType="TCtnprice">
 | 
	
	
		
			
				|  | @@ -151,14 +168,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <delete id="deleteTCtnpriceById" parameterType="Long">
 | 
	
		
			
				|  |  | -        delete from t_ctnprice where f_id = #{fId}
 | 
	
		
			
				|  |  | +        delete
 | 
	
		
			
				|  |  | +        from t_ctnprice
 | 
	
		
			
				|  |  | +        where f_id = #{fId}
 | 
	
		
			
				|  |  |      </delete>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <delete id="deleteTCtnpriceByIds" parameterType="String">
 | 
	
		
			
				|  |  | -        delete from t_ctnprice where f_id in 
 | 
	
		
			
				|  |  | +        delete from t_ctnprice where f_id in
 | 
	
		
			
				|  |  |          <foreach item="fId" collection="array" open="(" separator="," close=")">
 | 
	
		
			
				|  |  |              #{fId}
 | 
	
		
			
				|  |  |          </foreach>
 | 
	
		
			
				|  |  |      </delete>
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +    <select id="selectMessage" parameterType="TCtnprice" resultMap="TCtnpriceResult">
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +        t.f_id, t.f_portofloadid, t.f_distinationid, t.f_portoftransshipment, t.f_begindate, t.f_end
 | 
	
		
			
				|  |  | +        FROM
 | 
	
		
			
				|  |  | +        t_ctnprice t
 | 
	
		
			
				|  |  | +        WHERE
 | 
	
		
			
				|  |  | +        t.f_portofloadid = #{fPortofloadid}
 | 
	
		
			
				|  |  | +        AND t.f_distinationid = #{fDistinationid}
 | 
	
		
			
				|  |  | +        AND t.f_status = 'T'
 | 
	
		
			
				|  |  | +        AND #{fBegindate} BETWEEN t.f_begindate AND t.f_end
 | 
	
		
			
				|  |  | +        <if test="fPortoftransshipment != null">AND f_portoftransshipment = #{fPortoftransshipment}</if>
 | 
	
		
			
				|  |  | +        <if test="fPortoftransshipment == null">AND f_portoftransshipment IS NULL</if>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  </mapper>
 |