123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698 |
- <?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.steerinfo.dil.mapper.AmsshipDeliveryAttorneyMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
- <id column="ATTORNEY_ID" jdbcType="DECIMAL" property="attorneyId" />
- <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
- <result column="PORT_ID" jdbcType="DECIMAL" property="portId" />
- <result column="DOWN_SWIM_PORT_ID" jdbcType="DECIMAL" property="downSwimPortId" />
- <result column="ATTORNEY_PICKUP_CONTACT_PERSON" jdbcType="VARCHAR" property="attorneyPickupContactPerson" />
- <result column="ATTORENY_PICKUP_IDCARD" jdbcType="VARCHAR" property="attorenyPickupIdcard" />
- <result column="ATTORNEY_CONTACT_TELEPHONE" jdbcType="VARCHAR" property="attorneyContactTelephone" />
- <result column="ATTORNEY_TIME" jdbcType="TIMESTAMP" property="attorneyTime" />
- <result column="ATTORNEY_PDFFILE" jdbcType="VARCHAR" property="attorneyPdffile" />
- <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
- <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
- <result column="ATTORNEY_DISTRIBUTION_STATUS" jdbcType="DECIMAL" property="attorneyDistributionStatus" />
- </resultMap>
- <sql id="columns">
- ATTORNEY_ID, BATCH_ID, PORT_ID, DOWN_SWIM_PORT_ID, ATTORNEY_PICKUP_CONTACT_PERSON,
- ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE, ATTORNEY_TIME, ATTORNEY_PDFFILE,
- DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETED, ATTORNEY_DISTRIBUTION_STATUS
- </sql>
- <sql id="columns_alias">
- t.ATTORNEY_ID, t.BATCH_ID, t.PORT_ID, t.DOWN_SWIM_PORT_ID, t.ATTORNEY_PICKUP_CONTACT_PERSON,
- t.ATTORENY_PICKUP_IDCARD, t.ATTORNEY_CONTACT_TELEPHONE, t.ATTORNEY_TIME, t.ATTORNEY_PDFFILE,
- t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ATTORNEY_DISTRIBUTION_STATUS
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM AMSSHIP_DELIVERY_ATTORNEY
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM AMSSHIP_DELIVERY_ATTORNEY t
- </sql>
- <sql id="where">
- <where>
- <if test="attorneyId != null">
- and ATTORNEY_ID = #{attorneyId}
- </if>
- <if test="batchId != null">
- and BATCH_ID = #{batchId}
- </if>
- <if test="portId != null">
- and PORT_ID = #{portId}
- </if>
- <if test="downSwimPortId != null">
- and DOWN_SWIM_PORT_ID = #{downSwimPortId}
- </if>
- <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
- and ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson}
- </if>
- <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
- and ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard}
- </if>
- <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
- and ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone}
- </if>
- <if test="attorneyTime != null">
- and TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = #{attorneyTime}
- </if>
- <if test="attorneyPdffile != null and attorneyPdffile != ''">
- and ATTORNEY_PDFFILE = #{attorneyPdffile}
- </if>
- <if test="deleteName != null and deleteName != ''">
- and DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null and deleteTime != ''">
- and DELETE_TIME = #{deleteTime}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="attorneyDistributionStatus != null">
- and ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="attorneyId != null">
- and ATTORNEY_ID = #{attorneyId}
- </if>
- <if test="batchId != null">
- and BATCH_ID = #{batchId}
- </if>
- <if test="portId != null">
- and PORT_ID = #{portId}
- </if>
- <if test="downSwimPortId != null">
- and DOWN_SWIM_PORT_ID = #{downSwimPortId}
- </if>
- <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
- and ATTORNEY_PICKUP_CONTACT_PERSON LIKE '%${attorneyPickupContactPerson}%'
- </if>
- <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
- and ATTORENY_PICKUP_IDCARD LIKE '%${attorenyPickupIdcard}%'
- </if>
- <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
- and ATTORNEY_CONTACT_TELEPHONE LIKE '%${attorneyContactTelephone}%'
- </if>
- <if test="attorneyTime != null">
- and TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = #{attorneyTime}
- </if>
- <if test="attorneyPdffile != null and attorneyPdffile != ''">
- and ATTORNEY_PDFFILE LIKE '%${attorneyPdffile}%'
- </if>
- <if test="deleteName != null and deleteName != ''">
- and DELETE_NAME LIKE '%${deleteName}%'
- </if>
- <if test="deleteTime != null and deleteTime != ''">
- and DELETE_TIME LIKE '%${deleteTime}%'
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="attorneyDistributionStatus != null">
- and ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
- delete from AMSSHIP_DELIVERY_ATTORNEY
- where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from AMSSHIP_DELIVERY_ATTORNEY
- where 1!=1
- <if test="batchId != null">
- or BATCH_ID = #{batchId}
- </if>
- <if test="portId != null">
- or PORT_ID = #{portId}
- </if>
- <if test="downSwimPortId != null">
- or DOWN_SWIM_PORT_ID = #{downSwimPortId}
- </if>
- <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
- or ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson}
- </if>
- <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
- or ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard}
- </if>
- <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
- or ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone}
- </if>
- <if test="attorneyTime != null">
- or TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = '#{attorneyTime}'
- </if>
- <if test="attorneyPdffile != null and attorneyPdffile != ''">
- or ATTORNEY_PDFFILE = #{attorneyPdffile}
- </if>
- <if test="deleteName != null and deleteName != ''">
- or DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null and deleteTime != ''">
- or DELETE_TIME = #{deleteTime}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- <if test="attorneyDistributionStatus != null">
- or ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
- insert into AMSSHIP_DELIVERY_ATTORNEY (ATTORNEY_ID, BATCH_ID, PORT_ID,
- DOWN_SWIM_PORT_ID, ATTORNEY_PICKUP_CONTACT_PERSON,
- ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE,
- ATTORNEY_TIME, ATTORNEY_PDFFILE, DELETE_NAME,
- DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, ATTORNEY_DISTRIBUTION_STATUS)
- values (#{attorneyId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{portId,jdbcType=DECIMAL},
- #{downSwimPortId,jdbcType=DECIMAL}, #{attorneyPickupContactPerson,jdbcType=VARCHAR},
- #{attorenyPickupIdcard,jdbcType=VARCHAR}, #{attorneyContactTelephone,jdbcType=VARCHAR},
- #{attorneyTime,jdbcType=TIMESTAMP}, #{attorneyPdffile,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR},
- #{deleteTime,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{deleted,jdbcType=DECIMAL}, #{attorneyDistributionStatus,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
- insert into AMSSHIP_DELIVERY_ATTORNEY
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="attorneyId != null">
- ATTORNEY_ID,
- </if>
- <if test="batchId != null">
- BATCH_ID,
- </if>
- <if test="portId != null">
- PORT_ID,
- </if>
- <if test="downSwimPortId != null">
- DOWN_SWIM_PORT_ID,
- </if>
- <if test="attorneyPickupContactPerson != null">
- ATTORNEY_PICKUP_CONTACT_PERSON,
- </if>
- <if test="attorenyPickupIdcard != null">
- ATTORENY_PICKUP_IDCARD,
- </if>
- <if test="attorneyContactTelephone != null">
- ATTORNEY_CONTACT_TELEPHONE,
- </if>
- <if test="attorneyTime != null">
- ATTORNEY_TIME,
- </if>
- <if test="attorneyPdffile != null">
- ATTORNEY_PDFFILE,
- </if>
- <if test="deleteName != null">
- DELETE_NAME,
- </if>
- <if test="deleteTime != null">
- DELETE_TIME,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- <if test="attorneyDistributionStatus != null">
- ATTORNEY_DISTRIBUTION_STATUS,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="attorneyId != null">
- #{attorneyId,jdbcType=DECIMAL},
- </if>
- <if test="batchId != null">
- #{batchId,jdbcType=DECIMAL},
- </if>
- <if test="portId != null">
- #{portId,jdbcType=DECIMAL},
- </if>
- <if test="downSwimPortId != null">
- #{downSwimPortId,jdbcType=DECIMAL},
- </if>
- <if test="attorneyPickupContactPerson != null">
- #{attorneyPickupContactPerson,jdbcType=VARCHAR},
- </if>
- <if test="attorenyPickupIdcard != null">
- #{attorenyPickupIdcard,jdbcType=VARCHAR},
- </if>
- <if test="attorneyContactTelephone != null">
- #{attorneyContactTelephone,jdbcType=VARCHAR},
- </if>
- <if test="attorneyTime != null">
- #{attorneyTime,jdbcType=TIMESTAMP},
- </if>
- <if test="attorneyPdffile != null">
- #{attorneyPdffile,jdbcType=VARCHAR},
- </if>
- <if test="deleteName != null">
- #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- #{deleteTime,jdbcType=VARCHAR},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="attorneyDistributionStatus != null">
- #{attorneyDistributionStatus,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
- update AMSSHIP_DELIVERY_ATTORNEY
- set BATCH_ID = #{batchId,jdbcType=DECIMAL},
- PORT_ID = #{portId,jdbcType=DECIMAL},
- DOWN_SWIM_PORT_ID = #{downSwimPortId,jdbcType=DECIMAL},
- ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson,jdbcType=VARCHAR},
- ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard,jdbcType=VARCHAR},
- ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone,jdbcType=VARCHAR},
- ATTORNEY_TIME = #{attorneyTime,jdbcType=TIMESTAMP},
- ATTORNEY_PDFFILE = #{attorneyPdffile,jdbcType=VARCHAR},
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- DELETED = #{deleted,jdbcType=DECIMAL},
- ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL}
- where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
- update AMSSHIP_DELIVERY_ATTORNEY
- <set>
- <if test="batchId != null">
- BATCH_ID = #{batchId,jdbcType=DECIMAL},
- </if>
- <if test="portId != null">
- PORT_ID = #{portId,jdbcType=DECIMAL},
- </if>
- <if test="downSwimPortId != null">
- DOWN_SWIM_PORT_ID = #{downSwimPortId,jdbcType=DECIMAL},
- </if>
- <if test="attorneyPickupContactPerson != null">
- ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson,jdbcType=VARCHAR},
- </if>
- <if test="attorenyPickupIdcard != null">
- ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard,jdbcType=VARCHAR},
- </if>
- <if test="attorneyContactTelephone != null">
- ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone,jdbcType=VARCHAR},
- </if>
- <if test="attorneyTime != null">
- ATTORNEY_TIME = #{attorneyTime,jdbcType=TIMESTAMP},
- </if>
- <if test="attorneyPdffile != null">
- ATTORNEY_PDFFILE = #{attorneyPdffile,jdbcType=VARCHAR},
- </if>
- <if test="deleteName != null">
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="attorneyDistributionStatus != null">
- ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL},
- </if>
- </set>
- where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
- <include refid="select" />
- where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="where" />
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="whereLike" />
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into AMSSHIP_DELIVERY_ATTORNEY
- (ATTORNEY_ID,
- BATCH_ID, PORT_ID, DOWN_SWIM_PORT_ID,
- ATTORNEY_PICKUP_CONTACT_PERSON, ATTORENY_PICKUP_IDCARD,
- ATTORNEY_CONTACT_TELEPHONE, ATTORNEY_TIME,
- ATTORNEY_PDFFILE, DELETE_NAME,
- DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETED,
- ATTORNEY_DISTRIBUTION_STATUS)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.attorneyId,jdbcType=DECIMAL},
- #{item.batchId,jdbcType=DECIMAL}, #{item.portId,jdbcType=DECIMAL}, #{item.downSwimPortId,jdbcType=DECIMAL},
- #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}, #{item.attorenyPickupIdcard,jdbcType=VARCHAR},
- #{item.attorneyContactTelephone,jdbcType=VARCHAR}, #{item.attorneyTime,jdbcType=TIMESTAMP},
- #{item.attorneyPdffile,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
- #{item.deleteTime,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
- #{item.attorneyDistributionStatus,jdbcType=DECIMAL} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update AMSSHIP_DELIVERY_ATTORNEY
- set
- ATTORNEY_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyId,jdbcType=DECIMAL}
- </foreach>
- ,BATCH_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
- </foreach>
- ,PORT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
- </foreach>
- ,DOWN_SWIM_PORT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.downSwimPortId,jdbcType=DECIMAL}
- </foreach>
- ,ATTORNEY_PICKUP_CONTACT_PERSON=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}
- </foreach>
- ,ATTORENY_PICKUP_IDCARD=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorenyPickupIdcard,jdbcType=VARCHAR}
- </foreach>
- ,ATTORNEY_CONTACT_TELEPHONE=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyContactTelephone,jdbcType=VARCHAR}
- </foreach>
- ,ATTORNEY_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyTime,jdbcType=TIMESTAMP}
- </foreach>
- ,ATTORNEY_PDFFILE=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPdffile,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,ATTORNEY_DISTRIBUTION_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
- when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyDistributionStatus,jdbcType=DECIMAL}
- </foreach>
- where ATTORNEY_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.attorneyId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from AMSSHIP_DELIVERY_ATTORNEY
- where ATTORNEY_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!--展示货权转移列表-->
- <select id="selectshipCargoTranferResult" resultType="java.util.Map">
- select *
- from(select
- t3.SHIPPER_NAME "shipperName",
- t4.CARRIER_NAME "carrierName",
- t6.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
- t8.MATERIAL_NAME "materialName",
- t5.PORT_NAME "portName",
- t5.PORT_NAME "portName1",
- t1.ATTORNEY_PICKUP_CONTACT_PERSON "attorneyPickupContactPerson",
- t1.ATTORENY_PICKUP_IDCARD "attorneyPickupIdcard",
- t1.ATTORNEY_CONTACT_TELEPHONE "attorneyContactTelephone",
- t1.ATTORNEY_TIME "attorneyTime",
- t2.CARRIER_ID "carrierId",
- t2.REQUESTER_GROUP_ID "groupId",
- t1.ATTORNEY_ID "attorneyId",
- t1.BATCH_ID "batchId",
- t1.INSERT_TIME "insertTime",
- ALUMINA_CONTENT "purchaseOrderMaterialNumber"
- from AMSSHIP_DELIVERY_ATTORNEY t1
- left join AMSSHIP_DELIVERY_NOTICE t2
- on t1.BATCH_ID=t2.BATCH_ID
- left join RMS_SHIPPER t3
- on t2.REQUESTER_GROUP_ID=t3.SHIPPER_ID
- left join RMS_CARRIER t4
- on t2.CARRIER_ID=t4.CARRIER_ID
- left join RMS_PORT t5
- on t1.PORT_ID=t5.PORT_ID
- left join DIL_BATCH t6
- on t1.BATCH_ID=t6.BATCH_ID
- left join AMS_PURCHASE_ORDER t7
- on t6.BATCH_ID=t7.BATCH_ID
- left join RMS_MATERIAL t8
- on t6.MATERIAL_ID=t8.MATERIAL_ID
- left join AMSSHIP_CARGO_TRANSFER_RESULT ACTR
- on t1.BATCH_ID = ACTR.BATCH_ID
- where t1.deleted = 0 and t1.ATTORNEY_DISTRIBUTION_STATUS=#{status}
- )
- <where>
- <if test="shipperName!= null">
- and t3.SHIPPER_NAME in
- <foreach close=")" collection="shipperName" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="carrierName!= null">
- and t4.CARRIER_NAME in
- <foreach close=")" collection="carrierName" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="materialName!= null">
- and t8.MATERIAL_NAME in
- <foreach close=")" collection="materialName" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="portName!= null">
- and t5.PORT_NAME in
- <foreach close=")" collection="portName" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="portName1!= null">
- and t5.PORT_NAME in
- <foreach close=")" collection="portName1" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderByInsertTime" />
- </select>
- <!--根据时间排序-->
- <sql id="orderByInsertTime">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- <if test="orderField == null ">
- order by "insertTime" desc
- </if>
- </sql>
- <!-- 下拉框中获取收货人单位 -->
- <select id="getPortName" resultType="java.util.LinkedHashMap">
- select RP.PORT_ID "id",
- RP.PORT_ID "value",
- RP.PORT_NAME "label"
- from RMS_PORT RP
- WHERE RP.PORT_TYPE_ID = 1
- </select>
- <!-- 下拉框中获取放货通知单id-->
- <select id="getNoticeId" resultType="java.util.LinkedHashMap">
- select ADN.NOTICE_ID "id",
- ADN.NOTICE_ID "value",
- ADN.NOTICE_ID "label"
- from AMSSHIP_DELIVERY_NOTICE ADN
- </select>
- <!-- 根据主键id进行查询-->
- <select id="getDeliveryAttorneyId" resultType="java.util.Map">
- select t1.BATCH_ID "batchId",
- t1.PORT_ID "portId",
- t1.DOWN_SWIM_PORT_ID "downSwimPortId",
- t1.ATTORNEY_PICKUP_CONTACT_PERSON "attorneyPickupContactPerson",
- t1.ATTORENY_PICKUP_IDCARD "attorneyPickupIdcard",
- t1.ATTORNEY_CONTACT_TELEPHONE "attorneyContactTelephone",
- t1.ATTORNEY_TIME "attorneytime",
- t1.ATTORNEY_PDFFILE "attorneyPdffile"
- from AMSSHIP_DELIVERY_ATTORNEY t1
- where t1.ATTORNEY_ID = #{attorneyId}
- </select>
- <!--得到提货通知单id-->
- <select id="getAttorneyId" resultType="java.util.LinkedHashMap">
- SELECT ada.ATTORNEY_ID "id",
- ada.ATTORNEY_ID "value",
- ada.ATTORNEY_PICKUP_CONTACT_PERSON "label"
- FROM AMSSHIP_DELIVERY_ATTORNEY ada
- </select>
- <!--得到发件人id(港口)-->
- <select id="getPortId" resultType="java.util.LinkedHashMap">
- SELECT rp.PORT_ID "id",
- rp.PORT_ID "value",
- rp.PORT_NAME "label"
- FROM RMS_PORT rp
- </select>
- <!--得到收件人id(下游码头)-->
- <select id="getPierId" resultType="java.util.LinkedHashMap">
- SELECT rp.PIER_ID "id",
- rp.PIER_ID "value",
- rp.PIER_NAME "label"
- FROM RMS_PIER rp
- </select>
- <select id="getRmRawId" resultType="java.util.LinkedHashMap">
- SELECT rrmr.GM_ID "id",
- rrmr.GM_ID "value",
- rrmr.GM_TONNAGE "label"
- FROM WMSH_GRID_MATERIAL rrmr
- </select>
- </mapper>
|