|
@@ -21,20 +21,22 @@
|
|
|
<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" />
|
|
|
</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_CODE, CONSIGNEE_FAR_ID
|
|
|
</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.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID, t.CONSIGNEE_CODE,
|
|
|
+ t.CONSIGNEE_FAR_ID
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM RMS_CONSIGNEE
|
|
@@ -101,6 +103,9 @@
|
|
|
<if test="consigneeCode != null and consigneeCode != ''">
|
|
|
and CONSIGNEE_CODE = #{consigneeCode}
|
|
|
</if>
|
|
|
+ <if test="consigneeFarId != null">
|
|
|
+ and CONSIGNEE_FAR_ID = #{consigneeFarId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -162,6 +167,9 @@
|
|
|
<if test="consigneeCode != null and consigneeCode != ''">
|
|
|
and CONSIGNEE_CODE LIKE '%${consigneeCode}%'
|
|
|
</if>
|
|
|
+ <if test="consigneeFarId != null">
|
|
|
+ and CONSIGNEE_FAR_ID = #{consigneeFarId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
@@ -225,6 +233,9 @@
|
|
|
<if test="consigneeCode != null and consigneeCode != ''">
|
|
|
or CONSIGNEE_CODE = #{consigneeCode}
|
|
|
</if>
|
|
|
+ <if test="consigneeFarId != null">
|
|
|
+ or CONSIGNEE_FAR_ID = #{consigneeFarId}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
|
|
|
insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME,
|
|
@@ -235,7 +246,7 @@
|
|
|
CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
|
|
|
- CONSIGNEE_CODE)
|
|
|
+ CONSIGNEE_CODE, CONSIGNEE_FAR_ID)
|
|
|
values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR},
|
|
|
#{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR},
|
|
|
#{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
|
|
@@ -244,7 +255,7 @@
|
|
|
#{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})
|
|
|
+ #{consigneeCode,jdbcType=VARCHAR}, #{consigneeFarId,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
|
|
|
insert into RMS_CONSIGNEE
|
|
@@ -306,6 +317,9 @@
|
|
|
<if test="consigneeCode != null">
|
|
|
CONSIGNEE_CODE,
|
|
|
</if>
|
|
|
+ <if test="consigneeFarId != null">
|
|
|
+ CONSIGNEE_FAR_ID,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="consigneeId != null">
|
|
@@ -365,6 +379,9 @@
|
|
|
<if test="consigneeCode != null">
|
|
|
#{consigneeCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="consigneeFarId != null">
|
|
|
+ #{consigneeFarId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
|
|
@@ -386,7 +403,8 @@
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
|
|
|
- CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR}
|
|
|
+ CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
|
|
|
+ CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL}
|
|
|
where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
|
|
@@ -446,10 +464,13 @@
|
|
|
<if test="consigneeCode != null">
|
|
|
CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="consigneeFarId != null">
|
|
|
+ CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -472,8 +493,8 @@
|
|
|
INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETED,
|
|
|
- EAS_CONSIGNEE_ID, CONSIGNEE_CODE
|
|
|
- )
|
|
|
+ EAS_CONSIGNEE_ID, CONSIGNEE_CODE,
|
|
|
+ CONSIGNEE_FAR_ID)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.consigneeId,jdbcType=DECIMAL},
|
|
@@ -485,8 +506,8 @@
|
|
|
#{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}
|
|
|
- from dual
|
|
|
+ #{item.easConsigneeId,jdbcType=VARCHAR}, #{item.consigneeCode,jdbcType=VARCHAR},
|
|
|
+ #{item.consigneeFarId,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -568,6 +589,10 @@
|
|
|
<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>
|
|
|
where CONSIGNEE_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.consigneeId,jdbcType=DECIMAL}
|
|
@@ -582,76 +607,76 @@
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
- <select id="getConsigneeList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
- SELECT *
|
|
|
- FROM (
|
|
|
- SELECT
|
|
|
- RC.CONSIGNEE_ID AS "consigneeId",
|
|
|
- RC.CONSIGNEE_COMPANY_NAME AS "companyName",
|
|
|
- RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
|
|
|
- RC.CONSIGNEE_REGISTERED_ADDRESS AS "consigneeRegisteredAddress",
|
|
|
- RC.CONSIGNEE_RECEIVE_ADDRESS AS "consigneeReceiveAddress",
|
|
|
- RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
|
|
|
- RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
|
|
|
- RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel"
|
|
|
- FROM RMS_CONSIGNEE RC
|
|
|
- WHERE RC.DELETED!=1
|
|
|
- ORDER BY RC.INSERT_TIME DESC
|
|
|
- )
|
|
|
- WHERE rownum < 100
|
|
|
- <where>
|
|
|
- <if test="companyName!= null">
|
|
|
- and
|
|
|
- <foreach collection="companyName" item="item" open="(" separator="," close=")">
|
|
|
- "companyName" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeAbbreviation!= null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeAbbreviation" item="item" open="(" separator="," close=")">
|
|
|
- "consigneeAbbreviation" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeRegisteredAddress!= null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeRegisteredAddress" item="item" open="(" separator="," close=")">
|
|
|
- "consigneeRegisteredAddress" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeReceiveAddress= null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeReceiveAddress" item="item" open="(" separator="," close=")">
|
|
|
- "consigneeReceiveAddress" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeRegistrationTime!= null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeRegistrationTime" item="item" open="(" separator="," close=")">
|
|
|
- "consigneeRegistrationTime" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeContactName!= null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeContactName" item="item" open="(" separator="," close=")">
|
|
|
- "consigneeContactName" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="consigneeContactTel!= null">
|
|
|
- and
|
|
|
- <foreach collection="consigneeContactTel" item="item" open="(" separator="," close=")">
|
|
|
- "consigneeContactTel" in #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- <include refid="orderBy"></include>
|
|
|
- </select>
|
|
|
+ <select id="getConsigneeList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
+ SELECT *
|
|
|
+ FROM (
|
|
|
+ SELECT
|
|
|
+ RC.CONSIGNEE_ID AS "consigneeId",
|
|
|
+ RC.CONSIGNEE_COMPANY_NAME AS "companyName",
|
|
|
+ RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
|
|
|
+ RC.CONSIGNEE_REGISTERED_ADDRESS AS "consigneeRegisteredAddress",
|
|
|
+ RC.CONSIGNEE_RECEIVE_ADDRESS AS "consigneeReceiveAddress",
|
|
|
+ RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
|
|
|
+ RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
|
|
|
+ RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel"
|
|
|
+ FROM RMS_CONSIGNEE RC
|
|
|
+ WHERE RC.DELETED!=1
|
|
|
+ ORDER BY RC.INSERT_TIME DESC
|
|
|
+ )
|
|
|
+ WHERE rownum < 100
|
|
|
+ <where>
|
|
|
+ <if test="companyName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="companyName" item="item" open="(" separator="," close=")">
|
|
|
+ "companyName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeAbbreviation!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeAbbreviation" item="item" open="(" separator="," close=")">
|
|
|
+ "consigneeAbbreviation" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeRegisteredAddress!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeRegisteredAddress" item="item" open="(" separator="," close=")">
|
|
|
+ "consigneeRegisteredAddress" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeReceiveAddress= null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeReceiveAddress" item="item" open="(" separator="," close=")">
|
|
|
+ "consigneeReceiveAddress" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeRegistrationTime!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeRegistrationTime" item="item" open="(" separator="," close=")">
|
|
|
+ "consigneeRegistrationTime" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeContactName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeContactName" item="item" open="(" separator="," close=")">
|
|
|
+ "consigneeContactName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="consigneeContactTel!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="consigneeContactTel" item="item" open="(" separator="," close=")">
|
|
|
+ "consigneeContactTel" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
+ </select>
|
|
|
<sql id="orderBy">
|
|
|
- <if test="orderField!=null and orderField !=''">
|
|
|
- order by "${orderField}"
|
|
|
- <if test="orderType !=null and orderType !=''">
|
|
|
- ${orderType}
|
|
|
+ <if test="orderField!=null and orderField !=''">
|
|
|
+ order by "${orderField}"
|
|
|
+ <if test="orderType !=null and orderType !=''">
|
|
|
+ ${orderType}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
- </if>
|
|
|
</sql>
|
|
|
|
|
|
|
|
@@ -680,4 +705,12 @@
|
|
|
and RC.DELETED!=1
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getConsigneeFarId" resultType="java.util.Map" parameterType="java.lang.String">
|
|
|
+ select
|
|
|
+ RC.CONSIGNEE_FAR_ID as "consigneeFarId",
|
|
|
+ RC.CONSIGNEE_COMPANY_NAME as "consigneeCompanyName"
|
|
|
+ from RMS_CONSIGNEE RC
|
|
|
+ where RC.CONSIGNEE_FAR_ID=RC.CONSIGNEE_ID
|
|
|
+ and RC.CONSIGNEE_COMPANY_NAME like #{state}
|
|
|
+ </select>
|
|
|
</mapper>
|