<?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.shanghaichengdi.ghjgitem.mapper.CommonMapper">
  <select id="selectAisRealTimeXYList" resultType="com.shanghaichengdi.ghjgitem.vo.BoatAISVo">
    select k.DEVICEID,i.SHIP_NAME_CN BOATNAME,i.SHIP_NAME_EN
    boatNameEn,i.SHIP_LENGTH,i.SHIP_BREADTH,i.SHIP_DEPTH,
    k.VELOCITY,k.DIRECTION,k.GPSTIME,k.LATITUDE,k.LONGITUDE,k.mapx,k.mapy
    from GHJG_DYNAMIC.VW_GPSINFO_REALTIME k
    left join ghjg_basics.mvw_boat_info i on i.mmsi = k.DEVICEID
    where 1=1
    <if test="deviceId != '' and deviceId != null">
      and k.DEVICEID = #{deviceId}
    </if>
    <if test="startTime != '' and startTime != null and endTime != '' and endTime != null">
      and k.GPSTIME >= to_date(#{startTime},'yyyy-mm-dd hh24:mi:ss')
      and k.GPSTIME &lt;= to_date(#{endTime},'yyyy-mm-dd hh24:mi:ss')
    </if>
    and k.mapx > #{minX} and k.mapx &lt; #{maxX}
    and k.mapy > #{minY} and k.mapy &lt; #{maxY}
    order by k.GPSTIME desc
  </select>

  <select id="getLastInformNo" resultType="String">
    select max(t.docnumber) code
    from GHJG_DYNAMIC.BUSINESS_SUPERVISION_INFORM t
    where t.docnumber like #{rules} || '%'
  </select>

  <select id="getLastRecordNo" resultType="String">
    select max(t.supervisionnumber) code
    from GHJG_DYNAMIC.BUSINESS_SUPERVISION_record t
    where t.supervisionnumber like #{rules} || '%'
  </select>

  <select id="selectCargoDeclareInfo"
    resultType="com.shanghaichengdi.ghjgitem.vo.CCbCargoDeclareRecVo">
    select t.goods_id                 goodsId,
           t.specific_name            specificName,
           t.actual_carrying_capacity actualCarryingCapacity,
           t.port_cargo               portCargo,
           t.is_dangerous_goods       isDangerousGoods
    from GHJG_BASICS.C_CB_CARGO_DECLARE_REC t
    where t.REPORT_ID = #{reportId}
  </select>

  <select id="selectShipCrewInfo" resultType="com.shanghaichengdi.ghjgitem.vo.CCbOnShipCrewRecVo">
    select t.crew_id crewId, t.name name
    from GHJG_BASICS.C_CB_ON_SHIP_CREW_REC t
    where t.REPORT_ID = #{reportId}
  </select>

  <select id="selectInfoList" resultType="com.shanghaichengdi.ghjgitem.vo.VwCertInfoSelfAllVo">
    select distinct infoall.CODE                                                                            code,
                          infoall.CRET_TYPE                                                                       cretType,
                          infoall.FZJG                                                                            fzjg,
                          infoall.CRET_NUMER                                                                      cretNumer,
                          infoall.CNAME                                                                           cname,
                          infoall.JUDGMENT                                                                        judgment,
                          to_char(infoall.BUSINESS_TYPE)                                                          businessType,
                          ''                                                                                      bz,
                          t2.enterprise_id                                                                        baseid,
                          infoall.INFO_SOURCE                                                                     infoSource,
                          infoall.info_stats                                                                      infoStats,
                          infoall.CRE_DATE                                                                        creDate,
                          infoall.EFFECTIVESTARTDATE                                                              effectivestartdate,
                          infoall.EFFECTIVEENDDATE                                                                effectiveenddate,
                          t2.TAXLICENSE                                                                           taxlicense,
                          t2.CNNAME                                                                               enterpriseName,
                          t2.ENNAME                                                                               enterpriseEnName,
                          t2.MANAGECLASS                                                                          manageClass,
                          t2.LEGALPERSON                                                                          legalPerson,
                          t2.LEGALPERSONDOCUMENTTYPE                                                              legalPersonDocumentType,
                          t2.LEGALPERSONDOCUMENTNUM                                                               legalPersonDocumentNum,
                          t2.LEGALPERSONPHONE                                                                     legalPersonPhone,
                          t2.PHONENUMBER                                                                          phoneNumber,
                          t2.EMAIL                                                                                email,
                          t2.BUSINESSLICENSE                                                                      businessLicense,
                          t2.REGISTEREDDISTRICT                                                                   registeredDistrict,
                          t2.REGISTEREDADDRESS                                                                    registeredAddress,
                          t2.LICENSENUMBER                                                                        licenseNumber,
                          t2.CANCELLATIONDATE                                                                     cancellationDate,
                          ss.ECONOMIC_TYPE,
                          ss.BUSINESS_SCOPE
          from GHJG_BASICS.Vw_Cret_Info_Self_All infoall
                 left join GHJG_BASICS.TOBJ_ENTERPRISE_BASIC t2 on infoall.TAXLICENSE = t2.TAXLICENSE and t2.isremove = 0
                 left join GHJG_PORT_MANAGE.SY_INSPECT ss
                           on ss.LICENSE_NUMBER = infoall.CRET_NUMER
          where (infoall.JUDGMENT like '%上海市浦东新区建设和交通委员会%')
            and infoall.cname not in ('上海新洋山集装箱运输有限公司')
  </select>

  <select id="selectBoatInfoList" resultType="com.shanghaichengdi.ghjgitem.vo.ShipDataVo">
    select T.SHIP_REG_NO shipRegNo,
    T.SHIP_ID shipId,
    T.SHIP_NAME_CN shipNameCn,
    T.SHIP_IMO shipImo,
    T.MMSI mmsi,
    T.REGPORT_CODE regportCode,
    T.SHIP_ROUTE_CODE shipRouteCode,
    T.SHIP_TYPE_CODE shipTypeCode,
    T.SHIP_SUMMER_DRAFT shipSummerDraft,
    T.SHIP_WIND_LEVEL shipWindLevel,
    T.SHIP_MINIMUM_FREEBOARD shipMinimumFreeboard,
    T.SHIP_CONTAINER_NUM shipContainerNum,
    T.SHIP_PARKING_NUM shipParkingNum,
    T.SHIP_PASSENGER_NUM shipPassengerNum,
    T.REMARK remark,
    T.SHIP_INSPECT_NO shipInspectNo,
    T.SHIP_CALLSIGN shipCallsign,
    T.SAILINGAREA_CODE sailingareaCode,
    T.SHIP_BUILT_DATE shipBuiltDate,
    T.SHIPYARD_CN shipyardCn,
    T.SHIP_BUILT_ADDR_CN shipBuiltAddrCn,
    T.SHIP_LENGTH shipLength,
    T.SHIP_BREADTH shipBreadth,
    T.SHIP_DEPTH shipDepth,
    T.SHIP_GROSSTON shipGrosston,
    T.SHIP_NETTON shipNetton,
    T.SHIP_DWT shipDwt,
    T.SHIP_ENGINE_POWER shipEnginePower,
    T.SHIP_REGION_TYPE shipRegionType,
    T.SHIP_REBUILT_DATE shipRebuiltDate,
    T.ORG_CODE orgCode,
    T.CREATE_TIME createTime,
    T.LAST_UPDATE_DATE lastUpdateDate,
    T.DELETE_FLAG deleteFlag,
    T.SHIP_OWNER_ADDR_CN shipOwnerAddrCn,
    T.OWNER_LEGAL_PERSON ownerLegalPerson,
    T.OWNER_CONTACT_PHONE ownerContactPhone,
    T.SHIP_TYPE_NAME shipTypeName,
    T.REGPORT_NAME regportName,
    T.SHIP_ROUTE_NAME shipRouteName
    from GHJG_BASICS.MVW_BOAT_INFO T
    <where>
      <if test="shipId != null and shipId != ''">
        and T.SHIP_ID = #{shipId}
      </if>
      <if test="mmsi != null and mmsi != ''">
        and T.MMSI like #{mmsi} || '%'
      </if>
      <if test="shipTypeName != null and shipTypeName != ''">
        and T.SHIP_TYPE_NAME = #{shipTypeName}
      </if>
      <if test="shipNameCn != null and shipNameCn != ''">
        and T.SHIP_NAME_CN = #{shipNameCn}
      </if>
        <choose>
            <when test="mmsiList != null and shipNameCnList != null">
                and (T.SHIP_NAME_CN in
                <foreach collection="shipNameCnList" index="index" item="item" open="(" close=")" separator=",">
                    #{item}
                </foreach>
                or T.MMSI in
                <foreach collection="mmsiList" index="index" item="item" open="(" close=")" separator=",">
                    #{item}
                </foreach>)
            </when>
            <when test="mmsiList != null and shipNameCnList = null">
                and T.MMSI in
                <foreach collection="mmsiList" index="index" item="item" open="(" close=")" separator=",">
                    ${item}
                </foreach>
            </when>
            <when test="mmsiList = null and shipNameCnList != null">
                and T.SHIP_NAME_CN in
                <foreach collection="shipNameCnList" index="index" item="item" open="(" close=")" separator=",">
                    ${item}
                </foreach>
            </when>
            <otherwise>

            </otherwise>
        </choose>

    </where>
  </select>

    <select id="selectBoatContactInfoByMmsi" resultType="com.shanghaichengdi.ghjgitem.vo.ShipDataVo">
        select
        T.SHIP_ID shipId,
        T.MMSI mmsi,
        T.OWNER_LEGAL_PERSON ownerLegalPerson,
        T.OWNER_CONTACT_PHONE ownerContactPhone
        from GHJG_BASICS.MVW_BOAT_INFO T
        where T.MMSI in
            <foreach collection="mmsiList" index="index" item="item" open="(" close=")" separator=",">
                ${item}
            </foreach>
    </select>

  <select id="obscureSelectBoatInfoList" resultType="com.shanghaichengdi.ghjgitem.vo.ShipDataVo">
    select *
    from (select T.SHIP_NAME_CN                                                        shipNameCn,
                 T.SHIP_NAME_EN                                                        shipNameEn,
                 T.MMSI                                                                mmsi,
                 T.SHIP_TYPE_CODE                                                      shipTypeCode,
                 T.SHIP_TYPE_NAME                                                      shipTypeName,
                 T.LAST_UPDATE_DATE                                                    lastUpdateDate,
                 T.SHIP_IMO                                                            shipImo,
                 T.SHIP_CALLSIGN                                                       shipCallsign,
                 T1.LATITUDE                                                           latitude,
                 T1.LONGITUDE                                                          longtitude,
                 T1.DIRECTION                                                          direction,
                 T1.VELOCITY                                                           velocity,
                 T1.SHIPSTATE                                                          shipState,
                 row_number() over (partition by T1.DEVICEID order by T1.GPSTIME desc) rn
          from GHJG_BASICS.MVW_BOAT_INFO T
                 left join GHJG_DYNAMIC.VW_GPSINFO_REALTIME T1 on T.MMSI = T1.DEVICEID
            where T.SHIP_NAME_CN like '%' || #{keyWord} || '%' or
                 T.MMSI like #{keyWord} || '%')
    where rn = 1
  </select>

  <select id="selectBoatReportInfoList" resultType="com.shanghaichengdi.ghjgitem.vo.BoatReportInfoVo">
    select t.REPORT_ID reportId,
    t.SHIP_ID shipId,
    t.REPORT_NO reportNo,
    t.ORG_CODE orgCode,
    t.REPORT_PORT_NAME reportPortName,
    t.REPORT_PORT_CODE reportPortCode,
    t.ARRIVAL_OR_LEAVE arrivalOrLeave,
    t.ARRIVAL_REPORT_ID arrivalReportId,
    t.NEXT_PORT_NAME nextPortName,
    t.NEXT_PORT_CODE nextPortCode,
    t.REPORT_TIME reportTime,
    t.EXPECT_TIME expectTime,
    t.IF_ANCHORED ifAnchored,
    t.DRAFT_FORWARD draftForward,
    t.AFT_DRAFT aftDraft,
    t.BERTH_CODE berthCode,
    t.BERTH_NAME berthName,
    t.ACTUAL_CARRYING_CAPACITY actualCarryingCapacity,
    t.PORT_CARGO portCargo,
    t.REAL_DANGER_CARGO realDangerCargo,
    t.PORT_DANGER_CARGO portDangerCargo,
    t.ACTUAL_CAPACITY actualCapacity,
    t.PORT_PASSENGER portPassenger,
    t.REAL_VEHICLE realVehicle,
    t.PORT_VEHICLE portVehicle,
    t.NUM_OF_BARGE numOfBarge,
    t.PORT_BARGE portBarge,
    t.REAL_CONTAINER_QAY realContainerQay,
    t.PORT_CONTAINER_QAY portContainerQay,
    t.IF_REVOKE ifRevoke,
    t.VOYAGE_REPORT voyageReport,
    t.FREQUENCY frequency,
    t.NAVIGATION_SECTION navigationSection,
    t.PRE_PORT_NAME prePortName,
    t.PRE_PORT_CODE prePortCode,
    t.SHIP_NAME_CN shipName,
    t.MMSI mmsi,
    t.BID_NAME bidName,
    t.MOBILE_PHONE mobilePhone
          from
          (
          <foreach item="item" collection="partition" separator="union">
              select * from ${item}
          </foreach>
          ) t
        left join ghjg_basics.dict_district_port p on p.berthname = t.berth_name and p.valid = '有效'
        and p.lochus != '注销'
        where 1 = 1
          and (REPORT_PORT_CODE like '31%'
          or NEXT_PORT_CODE like '31%'
          or PRE_PORT_CODE like '31%')
          and p.team = '浦东新区'
    <if test="reportId != '' and reportId != null">
      and t.REPORT_ID = #{reportId}
    </if>
    <if test="shipId != '' and shipId != null">
      and t.SHIP_ID = #{shipId}
    </if>
    <if test="startTime != null and endTime != null and endTime != '' and startTime != ''">
      and REPORT_TIME >= to_date(#{startTime},'yyyy-mm-dd hh24:mi:ss')
      and REPORT_TIME &lt;= to_date(#{endTime},'yyyy-mm-dd hh24:mi:ss')
    </if>
    <if test="reportNo != '' and reportNo != null">
      and t.REPORT_NO = #{reportNo}
    </if>
    order by t.REPORT_TIME desc
  </select>


  <select id="selectCountByRange" resultType="com.shanghaichengdi.ghjgitem.vo.CountVo">
    select count(1) count
    from GHJG_DYNAMIC.VW_GPSINFO_REALTIME t
    where t.LATITUDE >= #{minLat}
      and t.LATITUDE &lt;= #{maxLat}
      and t.LONGITUDE >= #{minLon}
      and t.LONGITUDE &lt;= #{maxLon}
  </select>

  <select id="selectBoatInfoByRange" resultType="com.shanghaichengdi.ghjgitem.vo.ShipDataVo">
    select *
    from (select T.MMSI                                                                mmsi,
                 T1.DIRECTION                                                          direction,
                 T1.VELOCITY                                                           velocity,
                 T1.GPSTIME                                                            lastUpdateDate,
                 T1.LATITUDE                                                           latitude,
                 T1.LONGITUDE                                                          longtitude,
                 T.SHIP_NAME_EN                                                        shipNameEn,
                 T.SHIP_NAME_CN                                                        shipNameCn,
                 T.SHIP_LENGTH                                                         shipLength,
                 T.SHIP_BREADTH                                                        shipBreadth,
                 T1.SHIPSTATE                                                          shipState,
                 T.SHIP_SUMMER_DRAFT                                                   shipSummerDraft,
                 T.SHIP_IMO                                                            shipImo,
                 T.SHIP_TYPE_CODE                                                      shipTypeCode,
                 T.SHIP_TYPE_NAME                                                      shipTypeName,
                 T.SHIP_CALLSIGN                                                       shipCallsign,
                 T.SHIP_BUILT_DATE                                                     shipBuiltDate,
                 T.SHIP_DWT                                                            shipDwt,
                 row_number() over (partition by T1.DEVICEID order by T1.GPSTIME desc) rn
          from GHJG_BASICS.MVW_BOAT_INFO T
                 left join GHJG_DYNAMIC.VW_GPSINFO_REALTIME T1 on T.MMSI = T1.DEVICEID
          where t1.LATITUDE >= #{minLat}
            and t1.LATITUDE &lt;= #{maxLat}
            and t1.LONGITUDE >= #{minLon}
            and t1.LONGITUDE &lt;= #{maxLon}
            and t1.gpstime > sysdate - 30/24/60 )
    where rn = 1
  </select>

  <select id="selectBoatInfoByMmsi" resultType="com.shanghaichengdi.ghjgitem.vo.ShipDataVo">
    select *
    from (select T1.GPSTIME lastUpdateDate,
    T1.LATITUDE latitude,
    T1.LONGITUDE longtitude,
    T1.DIRECTION direction,
    T1.VELOCITY velocity,
    T.SHIP_SUMMER_DRAFT shipSummerDraft,
    T.MMSI mmsi,
    T.SHIP_IMO shipImo,
    T.SHIP_CALLSIGN shipCallsign,
    T.SHIP_NAME_EN shipNameEn,
    T.SHIP_NAME_CN shipNameCn,
    T.SHIP_TYPE_CODE shipTypeCode,
    T.SHIP_TYPE_NAME shipTypeName,
    T.SHIP_LENGTH shipLength,
    T.SHIP_BREADTH shipBreadth,
    T1.SHIPSTATE shipState,
    T.SHIP_BUILT_DATE shipBuiltDate,
    T.SHIP_DWT shipDwt,
    T.REGPORT_CODE regportCode,
    T.REGPORT_NAME regportName,
    decode(T2.ARRIVAL_OR_LEAVE,0,T2.REPORT_PORT_NAME,1,T2.NEXT_PORT_NAME) destination,
    T2.EXPECT_TIME expectTime,
    row_number() over (partition by T1.DEVICEID order by T1.GPSTIME desc) rn
    from GHJG_BASICS.MVW_BOAT_INFO T
    left join GHJG_DYNAMIC.VW_GPSINFO_REALTIME T1 on T.MMSI = T1.DEVICEID
    left join (select
    a.SHIP_ID,a.REPORT_PORT_NAME,a.NEXT_PORT_NAME,a.ARRIVAL_OR_LEAVE,a.EXPECT_TIME
    from (
    <foreach item="item" collection="tableNameList" separator="union">
      select SHIP_ID,REPORT_PORT_NAME,NEXT_PORT_NAME,ARRIVAL_OR_LEAVE,EXPECT_TIME from
      ${item}
    </foreach>
    ) a
    ) T2 on T.SHIP_ID is not null and T.SHIP_ID = T2.SHIP_ID
    where T.MMSI = #{mmsi})
    where rn = 1
  </select>

  <select id="selectBoatPathFromMvwHistory" resultType="com.shanghaichengdi.ghjgitem.vo.BoatPathVo">
    select t.deviceid mmsi, t.VELOCITY,t.DIRECTION,t.LONGITUDE,t.LATITUDE,t.MAPX,t.MAPY,
           to_char(t.GPSTIME,'yyyy-mm-dd hh24:mi:ss') time
    from nhdt.gpsinfo_history t
    where t.deviceid = #{mmsi}
      and t.gpstime >= to_date(#{startTime}, 'yyyy-mm-dd hh24:mi:ss')
      and to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss') >= t.gpstime
  </select>
  <select id="selectBoatInfoByShipId" resultType="com.shanghaichengdi.ghjgitem.vo.ShipInfoForShipLockVo">
      select t.SHIP_ID,
             t.SHIP_NAME_CN   shipName,
             t.SHIP_TYPE_CODE shipTypeCode,
             t.SHIP_TYPE_NAME shipTypeName,
             t.SHIP_LENGTH shipLength,
             t.MMSI,
             t.SHIP_DEPTH shipDepth,
             t.SHIP_DWT shipDwt,
             t.SHIP_BREADTH shipWidth
      from GHJG_BASICS.MVW_BOAT_INFO t
      where SHIP_ID = #{shipId}
  </select>

    <select id="selectCargoDeclareInfoByShipId"
            resultType="com.shanghaichengdi.ghjgitem.vo.CargoInfoForShipLockVo">
        select * from (
        <foreach collection="list" item="item" index="index" separator="union all">
            select c.ship_id shipId,
            c.SHIP_NAME_CN shipName,
            c.mmsi mmsi,
            r.type_code pCargoCode,
            d.ITEM_NAME_CN pCargoName,
            r.GOODS_CODE cargoCode,
            r.specific_name cargoName,
            c.actual_carrying_capacity actualLoad,
            decode(c.ARRIVAL_OR_LEAVE,0,c.PRE_PORT_NAME,1,c.REPORT_PORT_NAME) startPort,
            decode(c.ARRIVAL_OR_LEAVE,0,c.PRE_PORT_CODE,1,c.REPORT_PORT_CODE) startPortCode,
            decode(c.ARRIVAL_OR_LEAVE,0,c.REPORT_PORT_CODE,1,c.next_port_code) nextPortCode,
            decode(c.ARRIVAL_OR_LEAVE,0,c.REPORT_PORT_NAME,1,c.next_port_name) nextPort,
            c.LAST_UPDATE_DATE lastUpdateDate,
            c.report_time reportTime
            from ghjg_basics.c_cb_ship_eep_report_rec partition(${item}) c
            left join ghjg_basics.c_cb_cargo_declare_rec r
            on c.report_id = r.report_id
            left join ghjg_basics.d_cb_cargo_type d on r.type_code = d.code
            where c.SHIP_ID = #{shipId}
        </foreach>
        ) t
        where t.reportTime >= sysdate-2 and t.reportTime &lt;= sysdate
    </select>

    <select id="getPdShipCountByMmsiAndShipName" resultType="java.lang.Integer">
        select count(1) from ghjg_dynamic.vw_gpsinfo_realtime t
        left join ghjg_basics.mvw_boat_info b on t.deviceid = b.mmsi
        where 1=1
            <if test="mmsi != null and mmsi != ''">
                and t.deviceid = #{mmsi}
            </if>
            <if test="shipName != null and shipName != ''">
                and b.ship_name_cn = #{shipName}
            </if>
          and t.GPSTIME > sysdate - 30
          and t.MAPX > -2000 and t.MAPX &lt; 48000
          and t.MAPY > -48000 and t.MAPY &lt; 18000
    </select>

    <select id="getPdShipCountByShipId" resultType="java.lang.Integer">
        select count(1) from ghjg_dynamic.vw_gpsinfo_realtime t
        left join ghjg_basics.mvw_boat_info b on t.deviceid = b.mmsi
        where 1=1
          <if test="shipId != null">
              and b.ship_id = #{shipId}
          </if>
          and t.GPSTIME > sysdate - 1/24
          and t.MAPX > -2000 and t.MAPX &lt; 48000
          and t.MAPY > -48000 and t.MAPY &lt; 18000
    </select>
    <select id="selectPdPortDrawPicture" resultType="java.lang.String">
        select pp.PATH from GHJG_BUSSINESS.PORT_UNIT_DRAW_NEW p left join GHJG_BUSSINESS.PORT_UNIT_DRAW_PHOTO
        pp on p.ID = pp.DRAW_ID
        where p.CERTNUMBER in  (select cret_numer
                                 from GHJG_BASICS.Vw_Cret_Info_Self_All infoall
                                 where (infoall.JUDGMENT like '%上海市浦东新区建设和交通委员会%')
                                   and infoall.cname not in ('上海新洋山集装箱运输有限公司'))
          AND PP.PATH IS NOT NULL
        <if test="drawId != null and drawId != ''">
            and pp.DRAW_ID = #{drawId}
        </if>
        <if test="certNumber != null and certNumber != ''">
            and p.CERTNUMBER = #{certNumber}
        </if>
    </select>
    <select id="selectAisRealTimePointList" resultType="com.shanghaichengdi.ghjgitem.vo.BoatAISVo">
        select k.DEVICEID,i.SHIP_NAME_CN BOATNAME,i.SHIP_NAME_EN
        boatNameEn,i.SHIP_LENGTH,i.SHIP_BREADTH,i.SHIP_DEPTH,
        k.VELOCITY,k.DIRECTION,k.GPSTIME,k.LATITUDE,k.LONGITUDE,k.mapx,k.mapy
        from GHJG_DYNAMIC.VW_GPSINFO_REALTIME k
        left join ghjg_basics.mvw_boat_info i on i.mmsi = k.DEVICEID
        where i.mmsi in
        <foreach item="item" collection="mmsiList" open="(" separator="," close=")">
            #{item}
        </foreach>
        order by k.GPSTIME desc
    </select>
</mapper>