123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707 |
- <?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.RmsConsigneeMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsConsignee">
- <id column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
- <result column="CONSIGNEE_COMPANY_NAME" jdbcType="VARCHAR" property="consigneeCompanyName" />
- <result column="CONSIGNEE_ABBREVIATION" jdbcType="VARCHAR" property="consigneeAbbreviation" />
- <result column="CONSIGNEE_REGISTERED_ADDRESS" jdbcType="VARCHAR" property="consigneeRegisteredAddress" />
- <result column="CONSIGNEE_RECEIVE_ADDRESS" jdbcType="VARCHAR" property="consigneeReceiveAddress" />
- <result column="CONSIGNEE_REGISTRATION_TIME" jdbcType="TIMESTAMP" property="consigneeRegistrationTime" />
- <result column="CONSIGNEE_CONTACT_NAME" jdbcType="VARCHAR" property="consigneeContactName" />
- <result column="CONSIGNEE_WARRANTY_AMOUNT" jdbcType="DECIMAL" property="consigneeWarrantyAmount" />
- <result column="CONSIGNEE_WARRANTY_WEIGHT" jdbcType="VARCHAR" property="consigneeWarrantyWeight" />
- <result column="CONSIGNEE_CONTACT_TEL" jdbcType="VARCHAR" property="consigneeContactTel" />
- <result column="CONSIGNEE_EXCHANGE_DELIVERY" jdbcType="DECIMAL" property="consigneeExchangeDelivery" />
- <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="EAS_CONSIGNEE_ID" jdbcType="VARCHAR" property="easConsigneeId" />
- <result column="CONSIGNEE_CODE" jdbcType="VARCHAR" property="consigneeCode" />
- <result column="CONSIGNEE_FAR_ID" jdbcType="DECIMAL" property="consigneeFarId" />
- <result column="AREA_ID" jdbcType="DECIMAL" property="areaId" />
- <result column="CONSIGNEE_SSO_ID" jdbcType="VARCHAR" property="consigneeSsoId" />
- <result column="CONSIGNEE_SSO_CODE" jdbcType="VARCHAR" property="consigneeSsoCode" />
- </resultMap>
- <sql id="columns">
- CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
- CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
- CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
- CONSIGNEE_CODE, CONSIGNEE_FAR_ID, AREA_ID, CONSIGNEE_SSO_ID, CONSIGNEE_SSO_CODE
- </sql>
- <sql id="columns_alias">
- t.CONSIGNEE_ID, t.CONSIGNEE_COMPANY_NAME, t.CONSIGNEE_ABBREVIATION, t.CONSIGNEE_REGISTERED_ADDRESS,
- t.CONSIGNEE_RECEIVE_ADDRESS, t.CONSIGNEE_REGISTRATION_TIME, t.CONSIGNEE_CONTACT_NAME,
- t.CONSIGNEE_WARRANTY_AMOUNT, t.CONSIGNEE_WARRANTY_WEIGHT, t.CONSIGNEE_CONTACT_TEL,
- t.CONSIGNEE_EXCHANGE_DELIVERY, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID, t.CONSIGNEE_CODE,
- t.CONSIGNEE_FAR_ID, t.AREA_ID, t.CONSIGNEE_SSO_ID, t.CONSIGNEE_SSO_CODE
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM RMS_CONSIGNEE
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM RMS_CONSIGNEE t
- </sql>
- <sql id="where">
- <where>
- <if test="consigneeId != null">
- and CONSIGNEE_ID = #{consigneeId}
- </if>
- <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
- and CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
- </if>
- <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
- and CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
- </if>
- <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
- and CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
- </if>
- <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
- and CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
- </if>
- <if test="consigneeRegistrationTime != null">
- and TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = #{consigneeRegistrationTime}
- </if>
- <if test="consigneeContactName != null and consigneeContactName != ''">
- and CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
- </if>
- <if test="consigneeWarrantyAmount != null">
- and CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
- </if>
- <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
- and CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
- </if>
- <if test="consigneeContactTel != null and consigneeContactTel != ''">
- and CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
- </if>
- <if test="consigneeExchangeDelivery != null">
- and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
- </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="easConsigneeId != null and easConsigneeId != ''">
- and EAS_CONSIGNEE_ID = #{easConsigneeId}
- </if>
- <if test="consigneeCode != null and consigneeCode != ''">
- and CONSIGNEE_CODE = #{consigneeCode}
- </if>
- <if test="consigneeFarId != null">
- and CONSIGNEE_FAR_ID = #{consigneeFarId}
- </if>
- <if test="areaId != null">
- and AREA_ID = #{areaId}
- </if>
- <if test="consigneeSsoId != null and consigneeSsoId != ''">
- and CONSIGNEE_SSO_ID = #{consigneeSsoId}
- </if>
- <if test="consigneeSsoCode != null and consigneeSsoCode != ''">
- and CONSIGNEE_SSO_CODE = #{consigneeSsoCode}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="consigneeId != null">
- and CONSIGNEE_ID = #{consigneeId}
- </if>
- <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
- and CONSIGNEE_COMPANY_NAME LIKE '%${consigneeCompanyName}%'
- </if>
- <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
- and CONSIGNEE_ABBREVIATION LIKE '%${consigneeAbbreviation}%'
- </if>
- <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
- and CONSIGNEE_REGISTERED_ADDRESS LIKE '%${consigneeRegisteredAddress}%'
- </if>
- <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
- and CONSIGNEE_RECEIVE_ADDRESS LIKE '%${consigneeReceiveAddress}%'
- </if>
- <if test="consigneeRegistrationTime != null">
- and TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = #{consigneeRegistrationTime}
- </if>
- <if test="consigneeContactName != null and consigneeContactName != ''">
- and CONSIGNEE_CONTACT_NAME LIKE '%${consigneeContactName}%'
- </if>
- <if test="consigneeWarrantyAmount != null">
- and CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
- </if>
- <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
- and CONSIGNEE_WARRANTY_WEIGHT LIKE '%${consigneeWarrantyWeight}%'
- </if>
- <if test="consigneeContactTel != null and consigneeContactTel != ''">
- and CONSIGNEE_CONTACT_TEL LIKE '%${consigneeContactTel}%'
- </if>
- <if test="consigneeExchangeDelivery != null">
- and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
- </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="easConsigneeId != null and easConsigneeId != ''">
- and EAS_CONSIGNEE_ID LIKE '%${easConsigneeId}%'
- </if>
- <if test="consigneeCode != null and consigneeCode != ''">
- and CONSIGNEE_CODE LIKE '%${consigneeCode}%'
- </if>
- <if test="consigneeFarId != null">
- and CONSIGNEE_FAR_ID = #{consigneeFarId}
- </if>
- <if test="areaId != null">
- and AREA_ID = #{areaId}
- </if>
- <if test="consigneeSsoId != null and consigneeSsoId != ''">
- and CONSIGNEE_SSO_ID LIKE '%${consigneeSsoId}%'
- </if>
- <if test="consigneeSsoCode != null and consigneeSsoCode != ''">
- and CONSIGNEE_SSO_CODE LIKE '%${consigneeSsoCode}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from RMS_CONSIGNEE
- where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from RMS_CONSIGNEE
- where 1!=1
- <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
- or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
- </if>
- <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
- or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
- </if>
- <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
- or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
- </if>
- <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
- or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
- </if>
- <if test="consigneeRegistrationTime != null">
- or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
- </if>
- <if test="consigneeContactName != null and consigneeContactName != ''">
- or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
- </if>
- <if test="consigneeWarrantyAmount != null">
- or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
- </if>
- <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
- or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
- </if>
- <if test="consigneeContactTel != null and consigneeContactTel != ''">
- or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
- </if>
- <if test="consigneeExchangeDelivery != null">
- or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
- </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="easConsigneeId != null and easConsigneeId != ''">
- or EAS_CONSIGNEE_ID = #{easConsigneeId}
- </if>
- <if test="consigneeCode != null and consigneeCode != ''">
- or CONSIGNEE_CODE = #{consigneeCode}
- </if>
- <if test="consigneeFarId != null">
- or CONSIGNEE_FAR_ID = #{consigneeFarId}
- </if>
- <if test="areaId != null">
- or AREA_ID = #{areaId}
- </if>
- <if test="consigneeSsoId != null and consigneeSsoId != ''">
- or CONSIGNEE_SSO_ID = #{consigneeSsoId}
- </if>
- <if test="consigneeSsoCode != null and consigneeSsoCode != ''">
- or CONSIGNEE_SSO_CODE = #{consigneeSsoCode}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
- insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME,
- CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
- CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME,
- CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
- CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL,
- CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
- CONSIGNEE_CODE, CONSIGNEE_FAR_ID, AREA_ID,
- CONSIGNEE_SSO_ID, CONSIGNEE_SSO_CODE)
- values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR},
- #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR},
- #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
- #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL},
- #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=VARCHAR},
- #{consigneeExchangeDelivery,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
- #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
- #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easConsigneeId,jdbcType=VARCHAR},
- #{consigneeCode,jdbcType=VARCHAR}, #{consigneeFarId,jdbcType=DECIMAL}, #{areaId,jdbcType=DECIMAL},
- #{consigneeSsoId,jdbcType=VARCHAR}, #{consigneeSsoCode,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
- insert into RMS_CONSIGNEE
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="consigneeId != null">
- CONSIGNEE_ID,
- </if>
- <if test="consigneeCompanyName != null">
- CONSIGNEE_COMPANY_NAME,
- </if>
- <if test="consigneeAbbreviation != null">
- CONSIGNEE_ABBREVIATION,
- </if>
- <if test="consigneeRegisteredAddress != null">
- CONSIGNEE_REGISTERED_ADDRESS,
- </if>
- <if test="consigneeReceiveAddress != null">
- CONSIGNEE_RECEIVE_ADDRESS,
- </if>
- <if test="consigneeRegistrationTime != null">
- CONSIGNEE_REGISTRATION_TIME,
- </if>
- <if test="consigneeContactName != null">
- CONSIGNEE_CONTACT_NAME,
- </if>
- <if test="consigneeWarrantyAmount != null">
- CONSIGNEE_WARRANTY_AMOUNT,
- </if>
- <if test="consigneeWarrantyWeight != null">
- CONSIGNEE_WARRANTY_WEIGHT,
- </if>
- <if test="consigneeContactTel != null">
- CONSIGNEE_CONTACT_TEL,
- </if>
- <if test="consigneeExchangeDelivery != null">
- CONSIGNEE_EXCHANGE_DELIVERY,
- </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="easConsigneeId != null">
- EAS_CONSIGNEE_ID,
- </if>
- <if test="consigneeCode != null">
- CONSIGNEE_CODE,
- </if>
- <if test="consigneeFarId != null">
- CONSIGNEE_FAR_ID,
- </if>
- <if test="areaId != null">
- AREA_ID,
- </if>
- <if test="consigneeSsoId != null">
- CONSIGNEE_SSO_ID,
- </if>
- <if test="consigneeSsoCode != null">
- CONSIGNEE_SSO_CODE,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="consigneeId != null">
- #{consigneeId,jdbcType=DECIMAL},
- </if>
- <if test="consigneeCompanyName != null">
- #{consigneeCompanyName,jdbcType=VARCHAR},
- </if>
- <if test="consigneeAbbreviation != null">
- #{consigneeAbbreviation,jdbcType=VARCHAR},
- </if>
- <if test="consigneeRegisteredAddress != null">
- #{consigneeRegisteredAddress,jdbcType=VARCHAR},
- </if>
- <if test="consigneeReceiveAddress != null">
- #{consigneeReceiveAddress,jdbcType=VARCHAR},
- </if>
- <if test="consigneeRegistrationTime != null">
- #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="consigneeContactName != null">
- #{consigneeContactName,jdbcType=VARCHAR},
- </if>
- <if test="consigneeWarrantyAmount != null">
- #{consigneeWarrantyAmount,jdbcType=DECIMAL},
- </if>
- <if test="consigneeWarrantyWeight != null">
- #{consigneeWarrantyWeight,jdbcType=VARCHAR},
- </if>
- <if test="consigneeContactTel != null">
- #{consigneeContactTel,jdbcType=VARCHAR},
- </if>
- <if test="consigneeExchangeDelivery != null">
- #{consigneeExchangeDelivery,jdbcType=DECIMAL},
- </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="easConsigneeId != null">
- #{easConsigneeId,jdbcType=VARCHAR},
- </if>
- <if test="consigneeCode != null">
- #{consigneeCode,jdbcType=VARCHAR},
- </if>
- <if test="consigneeFarId != null">
- #{consigneeFarId,jdbcType=DECIMAL},
- </if>
- <if test="areaId != null">
- #{areaId,jdbcType=DECIMAL},
- </if>
- <if test="consigneeSsoId != null">
- #{consigneeSsoId,jdbcType=VARCHAR},
- </if>
- <if test="consigneeSsoCode != null">
- #{consigneeSsoCode,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
- update RMS_CONSIGNEE
- set CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
- CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
- CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
- CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
- CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
- CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
- CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
- CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
- CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
- CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
- 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},
- EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
- CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
- CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL},
- AREA_ID = #{areaId,jdbcType=DECIMAL},
- CONSIGNEE_SSO_ID = #{consigneeSsoId,jdbcType=VARCHAR},
- CONSIGNEE_SSO_CODE = #{consigneeSsoCode,jdbcType=VARCHAR}
- where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
- update RMS_CONSIGNEE
- <set>
- <if test="consigneeCompanyName != null">
- CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
- </if>
- <if test="consigneeAbbreviation != null">
- CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
- </if>
- <if test="consigneeRegisteredAddress != null">
- CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
- </if>
- <if test="consigneeReceiveAddress != null">
- CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
- </if>
- <if test="consigneeRegistrationTime != null">
- CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="consigneeContactName != null">
- CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
- </if>
- <if test="consigneeWarrantyAmount != null">
- CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
- </if>
- <if test="consigneeWarrantyWeight != null">
- CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
- </if>
- <if test="consigneeContactTel != null">
- CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
- </if>
- <if test="consigneeExchangeDelivery != null">
- CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
- </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="easConsigneeId != null">
- EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
- </if>
- <if test="consigneeCode != null">
- CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
- </if>
- <if test="consigneeFarId != null">
- CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL},
- </if>
- <if test="areaId != null">
- AREA_ID = #{areaId,jdbcType=DECIMAL},
- </if>
- <if test="consigneeSsoId != null">
- CONSIGNEE_SSO_ID = #{consigneeSsoId,jdbcType=VARCHAR},
- </if>
- <if test="consigneeSsoCode != null">
- CONSIGNEE_SSO_CODE = #{consigneeSsoCode,jdbcType=VARCHAR},
- </if>
- </set>
- where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- <include refid="select" />
- where CONSIGNEE_ID = #{consigneeId,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 RMS_CONSIGNEE
- (CONSIGNEE_ID,
- CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION,
- CONSIGNEE_REGISTERED_ADDRESS, CONSIGNEE_RECEIVE_ADDRESS,
- CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME,
- CONSIGNEE_WARRANTY_AMOUNT, CONSIGNEE_WARRANTY_WEIGHT,
- CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETED,
- EAS_CONSIGNEE_ID, CONSIGNEE_CODE,
- CONSIGNEE_FAR_ID, AREA_ID, CONSIGNEE_SSO_ID,
- CONSIGNEE_SSO_CODE)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.consigneeId,jdbcType=DECIMAL},
- #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR},
- #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR},
- #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR},
- #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR},
- #{item.consigneeContactTel,jdbcType=VARCHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL},
- #{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.easConsigneeId,jdbcType=VARCHAR}, #{item.consigneeCode,jdbcType=VARCHAR},
- #{item.consigneeFarId,jdbcType=DECIMAL}, #{item.areaId,jdbcType=DECIMAL}, #{item.consigneeSsoId,jdbcType=VARCHAR},
- #{item.consigneeSsoCode,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update RMS_CONSIGNEE
- set
- CONSIGNEE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
- </foreach>
- ,CONSIGNEE_COMPANY_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_ABBREVIATION=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_REGISTERED_ADDRESS=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_RECEIVE_ADDRESS=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_REGISTRATION_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
- </foreach>
- ,CONSIGNEE_CONTACT_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_WARRANTY_AMOUNT=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
- </foreach>
- ,CONSIGNEE_WARRANTY_WEIGHT=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_CONTACT_TEL=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_EXCHANGE_DELIVERY=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,EAS_CONSIGNEE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_CODE=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCode,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_FAR_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeFarId,jdbcType=DECIMAL}
- </foreach>
- ,AREA_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.areaId,jdbcType=DECIMAL}
- </foreach>
- ,CONSIGNEE_SSO_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeSsoId,jdbcType=VARCHAR}
- </foreach>
- ,CONSIGNEE_SSO_CODE=
- <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
- when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeSsoCode,jdbcType=VARCHAR}
- </foreach>
- where CONSIGNEE_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.consigneeId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from RMS_CONSIGNEE
- where CONSIGNEE_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="findReceiveId" resultType="java.math.BigDecimal">
- SELECT RC.CONSIGNEE_ID AS "receiveId"
- FROM RMS_CONSIGNEE RC
- WHERE RC.CONSIGNEE_COMPANY_NAME = #{consigneeName}
- FETCH NEXT 1 ROWS ONLY
- </select>
- <update id="updateConsigneeSettled">
- UPDATE RMS_CONSIGNEE RC
- SET RC.CONSIGNEE_SETTLEMENT_METHOD = #{settleMothod}
- WHERE RC.CONSIGNEE_ID = #{receiveId}
- </update>
- <select id="selectSettleMethod" resultType="java.util.Map" parameterType="java.math.BigDecimal">
- SELECT RC.CONSIGNEE_SETTLEMENT_METHOD "settleMethod", RC.CONSIGNEE_SSO_ID "userId" FROM RMS_CONSIGNEE RC
- WHERE RC.CONSIGNEE_ID = #{receiveId}
- </select>
- <select id="getConsigneeIdByName" resultType="java.lang.Integer" parameterType="string">
- SELECT COUNT(RC.CONSIGNEE_ID) FROM RMS_CONSIGNEE RC
- WHERE RC.DELETED = 0
- AND RC.CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
- </select>
- </mapper>
|