<?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.manage.mapper.DmHarborMapper">
|
|
<resultMap type="com.ruoyi.manage.domain.DmHarbor" id="DmHarborResult">
|
<result 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="ammoD" column="ammo_d" />
|
<result property="ammoP" column="ammo_p" />
|
<result property="ammoS" column="ammo_s" />
|
<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="remark" column="remark" />
|
<result property="height" column="HEIGHT" />
|
<result property="heading" column="HEADING" />
|
<result property="pitch" column="PITCH" />
|
<result property="roll" column="ROLL" />
|
<result property="latitude" column="LATITUDE" />
|
<result property="longitude" column="LONGITUDE" />
|
<result property="pointX" column="POINT_X" />
|
<result property="pointY" column="POINT_Y" />
|
</resultMap>
|
|
<sql id="selectDmHarborVo">
|
select pkId, HARBOR_NAME, dept_id, dept_name, berth_no, oil_b, oil_g, ammo_d, ammo_p, ammo_s, del_flag,
|
create_by, create_time, update_by, update_time, dockName, water, material, ammo_o, remark,
|
HEIGHT, HEADING, PITCH, ROLL, LATITUDE, LONGITUDE, POINT_X, POINT_Y from dm_harbor
|
</sql>
|
|
<select id="selectDmHarborList" parameterType="DmHarbor" resultMap="DmHarborResult">
|
<include refid="selectDmHarborVo"/>
|
<where>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</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="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="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>
|
|
<insert id="insertDmHarbor" parameterType="DmHarbor" useGeneratedKeys="true" keyProperty="pkId">
|
insert into dm_harbor
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="name != null and name != ''">name,</if>
|
<if test="deptId != null">dept_id,</if>
|
<if test="deptName != null and deptName != ''">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="ammoD != null">ammo_d,</if>
|
<if test="ammoP != null">ammo_p,</if>
|
<if test="ammoS != null">ammo_s,</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="remark != null">remark,</if>
|
<if test="height != null">HEIGHT,</if>
|
<if test="heading != null">HEADING,</if>
|
<if test="pitch != null">PITCH,</if>
|
<if test="roll != null">ROLL,</if>
|
<if test="latitude != null">LATITUDE,</if>
|
<if test="longitude != null">LONGITUDE,</if>
|
<if test="pointX != null">POINT_X,</if>
|
<if test="pointY != null">POINT_Y,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="name != null and name != ''">#{name},</if>
|
<if test="deptId != null">#{deptId},</if>
|
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
<if test="berthNo != null">#{berthNo},</if>
|
<if test="oilB != null">#{oilB},</if>
|
<if test="oilG != null">#{oilG},</if>
|
<if test="ammoD != null">#{ammoD},</if>
|
<if test="ammoP != null">#{ammoP},</if>
|
<if test="ammoS != null">#{ammoS},</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="remark != null">#{remark},</if>
|
<if test="height != null">#{height},</if>
|
<if test="heading != null">#{heading},</if>
|
<if test="pitch != null">#{pitch},</if>
|
<if test="roll != null">#{roll},</if>
|
<if test="latitude != null">#{latitude},</if>
|
<if test="longitude != null">#{longitude},</if>
|
<if test="pointX != null">#{pointX},</if>
|
<if test="pointY != null">#{pointY},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDmHarbor" parameterType="DmHarbor">
|
update dm_harbor
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="deptName != null and deptName != ''">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="ammoD != null">ammo_d = #{ammoD},</if>
|
<if test="ammoP != null">ammo_p = #{ammoP},</if>
|
<if test="ammoS != null">ammo_s = #{ammoS},</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="remark != null">remark = #{remark},</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>
|
|
<select id="getPageList" resultMap="DmHarborResult">
|
select a.*,b.DEPT_NAME as bumenName from dm_harbor a left join sys_dept b on a.DEPT_ID = b.DEPT_ID
|
<where>
|
<if test="dockName!=null and dockName!=''">
|
dockname like concat('%',#{dockName},'%')
|
</if>
|
</where>
|
order by PKID DESC
|
limit #{pageSize} offset #{offset}
|
|
</select>
|
|
<select id="getTotal" resultType="java.lang.Integer">
|
select count(1) from dm_harbor a left join sys_dept b on a.DEPT_ID = b.DEPT_ID
|
<where>
|
<if test="dockName!=null and dockName!=''">
|
dockname like concat('%',#{dockName},'%')
|
</if>
|
</where>
|
</select>
|
</mapper>
|