<?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">
|
<mapper namespace="com.ruoyi.buss.mapper.DmHarbor2Mapper">
|
|
<resultMap type="com.ruoyi.buss.domain.DmHarbor2" id="DmHarborResult">
|
<id property="PKID" column="PKID" />
|
<result property="harborName" column="HARBOR_NAME" />
|
<result property="deptId" column="DEPT_ID" />
|
<result property="deptName" column="DEPT_NAME" />
|
<result property="berthNo" column="BERTH_NO" />
|
<result property="oilB" column="OIL_B" />
|
<result property="oilG" column="OIL_G" />
|
<result property="oilA" column="OIL_A" />
|
<result property="ammoD" column="AMMO_D" />
|
<result property="ammoP" column="AMMO_P" />
|
<result property="ammoS" column="AMMO_S" />
|
<result property="remark" column="remark" />
|
<result property="delFlag" column="DEL_FLAG" />
|
<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="DOCKNAME" column="DOCKNAME" />
|
<result property="WATER" column="WATER" />
|
<result property="MATERIAL" column="MATERIAL" />
|
<result property="ammoO" column="AMMO_O" />
|
<result property="vehicleCount" column="VEHICLE_COUNT" />
|
<result property="roadConditions" column="ROAD_CONDITIONS" />
|
<result property="draft" column="DRAFT" />
|
</resultMap>
|
|
<sql id="selectDmHarborVo">
|
select PKID, HARBOR_NAME, DEPT_ID, DEPT_NAME, BERTH_NO, OIL_B, OIL_G, OIL_A, AMMO_D, AMMO_P, AMMO_S, remark, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, DOCKNAME, WATER, MATERIAL, AMMO_O, VEHICLE_COUNT, ROAD_CONDITIONS, DRAFT from dm_harbor
|
</sql>
|
|
<select id="selectDmHarborList" parameterType="com.ruoyi.buss.domain.DmHarbor2" resultMap="DmHarborResult">
|
<include refid="selectDmHarborVo"/>
|
<where>
|
<if test="PKID != null "> and PKID = #{PKID}</if>
|
<if test="harborName != null and NAME != ''"> and HARBOR_NAME like concat('%', #{harborName}, '%')</if>
|
<if test="deptId != null "> and DEPT_ID = #{deptId}</if>
|
<if test="deptName != null and deptName != ''"> and DEPT_NAME like concat('%', #{deptName}, '%')</if>
|
<if test="berthNo != null "> and BERTH_NO = #{berthNo}</if>
|
<if test="oilB != null "> and OIL_B = #{oilB}</if>
|
<if test="oilG != null "> and OIL_G = #{oilG}</if>
|
<if test="oilA != null "> and OIL_A = #{oilA}</if>
|
<if test="ammoD != null "> and AMMO_D = #{ammoD}</if>
|
<if test="ammoP != null "> and AMMO_P = #{ammoP}</if>
|
<if test="ammoS != null "> and AMMO_S = #{ammoS}</if>
|
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
<if test="delFlag != null and delFlag != ''"> and DEL_FLAG = #{delFlag}</if>
|
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
<if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
<if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
<if test="DOCKNAME != null and DOCKNAME != ''"> and DOCKNAME like concat('%', #{DOCKNAME}, '%')</if>
|
<if test="WATER != null "> and WATER = #{WATER}</if>
|
<if test="MATERIAL != null "> and MATERIAL = #{MATERIAL}</if>
|
<if test="ammoO != null "> and AMMO_O = #{ammoO}</if>
|
</where>
|
</select>
|
|
<select id="selectDmHarborByPKID" parameterType="Long" resultMap="DmHarborResult">
|
<include refid="selectDmHarborVo"/>
|
where PKID = #{PKID}
|
</select>
|
|
<select id="selectDmHarborByPKIDs" resultMap="DmHarborResult">
|
<include refid="selectDmHarborVo"/>
|
where PKID in
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</select>
|
|
|
<insert id="insertDmHarbor" parameterType="com.ruoyi.buss.domain.DmHarbor2">
|
insert into dm_harbor
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="harborName != null">HARBOR_NAME,</if>
|
<if test="deptId != null">DEPT_ID,</if>
|
<if test="deptName != null">DEPT_NAME,</if>
|
<if test="berthNo != null">BERTH_NO,</if>
|
<if test="oilB != null">OIL_B,</if>
|
<if test="oilG != null">OIL_G,</if>
|
<if test="oilA != null">OIL_A,</if>
|
<if test="ammoD != null">AMMO_D,</if>
|
<if test="ammoP != null">AMMO_P,</if>
|
<if test="ammoS != null">AMMO_S,</if>
|
<if test="remark != null">remark,</if>
|
<if test="delFlag != null">DEL_FLAG,</if>
|
<if test="createBy != null">CREATE_BY,</if>
|
<if test="createTime != null">CREATE_TIME,</if>
|
<if test="updateBy != null">UPDATE_BY,</if>
|
<if test="updateTime != null">UPDATE_TIME,</if>
|
<if test="DOCKNAME != null">DOCKNAME,</if>
|
<if test="WATER != null">WATER,</if>
|
<if test="MATERIAL != null">MATERIAL,</if>
|
<if test="ammoO != null">AMMO_O,</if>
|
<if test="vehicleCount != null">VEHICLE_COUNT,</if>
|
<if test="roadConditions != null">ROAD_CONDITIONS,</if>
|
<if test="draft != null">DRAFT,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="harborName != null">#{harborName},</if>
|
<if test="deptId != null">#{deptId},</if>
|
<if test="deptName != null">#{deptName},</if>
|
<if test="berthNo != null">#{berthNo},</if>
|
<if test="oilB != null">#{oilB},</if>
|
<if test="oilG != null">#{oilG},</if>
|
<if test="oilA != null">#{oilA},</if>
|
<if test="ammoD != null">#{ammoD},</if>
|
<if test="ammoP != null">#{ammoP},</if>
|
<if test="ammoS != null">#{ammoS},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="DOCKNAME != null">#{DOCKNAME},</if>
|
<if test="WATER != null">#{WATER},</if>
|
<if test="MATERIAL != null">#{MATERIAL},</if>
|
<if test="ammoO != null">#{ammoO},</if>
|
<if test="vehicleCount != null">#{vehicleCount},</if>
|
<if test="roadConditions != null">#{roadConditions},</if>
|
<if test="draft != null">#{draft},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDmHarbor" parameterType="com.ruoyi.buss.domain.DmHarbor2">
|
update dm_harbor
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="harborName != null">NAME = #{harborName},</if>
|
<if test="deptId != null">DEPT_ID = #{deptId},</if>
|
<if test="deptName != null">DEPT_NAME = #{deptName},</if>
|
<if test="berthNo != null">BERTH_NO = #{berthNo},</if>
|
<if test="oilB != null">OIL_B = #{oilB},</if>
|
<if test="oilG != null">OIL_G = #{oilG},</if>
|
<if test="oilA != null">OIL_A = #{oilA},</if>
|
<if test="ammoD != null">AMMO_D = #{ammoD},</if>
|
<if test="ammoP != null">AMMO_P = #{ammoP},</if>
|
<if test="ammoS != null">AMMO_S = #{ammoS},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="delFlag != null">DEL_FLAG = #{delFlag},</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="DOCKNAME != null">DOCKNAME = #{DOCKNAME},</if>
|
<if test="WATER != null">WATER = #{WATER},</if>
|
<if test="MATERIAL != null">MATERIAL = #{MATERIAL},</if>
|
<if test="ammoO != null">AMMO_O = #{ammoO},</if>
|
<if test="vehicleCount != null">VEHICLE_COUNT = #{vehicleCount},</if>
|
<if test="roadConditions != null">ROAD_CONDITIONS = #{roadConditions},</if>
|
<if test="draft != null">DRAFT = #{draft},</if>
|
|
</trim>
|
where PKID = #{PKID}
|
</update>
|
|
<delete id="deleteDmHarborByPKID" parameterType="Long">
|
delete from dm_harbor where PKID = #{PKID}
|
</delete>
|
|
<delete id="deleteDmHarborByPKIDs" parameterType="String">
|
delete from dm_harbor where PKID in
|
<foreach item="PKID" collection="array" open="(" separator="," close=")">
|
#{PKID}
|
</foreach>
|
</delete>
|
|
</mapper>
|