<?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.DmBerth2Mapper">
|
|
<resultMap type="com.ruoyi.buss.domain.DmBerth2" id="DmBerthResult">
|
<id property="PKID" column="PKID" />
|
<result property="NAME" column="NAME" />
|
<result property="harborId" column="HARBOR_ID" />
|
<result property="harborName" column="HARBOR_NAME" />
|
<result property="berthLen" column="BERTH_LEN" />
|
<result property="DEPTH" column="DEPTH" />
|
<result property="STATUS" column="STATUS" />
|
<result property="orderNum" column="ORDER_NUM" />
|
<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="deptId" column="DEPT_ID" />
|
<result property="path" column="PATH" />
|
</resultMap>
|
|
<sql id="selectDmBerthVo">
|
select PKID, NAME, HARBOR_ID, HARBOR_NAME, BERTH_LEN, DEPTH, STATUS, ORDER_NUM, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, DEPT_ID, PATH from dm_berth
|
</sql>
|
|
<select id="selectDmBerthList" parameterType="com.ruoyi.buss.domain.DmBerth2" resultMap="DmBerthResult">
|
<include refid="selectDmBerthVo"/>
|
<where>
|
<if test="PKID != null "> and PKID = #{PKID}</if>
|
<if test="NAME != null and NAME != ''"> and NAME like concat('%', #{NAME}, '%')</if>
|
<if test="harborId != null "> and HARBOR_ID = #{harborId}</if>
|
<if test="harborName != null and harborName != ''"> and HARBOR_NAME like concat('%', #{harborName}, '%')</if>
|
<if test="berthLen != null "> and BERTH_LEN = #{berthLen}</if>
|
<if test="DEPTH != null "> and DEPTH = #{DEPTH}</if>
|
<if test="STATUS != null and STATUS != ''"> and STATUS = #{STATUS}</if>
|
<if test="orderNum != null "> and ORDER_NUM = #{orderNum}</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="deptId != null "> and DEPT_ID = #{deptId}</if>
|
</where>
|
</select>
|
|
<select id="selectDmBerthByHarborIds" resultMap="DmBerthResult">
|
<include refid="selectDmBerthVo"/>
|
where HARBOR_ID in
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
order by HARBOR_ID, ORDER_NUM
|
</select>
|
|
<select id="selectDmBerthByHarborIdsAndStatus" resultMap="DmBerthResult">
|
<include refid="selectDmBerthVo"/>
|
where status = '1' and HARBOR_ID in
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
order by HARBOR_ID, ORDER_NUM
|
</select>
|
|
<select id="selectDmBerthByPKID" parameterType="Long" resultMap="DmBerthResult">
|
<include refid="selectDmBerthVo"/>
|
where PKID = #{PKID}
|
</select>
|
|
<insert id="insertDmBerth" parameterType="com.ruoyi.buss.domain.DmBerth2">
|
insert into dm_berth
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="PKID != null">PKID,</if>
|
<if test="NAME != null">NAME,</if>
|
<if test="harborId != null">HARBOR_ID,</if>
|
<if test="harborName != null">HARBOR_NAME,</if>
|
<if test="berthLen != null">BERTH_LEN,</if>
|
<if test="DEPTH != null">DEPTH,</if>
|
<if test="STATUS != null">STATUS,</if>
|
<if test="orderNum != null">ORDER_NUM,</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="deptId != null">DEPT_ID,</if>
|
<if test="path != null">PATH,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="PKID != null">#{PKID},</if>
|
<if test="NAME != null">#{NAME},</if>
|
<if test="harborId != null">#{harborId},</if>
|
<if test="harborName != null">#{harborName},</if>
|
<if test="berthLen != null">#{berthLen},</if>
|
<if test="DEPTH != null">#{DEPTH},</if>
|
<if test="STATUS != null">#{STATUS},</if>
|
<if test="orderNum != null">#{orderNum},</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="deptId != null">#{deptId},</if>
|
<if test="path != null">#{path},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDmBerth" parameterType="com.ruoyi.buss.domain.DmBerth2">
|
update dm_berth
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="NAME != null">NAME = #{NAME},</if>
|
<if test="harborId != null">HARBOR_ID = #{harborId},</if>
|
<if test="harborName != null">HARBOR_NAME = #{harborName},</if>
|
<if test="berthLen != null">BERTH_LEN = #{berthLen},</if>
|
<if test="DEPTH != null">DEPTH = #{DEPTH},</if>
|
<if test="STATUS != null">STATUS = #{STATUS},</if>
|
<if test="orderNum != null">ORDER_NUM = #{orderNum},</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="path != null">PATH = #{path},</if>
|
</trim>
|
where PKID = #{PKID}
|
</update>
|
|
<delete id="deleteDmBerthByPKID" parameterType="Long">
|
delete from dm_berth where PKID = #{PKID}
|
</delete>
|
|
<delete id="deleteDmBerthByPKIDs" parameterType="String">
|
delete from dm_berth where PKID in
|
<foreach item="PKID" collection="array" open="(" separator="," close=")">
|
#{PKID}
|
</foreach>
|
</delete>
|
|
<select id="getDmBerthListByIds" parameterType="java.lang.String" resultMap="DmBerthResult">
|
<include refid="selectDmBerthVo"/>
|
where PKID in ${berthIds} ORDER BY PKID ASC
|
</select>
|
</mapper>
|