|
@@ -28,14 +28,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
|
+ <result property="fLaneid" column="f_laneid" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTVoyageVo">
|
|
|
- select f_id, f_pid, f_no, f_portofloadid, f_portofdischargeid, f_distinationid, f_portoftransshipment, f_ETD, f_ATD, f_ETA, f_ATA, f_days, f_ducomentrayoffdate, f_cutoffdate, f_teu, f_manageid, f_tel, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark from t_voyage
|
|
|
+ select f_id, f_pid, f_no, f_portofloadid, f_portofdischargeid, f_distinationid, f_portoftransshipment, f_ETD, f_ATD, f_ETA, f_ATA, f_days, f_ducomentrayoffdate, f_cutoffdate, f_teu, f_manageid, f_tel, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark,f_laneid from t_voyage
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTVoyageList" parameterType="TVoyage" resultMap="TVoyageResult">
|
|
|
SELECT
|
|
|
+ DISTINCT
|
|
|
tv.f_id,
|
|
|
tv.f_pid,
|
|
|
te.f_name pidName,
|
|
@@ -69,7 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
tv.create_time,
|
|
|
tv.update_by,
|
|
|
tv.update_time,
|
|
|
- tv.remark
|
|
|
+ tv.remark,
|
|
|
+ tv.f_laneid,
|
|
|
+ tes.f_name as fLaneName
|
|
|
FROM
|
|
|
t_voyage tv
|
|
|
LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
|
|
@@ -78,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN t_address tr ON tv.f_distinationid = tr.f_id
|
|
|
LEFT JOIN t_address ts ON tv.f_portoftransshipment = ts.f_id
|
|
|
LEFT JOIN sys_user su ON tv.f_manageid = su.user_id
|
|
|
+ LEFT JOIN t_address tes ON tv.f_laneid = tes.f_id
|
|
|
<where>
|
|
|
tv.f_status = 'T'
|
|
|
<if test="fPid != null "> and tv.f_pid = #{fPid}</if>
|
|
@@ -111,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
|
|
|
and tv.create_time <= #{cLoadDate[1]}
|
|
|
</if>
|
|
|
+ <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectMessage" parameterType="TVoyage" resultMap="TVoyageResult">
|
|
@@ -148,7 +154,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
tv.create_time,
|
|
|
tv.update_by,
|
|
|
tv.update_time,
|
|
|
- tv.remark
|
|
|
+ tv.remark,
|
|
|
+ tv.f_laneid
|
|
|
FROM
|
|
|
t_voyage tv
|
|
|
LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
|
|
@@ -161,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
tv.f_status = 'T'
|
|
|
AND (date(tv.f_ATD) >= DATE_SUB(CURDATE(), INTERVAL 2 DAY)
|
|
|
OR tv.f_ATD IS NULL)
|
|
|
+ <if test="fId != null "> and tv.f_id = #{fId}</if>
|
|
|
<if test="fPid != null "> and tv.f_pid = #{fPid}</if>
|
|
|
<if test="fNo != null and fNo != ''"> and tv.f_no = #{fNo}</if>
|
|
|
<if test="fPortofloadid != null "> and tv.f_portofloadid = #{fPortofloadid}</if>
|
|
@@ -192,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
|
|
|
and tv.create_time <= #{cLoadDate[1]}
|
|
|
</if>
|
|
|
+ <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectTVoyageListNew" parameterType="TVoyage" resultMap="TVoyageResult">
|
|
@@ -229,7 +238,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
tv.create_time,
|
|
|
tv.update_by,
|
|
|
tv.update_time,
|
|
|
- tv.remark
|
|
|
+ tv.remark,
|
|
|
+ tv.f_laneid
|
|
|
FROM
|
|
|
t_voyage tv
|
|
|
LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
|
|
@@ -273,6 +283,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
|
|
|
and tv.create_time <= #{cLoadDate[1]}
|
|
|
</if>
|
|
|
+ <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -314,7 +325,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
tv.create_time,
|
|
|
tv.update_by,
|
|
|
tv.update_time,
|
|
|
- tv.remark
|
|
|
+ tv.remark,
|
|
|
+ tv.f_laneid
|
|
|
FROM
|
|
|
t_voyage tv
|
|
|
LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
|
|
@@ -352,6 +364,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>
|
|
|
+ <if test="fLaneid != null">f_laneid,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fPid != null">#{fPid},</if>
|
|
@@ -376,6 +389,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>
|
|
|
+ <if test="fLaneid != null">#{fLaneid},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -406,6 +420,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="fLaneid != null">f_laneid = #{fLaneid},</if>
|
|
|
</trim>
|
|
|
where f_id = #{fId}
|
|
|
</update>
|