194 lines
7.0 KiB
XML
194 lines
7.0 KiB
XML
|
|
<?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.yfd.platform.data.mapper.FishDraftDataMapper">
|
||
|
|
|
||
|
|
<resultMap id="BaseResultMap" type="com.yfd.platform.data.domain.FishDraftData">
|
||
|
|
<id column="ID" property="id"/>
|
||
|
|
<result column="STCD" property="stcd"/>
|
||
|
|
<result column="TM" property="tm"/>
|
||
|
|
<result column="FTP" property="ftp"/>
|
||
|
|
<result column="FSZ" property="fsz"/>
|
||
|
|
<result column="FCNT" property="fcnt"/>
|
||
|
|
<result column="FWET" property="fwet"/>
|
||
|
|
<result column="STRDT" property="strdt"/>
|
||
|
|
<result column="ENDDT" property="enddt"/>
|
||
|
|
<result column="DIRECTION" property="direction"/>
|
||
|
|
<result column="YR" property="yr"/>
|
||
|
|
<result column="MOUTH" property="mouth"/>
|
||
|
|
<result column="VDPTH" property="vdpth"/>
|
||
|
|
<result column="PICPTH" property="picpth"/>
|
||
|
|
<result column="ISFS" property="isfs"/>
|
||
|
|
<result column="SOURCE_TYPE" property="sourceType"/>
|
||
|
|
<result column="APPROVAL_ID" property="approvalId"/>
|
||
|
|
<result column="STATUS" property="status"/>
|
||
|
|
<result column="LOCK_FLAG" property="lockFlag"/>
|
||
|
|
<result column="SUBMIT_TIME" property="submitTime"/>
|
||
|
|
<result column="APPROVE_TIME" property="approveTime"/>
|
||
|
|
<result column="DELETED_FLAG" property="deletedFlag"/>
|
||
|
|
<result column="DELETED_BY" property="deletedBy"/>
|
||
|
|
<result column="DELETED_AT" property="deletedAt"/>
|
||
|
|
<result column="CREATED_AT" property="createdAt"/>
|
||
|
|
<result column="CREATED_BY" property="createdBy"/>
|
||
|
|
<result column="UPDATED_AT" property="updatedAt"/>
|
||
|
|
<result column="UPDATED_BY" property="updatedBy"/>
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<resultMap id="JoinResultMap" type="com.yfd.platform.data.domain.vo.FishDraftDataVO">
|
||
|
|
<id column="ID" property="id"/>
|
||
|
|
<result column="STCD" property="stcd"/>
|
||
|
|
<result column="TM" property="tm"/>
|
||
|
|
<result column="FTP" property="ftp"/>
|
||
|
|
<result column="FSZ" property="fsz"/>
|
||
|
|
<result column="FCNT" property="fcnt"/>
|
||
|
|
<result column="FWET" property="fwet"/>
|
||
|
|
<result column="STRDT" property="strdt"/>
|
||
|
|
<result column="ENDDT" property="enddt"/>
|
||
|
|
<result column="DIRECTION" property="direction"/>
|
||
|
|
<result column="YR" property="yr"/>
|
||
|
|
<result column="MOUTH" property="mouth"/>
|
||
|
|
<result column="VDPTH" property="vdpth"/>
|
||
|
|
<result column="PICPTH" property="picpth"/>
|
||
|
|
<result column="ISFS" property="isfs"/>
|
||
|
|
<result column="SOURCE_TYPE" property="sourceType"/>
|
||
|
|
<result column="APPROVAL_ID" property="approvalId"/>
|
||
|
|
<result column="STATUS" property="status"/>
|
||
|
|
<result column="LOCK_FLAG" property="lockFlag"/>
|
||
|
|
<result column="SUBMIT_TIME" property="submitTime"/>
|
||
|
|
<result column="APPROVE_TIME" property="approveTime"/>
|
||
|
|
<result column="DELETED_FLAG" property="deletedFlag"/>
|
||
|
|
<result column="DELETED_BY" property="deletedBy"/>
|
||
|
|
<result column="DELETED_AT" property="deletedAt"/>
|
||
|
|
<result column="CREATED_AT" property="createdAt"/>
|
||
|
|
<result column="CREATED_BY" property="createdBy"/>
|
||
|
|
<result column="UPDATED_AT" property="updatedAt"/>
|
||
|
|
<result column="UPDATED_BY" property="updatedBy"/>
|
||
|
|
<result column="STNM" property="stnm"/>
|
||
|
|
<result column="STTP" property="sttp"/>
|
||
|
|
<result column="RSTCD" property="rstcd"/>
|
||
|
|
<result column="ENNM" property="ennm"/>
|
||
|
|
<result column="BASE_ID" property="baseId"/>
|
||
|
|
<result column="RVCD" property="rvcd"/>
|
||
|
|
<result column="LGTD" property="lgtd"/>
|
||
|
|
<result column="LTTD" property="lttd"/>
|
||
|
|
<result column="ORDER_INDEX" property="orderIndex"/>
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="joinColumns">
|
||
|
|
D.ID,
|
||
|
|
D.STCD,
|
||
|
|
D.TM,
|
||
|
|
D.FTP,
|
||
|
|
D.FSZ,
|
||
|
|
D.FCNT,
|
||
|
|
D.FWET,
|
||
|
|
D.STRDT,
|
||
|
|
D.ENDDT,
|
||
|
|
D.DIRECTION,
|
||
|
|
D.YR,
|
||
|
|
D.MOUTH,
|
||
|
|
D.VDPTH,
|
||
|
|
D.PICPTH,
|
||
|
|
D.ISFS,
|
||
|
|
D.SOURCE_TYPE,
|
||
|
|
D.APPROVAL_ID,
|
||
|
|
D.STATUS,
|
||
|
|
D.LOCK_FLAG,
|
||
|
|
D.SUBMIT_TIME,
|
||
|
|
D.APPROVE_TIME,
|
||
|
|
D.DELETED_FLAG,
|
||
|
|
D.DELETED_BY,
|
||
|
|
D.DELETED_AT,
|
||
|
|
D.CREATED_AT,
|
||
|
|
D.CREATED_BY,
|
||
|
|
D.UPDATED_AT,
|
||
|
|
D.UPDATED_BY,
|
||
|
|
F.STNM,
|
||
|
|
F.STTP,
|
||
|
|
F.RSTCD,
|
||
|
|
E.ENNM,
|
||
|
|
E.BASE_ID,
|
||
|
|
E.RVCD,
|
||
|
|
E.LGTD,
|
||
|
|
E.LTTD,
|
||
|
|
E.ORDER_INDEX
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectJoinPage" resultMap="JoinResultMap">
|
||
|
|
SELECT
|
||
|
|
<include refid="joinColumns"/>
|
||
|
|
FROM FISH_DRAFT_DATA D
|
||
|
|
LEFT JOIN SD_FPSS_B_H F ON D.STCD = F.STCD
|
||
|
|
LEFT JOIN SD_ENGINFO_B_H E ON F.RSTCD = E.STCD
|
||
|
|
WHERE D.DELETED_FLAG = 0
|
||
|
|
<if test="stcd != null and stcd != ''">
|
||
|
|
AND D.STCD = #{stcd}
|
||
|
|
</if>
|
||
|
|
<if test="stcd != null and stcd != ''">
|
||
|
|
AND D.FTP = #{ftp}
|
||
|
|
</if>
|
||
|
|
<if test="rstcd != null and rstcd != ''">
|
||
|
|
AND F.RSTCD = #{rstcd}
|
||
|
|
</if>
|
||
|
|
<if test="baseId != null and baseId != ''">
|
||
|
|
AND E.BASE_ID = #{baseId}
|
||
|
|
</if>
|
||
|
|
<if test="direction != null and direction != ''">
|
||
|
|
AND D.DIRECTION = #{direction}
|
||
|
|
</if>
|
||
|
|
<if test="status != null and status != ''">
|
||
|
|
AND D.STATUS = #{status}
|
||
|
|
</if>
|
||
|
|
ORDER BY D.CREATED_AT DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectJoinList" resultMap="JoinResultMap">
|
||
|
|
SELECT
|
||
|
|
<include refid="joinColumns"/>
|
||
|
|
FROM FISH_DRAFT_DATA D
|
||
|
|
LEFT JOIN SD_FPSS_B_H F ON D.STCD = F.STCD
|
||
|
|
LEFT JOIN SD_ENGINFO_B_H E ON F.RSTCD = E.STCD
|
||
|
|
WHERE D.DELETED_FLAG = 0
|
||
|
|
<if test="stcd != null and stcd != ''">
|
||
|
|
AND D.STCD = #{stcd}
|
||
|
|
</if>
|
||
|
|
<if test="rstcd != null and rstcd != ''">
|
||
|
|
AND F.RSTCD = #{rstcd}
|
||
|
|
</if>
|
||
|
|
<if test="baseId != null and baseId != ''">
|
||
|
|
AND E.BASE_ID = #{baseId}
|
||
|
|
</if>
|
||
|
|
<if test="direction != null and direction != ''">
|
||
|
|
AND D.DIRECTION = #{direction}
|
||
|
|
</if>
|
||
|
|
<if test="status != null and status != ''">
|
||
|
|
AND D.STATUS = #{status}
|
||
|
|
</if>
|
||
|
|
ORDER BY D.CREATED_AT DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectJoinCount" resultType="long">
|
||
|
|
SELECT COUNT(*)
|
||
|
|
FROM FISH_DRAFT_DATA D
|
||
|
|
LEFT JOIN SD_FPSS_B_H F ON D.STCD = F.STCD
|
||
|
|
LEFT JOIN SD_ENGINFO_B_H E ON F.RSTCD = E.STCD
|
||
|
|
WHERE D.DELETED_FLAG = 0
|
||
|
|
<if test="stcd != null and stcd != ''">
|
||
|
|
AND D.STCD = #{stcd}
|
||
|
|
</if>
|
||
|
|
<if test="rstcd != null and rstcd != ''">
|
||
|
|
AND F.RSTCD = #{rstcd}
|
||
|
|
</if>
|
||
|
|
<if test="baseId != null and baseId != ''">
|
||
|
|
AND E.BASE_ID = #{baseId}
|
||
|
|
</if>
|
||
|
|
<if test="direction != null and direction != ''">
|
||
|
|
AND D.DIRECTION = #{direction}
|
||
|
|
</if>
|
||
|
|
<if test="status != null and status != ''">
|
||
|
|
AND D.STATUS = #{status}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|