|
@@ -0,0 +1,493 @@
|
|
|
|
+<?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.BmsportHandlingFeeMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.BmsportHandlingFee">
|
|
|
|
+ <id column="FEE_ID" jdbcType="DECIMAL" property="feeId"/>
|
|
|
|
+ <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId"/>
|
|
|
|
+ <result column="FEE_FOREIGN_SHIP_NAME" jdbcType="VARCHAR" property="feeForeignShipName"/>
|
|
|
|
+ <result column="FEE_MATERIAL_TONNAGE" jdbcType="DECIMAL" property="feeMaterialTonnage"/>
|
|
|
|
+ <result column="PRICE_ID" jdbcType="DECIMAL" property="priceId"/>
|
|
|
|
+ <result column="FEE_VALUE" jdbcType="DECIMAL" property="feeValue"/>
|
|
|
|
+ <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"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="columns">
|
|
|
|
+ FEE_ID, MATERIAL_ID, FEE_FOREIGN_SHIP_NAME, FEE_MATERIAL_TONNAGE, PRICE_ID, FEE_VALUE,
|
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
|
+ DELETED
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
+ t.FEE_ID, t.MATERIAL_ID, t.FEE_FOREIGN_SHIP_NAME, t.FEE_MATERIAL_TONNAGE, t.PRICE_ID,
|
|
|
|
+ t.FEE_VALUE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
|
|
+ t.INSERT_UPDATE_REMARK, t.DELETED
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select">
|
|
|
|
+ SELECT
|
|
|
|
+ <include refid="columns"/>
|
|
|
|
+ FROM BMSPORT_HANDLING_FEE
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
+ SELECT
|
|
|
|
+ <include refid="columns_alias"/>
|
|
|
|
+ FROM BMSPORT_HANDLING_FEE t
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="where">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="feeId != null">
|
|
|
|
+ and FEE_ID = #{feeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ and MATERIAL_ID = #{materialId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName != null and feeForeignShipName != ''">
|
|
|
|
+ and FEE_FOREIGN_SHIP_NAME = #{feeForeignShipName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeMaterialTonnage != null">
|
|
|
|
+ and FEE_MATERIAL_TONNAGE = #{feeMaterialTonnage}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ and PRICE_ID = #{priceId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue != null">
|
|
|
|
+ and FEE_VALUE = #{feeValue}
|
|
|
|
+ </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>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="feeId != null">
|
|
|
|
+ and FEE_ID = #{feeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ and MATERIAL_ID = #{materialId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName != null and feeForeignShipName != ''">
|
|
|
|
+ and FEE_FOREIGN_SHIP_NAME LIKE '%${feeForeignShipName}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeMaterialTonnage != null">
|
|
|
|
+ and FEE_MATERIAL_TONNAGE = #{feeMaterialTonnage}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ and PRICE_ID = #{priceId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue != null">
|
|
|
|
+ and FEE_VALUE = #{feeValue}
|
|
|
|
+ </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>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
|
+ delete
|
|
|
|
+ from BMSPORT_HANDLING_FEE
|
|
|
|
+ where FEE_ID = #{feeId,jdbcType=DECIMAL}
|
|
|
|
+ </delete>
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
+ delete from BMSPORT_HANDLING_FEE
|
|
|
|
+ where 1!=1
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ or MATERIAL_ID = #{materialId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName != null and feeForeignShipName != ''">
|
|
|
|
+ or FEE_FOREIGN_SHIP_NAME = #{feeForeignShipName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeMaterialTonnage != null">
|
|
|
|
+ or FEE_MATERIAL_TONNAGE = #{feeMaterialTonnage}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ or PRICE_ID = #{priceId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue != null">
|
|
|
|
+ or FEE_VALUE = #{feeValue}
|
|
|
|
+ </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>
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.BmsportHandlingFee">
|
|
|
|
+ insert into BMSPORT_HANDLING_FEE (FEE_ID, MATERIAL_ID, FEE_FOREIGN_SHIP_NAME,
|
|
|
|
+ FEE_MATERIAL_TONNAGE, PRICE_ID, FEE_VALUE,
|
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED)
|
|
|
|
+ values (#{feeId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{feeForeignShipName,jdbcType=VARCHAR},
|
|
|
|
+ #{feeMaterialTonnage,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{feeValue,jdbcType=DECIMAL},
|
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmsportHandlingFee">
|
|
|
|
+ insert into BMSPORT_HANDLING_FEE
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="feeId != null">
|
|
|
|
+ FEE_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ MATERIAL_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName != null">
|
|
|
|
+ FEE_FOREIGN_SHIP_NAME,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeMaterialTonnage != null">
|
|
|
|
+ FEE_MATERIAL_TONNAGE,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ PRICE_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue != null">
|
|
|
|
+ FEE_VALUE,
|
|
|
|
+ </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>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="feeId != null">
|
|
|
|
+ #{feeId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName != null">
|
|
|
|
+ #{feeForeignShipName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeMaterialTonnage != null">
|
|
|
|
+ #{feeMaterialTonnage,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ #{priceId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue != null">
|
|
|
|
+ #{feeValue,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>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmsportHandlingFee">
|
|
|
|
+ update BMSPORT_HANDLING_FEE
|
|
|
|
+ set MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ FEE_FOREIGN_SHIP_NAME = #{feeForeignShipName,jdbcType=VARCHAR},
|
|
|
|
+ FEE_MATERIAL_TONNAGE = #{feeMaterialTonnage,jdbcType=DECIMAL},
|
|
|
|
+ PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
|
|
+ FEE_VALUE = #{feeValue,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}
|
|
|
|
+ where FEE_ID = #{feeId,jdbcType=DECIMAL}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmsportHandlingFee">
|
|
|
|
+ update BMSPORT_HANDLING_FEE
|
|
|
|
+ <set>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName != null">
|
|
|
|
+ FEE_FOREIGN_SHIP_NAME = #{feeForeignShipName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeMaterialTonnage != null">
|
|
|
|
+ FEE_MATERIAL_TONNAGE = #{feeMaterialTonnage,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue != null">
|
|
|
|
+ FEE_VALUE = #{feeValue,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>
|
|
|
|
+ </set>
|
|
|
|
+ where FEE_ID = #{feeId,jdbcType=DECIMAL}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
|
+ <include refid="select"/>
|
|
|
|
+ where FEE_ID = #{feeId,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 BMSPORT_HANDLING_FEE
|
|
|
|
+ (FEE_ID,
|
|
|
|
+ MATERIAL_ID, FEE_FOREIGN_SHIP_NAME,
|
|
|
|
+ FEE_MATERIAL_TONNAGE, PRICE_ID,
|
|
|
|
+ FEE_VALUE, INSERT_USERNAME, INSERT_TIME,
|
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME,
|
|
|
|
+ INSERT_UPDATE_REMARK, DELETED)
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
+ select
|
|
|
|
+ #{item.feeId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.materialId,jdbcType=DECIMAL}, #{item.feeForeignShipName,jdbcType=VARCHAR},
|
|
|
|
+ #{item.feeMaterialTonnage,jdbcType=DECIMAL}, #{item.priceId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.feeValue,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} from dual
|
|
|
|
+ </foreach> )
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
+ update BMSPORT_HANDLING_FEE
|
|
|
|
+ set
|
|
|
|
+ FEE_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.feeId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,MATERIAL_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,FEE_FOREIGN_SHIP_NAME=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.feeForeignShipName,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,FEE_MATERIAL_TONNAGE=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.feeMaterialTonnage,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,PRICE_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,FEE_VALUE=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.feeValue,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,INSERT_USERNAME=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,INSERT_TIME=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATE_TIME=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,DELETED=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case FEE_ID" close="end">
|
|
|
|
+ when #{item.feeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ where FEE_ID in
|
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
+ #{item.feeId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ </update>
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
+ delete from BMSPORT_HANDLING_FEE
|
|
|
|
+ where FEE_ID in
|
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
+ <!-- 查询最大id -->
|
|
|
|
+ <select id="selectMaxId" resultType="DECIMAL">
|
|
|
|
+ SELECT MAX(FEE_ID)
|
|
|
|
+ FROM BMSPORT_HANDLING_FEE
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!-- 得到港口装卸费价格id -->
|
|
|
|
+ <select id="getPriceId" resultType="java.util.Map">
|
|
|
|
+ SELECT acop.PRICE_ID as "priceId"
|
|
|
|
+ FROM AMS_CONTRACT_OTHER_PRICE acop
|
|
|
|
+ WHERE acop.PRICE_TYPE = '港口装卸单价'
|
|
|
|
+ ORDER BY acop.UPDATE_TIME
|
|
|
|
+ </select>
|
|
|
|
+ <sql id="orderBy">
|
|
|
|
+ <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="getPortHandlingFeeList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
|
+ SELECT *
|
|
|
|
+ FROM (
|
|
|
|
+ SELECT
|
|
|
|
+ bhf.INSERT_TIME as "insertTime",
|
|
|
|
+ bhf.FEE_ID as "feeId",
|
|
|
|
+ rm.MATERIAL_NAME as "materialName",
|
|
|
|
+ bhf.FEE_FOREIGN_SHIP_NAME as "feeForeignShipName",
|
|
|
|
+ bhf.FEE_VALUE as "feeValue"
|
|
|
|
+ FROM BMSPORT_HANDLING_FEE bhf
|
|
|
|
+ LEFT JOIN RMS_MATERIAL rm
|
|
|
|
+ ON rm.MATERIAL_ID = bhf.MATERIAL_ID
|
|
|
|
+ WHERE bhf.DELETED = 0
|
|
|
|
+ )
|
|
|
|
+ <where>
|
|
|
|
+ <if test="materialName!= null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="," close=")">
|
|
|
|
+ "materialName" in #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeForeignShipName!= null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="feeForeignShipName" item="item" open="(" separator="," close=")">
|
|
|
|
+ "feeForeignShipName" in #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="feeValue!= null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="feeValue" item="item" open="(" separator="," close=")">
|
|
|
|
+ "feeValue" in #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ <include refid="orderBy"></include>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!-- 查询修改渲染数据 -->
|
|
|
|
+ <select id="getFeeToUpdate" parameterType="DECIMAL" resultType="java.util.Map">
|
|
|
|
+ SELECT bhf.MATERIAL_ID as "materialId",
|
|
|
|
+ bhf.FEE_FOREIGN_SHIP_NAME as "feeForeignShipName",
|
|
|
|
+ bhf.FEE_MATERIAL_TONNAGE as "feeMaterialTonnage",
|
|
|
|
+ bhf.PRICE_ID as "priceId",
|
|
|
|
+ bhf.FEE_VALUE as "feeValue"
|
|
|
|
+ FROM BMSPORT_HANDLING_FEE bhf
|
|
|
|
+-- LEFT JOIN RMS_MATERIAL rm
|
|
|
|
+-- ON rm.MATERIAL_ID = bhf.MATERIAL_ID
|
|
|
|
+-- LEFT JOIN AMS_CONTRACT_OTHER_PRICE acop
|
|
|
|
+-- ON acop.PRICE_ID = bhf.PRICE_ID
|
|
|
|
+ WHERE FEE_ID = #{feeId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!-- 下拉框 -->
|
|
|
|
+ <select id="getMaterialId" resultType="java.util.Map">
|
|
|
|
+ SELECT MATERIAL_ID "id",
|
|
|
|
+ MATERIAL_ID "value",
|
|
|
|
+ MATERIAL_NAME "label"
|
|
|
|
+ FROM RMS_MATERIAL
|
|
|
|
+ WHERE MATERIAL_TYPE_ID = 1
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectPriceId" resultType="java.util.Map">
|
|
|
|
+ SELECT PRICE_ID "id",
|
|
|
|
+ PRICE_ID "value",
|
|
|
|
+ PRICE_VALUE "label"
|
|
|
|
+ FROM AMS_CONTRACT_OTHER_PRICE
|
|
|
|
+ WHERE PRICE_TYPE = '港口装卸单价'
|
|
|
|
+ </select>
|
|
|
|
+</mapper>
|