|
@@ -30,11 +30,13 @@
|
|
|
<result property="fPactDealHorn" column="f_pact_deal_horn" />
|
|
|
<result property="fMblno" column="f_mblno" />
|
|
|
<result property="fBoxWeight" column="f_box_weight" />
|
|
|
+ <result property="onHireStart" column="on_hire_start" />
|
|
|
+ <result property="onHireEnd" column="on_hire_end" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTCntrnoVo">
|
|
|
select f_id, f_no, f_typeid, f_owner, f_source, f_rent, f_updatetime, f_updateaddress, f_updateEF, f_cntrstatus, case when f_status = 'T' then '正常' else '停用' end as f_status,f_opctnstatus,f_sealno,create_by, create_time, update_by, update_time, remark,
|
|
|
- f_build_box_time,f_box_turtle_year,f_box_turtle_month,f_box_lord,f_pact_deal_horn,f_mblno,f_box_weight from t_cntrno
|
|
|
+ f_build_box_time,f_box_turtle_year,f_box_turtle_month,f_box_lord,f_pact_deal_horn,f_mblno,f_box_weight,on_hire_start,on_hire_end from t_cntrno
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
|
|
@@ -65,6 +67,8 @@
|
|
|
<if test="fPactDealHorn != null and fPactDealHorn != ''"> and f_pact_deal_horn = #{fPactDealHorn}</if>
|
|
|
<if test="fMblno != null and fMblno != ''"> and f_mblno = #{fMblno}</if>
|
|
|
<if test="fBoxWeight != null "> and f_box_weight = #{fBoxWeight}</if>
|
|
|
+ <if test="onHireStart != null "> and on_hire_start = #{onHireStart}</if>
|
|
|
+ <if test="onHireEnd != null "> and on_hire_end = #{onHireEnd}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectTcntrnoMessage" parameterType="TCntrno" resultMap="TCntrnoResult">
|
|
@@ -88,7 +92,8 @@
|
|
|
sdda.dict_label updateEFName,
|
|
|
tc.f_cntrstatus,
|
|
|
pr.dict_label cntrstatusName,
|
|
|
- case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
|
|
|
+ tc.f_status,
|
|
|
+ case when tc.f_status = 'T' then '启用' else '停用' end as fStatusName,
|
|
|
prd.dict_label opctnstatusName,
|
|
|
tc.create_by,
|
|
|
tc.create_time,
|
|
@@ -99,7 +104,10 @@
|
|
|
tc.f_box_turtle_year,
|
|
|
tc.f_box_turtle_month,
|
|
|
tc.f_box_lord,
|
|
|
- tc.f_pact_deal_horn
|
|
|
+ tc.f_pact_deal_horn,
|
|
|
+ tc.on_hire_start,
|
|
|
+ tc.on_hire_end,
|
|
|
+ tc.f_mblno
|
|
|
FROM
|
|
|
t_cntrno tc
|
|
|
LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
|
|
@@ -119,7 +127,6 @@
|
|
|
AND prd.dict_type = 'f_opctnstatus'
|
|
|
LEFT JOIN t_address address ON address.f_id = tc.f_updateaddress
|
|
|
<where>
|
|
|
- tc.f_status = 'T'
|
|
|
<if test="tc.fNo != null and tc.fNo != ''">and tc.f_no like concat('%', #{tc.fNo}, '%') </if>
|
|
|
<if test="tc.fTypeid != null ">and tc.f_typeid = #{tc.fTypeid}</if>
|
|
|
<if test="tc.fOwner != null and tc.fOwner != ''">and tc.f_owner = #{tc.fOwner}</if>
|
|
@@ -151,6 +158,18 @@
|
|
|
<if test="tc.fPactDealHorn != null and tc.fPactDealHorn != ''"> and tc.f_pact_deal_horn = #{tc.fPactDealHorn}</if>
|
|
|
<if test="tc.fMblno != null and tc.fMblno != ''"> and tc.f_mblno = #{tc.fMblno}</if>
|
|
|
<if test="tc.fBoxWeight != null "> and tc.f_box_weight = #{tc.fBoxWeight}</if>
|
|
|
+ <if test='tc.onHireStartList != null and tc.onHireStartList[0] != null and tc.onHireStartList[0]!= ""'>
|
|
|
+ and tc.on_hire_start >= #{tc.onHireStartList[0]}
|
|
|
+ </if>
|
|
|
+ <if test='tc.onHireStartList != null and tc.onHireStartList[1] != null and tc.onHireStartList[1]!= ""'>
|
|
|
+ and tc.on_hire_start <= #{tc.onHireStartList[1]}
|
|
|
+ </if>
|
|
|
+ <if test='tc.onHireEnfList != null and tc.onHireEnfList[0] != null and tc.onHireEnfList[0]!= ""'>
|
|
|
+ and tc.on_hire_end >= #{tc.onHireEnfList[0]}
|
|
|
+ </if>
|
|
|
+ <if test='tc.onHireEnfList != null and tc.onHireEnfList[1] != null and tc.onHireEnfList[1]!= ""'>
|
|
|
+ and tc.on_hire_end <= #{tc.onHireEnfList[1]}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
ORDER BY tc.f_no,CONVERT(tc.f_updateaddress USING gbk),CONVERT(t.f_no USING gbk),
|
|
|
tc.f_updateEF,tc.f_cntrstatus,tc.f_owner
|
|
@@ -178,7 +197,8 @@
|
|
|
sdda.dict_label updateEFName,
|
|
|
tc.f_cntrstatus,
|
|
|
pr.dict_label cntrstatusName,
|
|
|
- case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
|
|
|
+ tc.f_status,
|
|
|
+ case when tc.f_status = 'T' then '启用' else '停用' end as fStatusName,
|
|
|
tc.f_opctnstatus,
|
|
|
tc.create_by,
|
|
|
tc.create_time,
|
|
@@ -189,7 +209,9 @@
|
|
|
tc.f_box_turtle_year,
|
|
|
tc.f_box_turtle_month,
|
|
|
tc.f_box_lord,
|
|
|
- tc.f_pact_deal_horn
|
|
|
+ tc.f_pact_deal_horn,
|
|
|
+ tc.on_hire_start,
|
|
|
+ tc.on_hire_end
|
|
|
FROM
|
|
|
t_cntrno tc
|
|
|
LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
|
|
@@ -230,7 +252,8 @@
|
|
|
sdda.dict_label updateEFName,
|
|
|
tc.f_cntrstatus,
|
|
|
pr.dict_label cntrstatusName,
|
|
|
- case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
|
|
|
+ tc.f_status,
|
|
|
+ case when tc.f_status = 'T' then '启用' else '停用' end as fStatusName,
|
|
|
tc.f_opctnstatus,
|
|
|
tc.create_by,
|
|
|
tc.create_time,
|
|
@@ -258,7 +281,7 @@
|
|
|
LEFT JOIN sys_dict_data prs ON prs.dict_value = t.f_cntrsize
|
|
|
AND prs.dict_type = 'f_cntrsize'
|
|
|
LEFT JOIN t_address address ON address.f_id = tc.f_updateaddress
|
|
|
- where tc.f_no = #{fNo}
|
|
|
+ where tc.f_no = #{fNo} and tc.f_status = 'T'
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertTCntrno" parameterType="TCntrno">
|
|
@@ -287,6 +310,10 @@
|
|
|
<if test="fBoxTurtleMonth != null">f_box_turtle_month,</if>
|
|
|
<if test="fBoxLord != null">f_box_lord,</if>
|
|
|
<if test="fPactDealHorn != null">f_pact_deal_horn,</if>
|
|
|
+ <if test="fMblno != null">f_mblno,</if>
|
|
|
+ <if test="fBoxWeight != null">f_box_weight,</if>
|
|
|
+ <if test="onHireStart != null">on_hire_start,</if>
|
|
|
+ <if test="onHireEnd != null">on_hire_end,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fId != null">#{fId},</if>
|
|
@@ -312,6 +339,10 @@
|
|
|
<if test="fBoxTurtleMonth != null">#{fBoxTurtleMonth},</if>
|
|
|
<if test="fBoxLord != null">#{fBoxLord},</if>
|
|
|
<if test="fPactDealHorn != null">#{fPactDealHorn},</if>
|
|
|
+ <if test="fMblno != null">#{fMblno},</if>
|
|
|
+ <if test="fBoxWeight != null">#{fBoxWeight},</if>
|
|
|
+ <if test="onHireStart != null">#{onHireStart},</if>
|
|
|
+ <if test="onHireEnd != null">#{onHireEnd},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -340,6 +371,10 @@
|
|
|
<if test="fBoxTurtleMonth != null">f_box_turtle_month = #{fBoxTurtleMonth},</if>
|
|
|
<if test="fBoxLord != null">f_box_lord = #{fBoxLord},</if>
|
|
|
<if test="fPactDealHorn != null">f_pact_deal_horn = #{fPactDealHorn},</if>
|
|
|
+ <if test="fMblno != null">f_mblno = #{fMblno},</if>
|
|
|
+ <if test="fBoxWeight != null">f_box_weight = #{fBoxWeight},</if>
|
|
|
+ <if test="onHireStart != null">on_hire_start = #{onHireStart},</if>
|
|
|
+ <if test="onHireEnd != null">on_hire_end = #{onHireEnd},</if>
|
|
|
</trim>
|
|
|
where f_id = #{fId}
|
|
|
</update>
|
|
@@ -369,6 +404,10 @@
|
|
|
<if test="fBoxTurtleMonth != null">f_box_turtle_month = #{fBoxTurtleMonth},</if>
|
|
|
<if test="fBoxLord != null">f_box_lord = #{fBoxLord},</if>
|
|
|
<if test="fPactDealHorn != null">f_pact_deal_horn = #{fPactDealHorn},</if>
|
|
|
+ <if test="fMblno != null">f_mblno = #{fMblno},</if>
|
|
|
+ <if test="fBoxWeight != null">f_box_weight = #{fBoxWeight},</if>
|
|
|
+ <if test="onHireStart != null">on_hire_start = #{onHireStart},</if>
|
|
|
+ <if test="onHireEnd != null">on_hire_end = #{onHireEnd},</if>
|
|
|
</trim>
|
|
|
where f_no = #{fNo}
|
|
|
</update>
|
|
@@ -667,6 +706,40 @@ FROM
|
|
|
WHERE
|
|
|
ta.f_name = '在船'
|
|
|
</select>
|
|
|
-
|
|
|
+ <update id="updateHire" parameterType="TCntrno">
|
|
|
+ update t_cntrno
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
|
|
|
+ <if test="fTypeid != null">f_typeid = #{fTypeid},</if>
|
|
|
+ <if test="fOwner != null and fOwner != ''">f_owner = #{fOwner},</if>
|
|
|
+ <if test="fSource != null">f_source = #{fSource},</if>
|
|
|
+ <if test="fRent != null">f_rent = #{fRent},</if>
|
|
|
+ <if test="fUpdatetime != null">f_updatetime = #{fUpdatetime},</if>
|
|
|
+ <if test="fUpdateaddress != null and fUpdateaddress != ''">f_updateaddress = #{fUpdateaddress},</if>
|
|
|
+ <if test="fUpdateef != null and fUpdateef != ''">f_updateEF = #{fUpdateef},</if>
|
|
|
+ <if test="fCntrstatus != null and fCntrstatus != ''">f_cntrstatus = #{fCntrstatus},</if>
|
|
|
+ <if test="fStatus != null">f_status = #{fStatus},</if>
|
|
|
+ <if test="fSealno != null">f_sealno = #{fSealno},</if>
|
|
|
+ <if test="fOpctnstatus != null">f_opctnstatus = #{fOpctnstatus},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <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="fBuildBoxTime != null">f_build_box_time = #{fBuildBoxTime},</if>
|
|
|
+ <if test="fBoxTurtleYear != null">f_box_turtle_year = #{fBoxTurtleYear},</if>
|
|
|
+ <if test="fBoxTurtleMonth != null">f_box_turtle_month = #{fBoxTurtleMonth},</if>
|
|
|
+ <if test="fBoxLord != null">f_box_lord = #{fBoxLord},</if>
|
|
|
+ <if test="fPactDealHorn != null">f_pact_deal_horn = #{fPactDealHorn},</if>
|
|
|
+ <if test="fMblno != null">f_mblno = #{fMblno},</if>
|
|
|
+ <if test="fBoxWeight != null">f_box_weight = #{fBoxWeight},</if>
|
|
|
+ <if test="onHireStart != null">on_hire_start = #{onHireStart},</if>
|
|
|
+ <if test="onHireEnd != null">on_hire_end = #{onHireEnd},</if>
|
|
|
+ </trim>
|
|
|
+ where f_id in
|
|
|
+ <foreach item="fId" collection="cntrnoList" open="(" separator="," close=")">
|
|
|
+ #{fId}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
|
|
|
</mapper>
|