|
@@ -1,423 +1,471 @@
|
|
|
<?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.BmsshipDetailsOrderMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
- <id column="DETAILS_ID" jdbcType="DECIMAL" property="detailsId" />
|
|
|
- <result column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId" />
|
|
|
- <result column="DETAILS_NO" jdbcType="VARCHAR" property="detailsNo" />
|
|
|
- <result column="DETAILS_TIME" jdbcType="TIMESTAMP" property="detailsTime" />
|
|
|
- <result column="DETAILS_FEE_TYPE" jdbcType="VARCHAR" property="detailsFeeType" />
|
|
|
- <result column="DETAILS_AMOUNT" jdbcType="DECIMAL" property="detailsAmount" />
|
|
|
- <result column="WETHER_TO_STATEMENT" jdbcType="DECIMAL" property="wetherToStatement" />
|
|
|
- <result column="TRUCK_RESULT_TOTAL_ID" jdbcType="DECIMAL" property="truckResultTotalId" />
|
|
|
- <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" />
|
|
|
- </resultMap>
|
|
|
- <sql id="columns">
|
|
|
- DETAILS_ID, PURCHASE_ORDER_ID, DETAILS_NO, DETAILS_TIME, DETAILS_FEE_TYPE, DETAILS_AMOUNT,
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
+ <id column="DETAILS_ID" jdbcType="DECIMAL" property="detailsId"/>
|
|
|
+ <result column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId"/>
|
|
|
+ <result column="DETAILS_NO" jdbcType="VARCHAR" property="detailsNo"/>
|
|
|
+ <result column="DETAILS_TIME" jdbcType="TIMESTAMP" property="detailsTime"/>
|
|
|
+ <result column="DETAILS_FEE_TYPE" jdbcType="VARCHAR" property="detailsFeeType"/>
|
|
|
+ <result column="DETAILS_AMOUNT" jdbcType="DECIMAL" property="detailsAmount"/>
|
|
|
+ <result column="WETHER_TO_STATEMENT" jdbcType="DECIMAL" property="wetherToStatement"/>
|
|
|
+ <result column="TRUCK_RESULT_TOTAL_ID" jdbcType="DECIMAL" property="truckResultTotalId"/>
|
|
|
+ <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"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ DETAILS_ID, PURCHASE_ORDER_ID, DETAILS_NO, DETAILS_TIME, DETAILS_FEE_TYPE, DETAILS_AMOUNT,
|
|
|
WETHER_TO_STATEMENT, TRUCK_RESULT_TOTAL_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
- </sql>
|
|
|
- <sql id="columns_alias">
|
|
|
- t.DETAILS_ID, t.PURCHASE_ORDER_ID, t.DETAILS_NO, t.DETAILS_TIME, t.DETAILS_FEE_TYPE,
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.DETAILS_ID, t.PURCHASE_ORDER_ID, t.DETAILS_NO, t.DETAILS_TIME, t.DETAILS_FEE_TYPE,
|
|
|
t.DETAILS_AMOUNT, t.WETHER_TO_STATEMENT, t.TRUCK_RESULT_TOTAL_ID, t.INSERT_USERNAME,
|
|
|
t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
|
|
|
- </sql>
|
|
|
- <sql id="select">
|
|
|
- SELECT <include refid="columns" /> FROM BMSSHIP_DETAILS_ORDER
|
|
|
- </sql>
|
|
|
- <sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias" /> FROM BMSSHIP_DETAILS_ORDER t
|
|
|
- </sql>
|
|
|
- <sql id="where">
|
|
|
- <where>
|
|
|
- <if test="detailsId != null">
|
|
|
- and DETAILS_ID = #{detailsId}
|
|
|
- </if>
|
|
|
- <if test="purchaseOrderId != null">
|
|
|
- and PURCHASE_ORDER_ID = #{purchaseOrderId}
|
|
|
- </if>
|
|
|
- <if test="detailsNo != null and detailsNo != ''">
|
|
|
- and DETAILS_NO = #{detailsNo}
|
|
|
- </if>
|
|
|
- <if test="detailsTime != null">
|
|
|
- and TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = #{detailsTime}
|
|
|
- </if>
|
|
|
- <if test="detailsFeeType != null and detailsFeeType != ''">
|
|
|
- and DETAILS_FEE_TYPE = #{detailsFeeType}
|
|
|
- </if>
|
|
|
- <if test="detailsAmount != null">
|
|
|
- and DETAILS_AMOUNT = #{detailsAmount}
|
|
|
- </if>
|
|
|
- <if test="wetherToStatement != null">
|
|
|
- and WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
- </if>
|
|
|
- <if test="truckResultTotalId != null">
|
|
|
- and TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId}
|
|
|
- </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>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
- <sql id="whereLike">
|
|
|
- <where>
|
|
|
- <if test="detailsId != null">
|
|
|
- and DETAILS_ID = #{detailsId}
|
|
|
- </if>
|
|
|
- <if test="purchaseOrderId != null">
|
|
|
- and PURCHASE_ORDER_ID = #{purchaseOrderId}
|
|
|
- </if>
|
|
|
- <if test="detailsNo != null and detailsNo != ''">
|
|
|
- and DETAILS_NO LIKE '%${detailsNo}%'
|
|
|
- </if>
|
|
|
- <if test="detailsTime != null">
|
|
|
- and TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = #{detailsTime}
|
|
|
- </if>
|
|
|
- <if test="detailsFeeType != null and detailsFeeType != ''">
|
|
|
- and DETAILS_FEE_TYPE LIKE '%${detailsFeeType}%'
|
|
|
- </if>
|
|
|
- <if test="detailsAmount != null">
|
|
|
- and DETAILS_AMOUNT = #{detailsAmount}
|
|
|
- </if>
|
|
|
- <if test="wetherToStatement != null">
|
|
|
- and WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
- </if>
|
|
|
- <if test="truckResultTotalId != null">
|
|
|
- and TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId}
|
|
|
- </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>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
- delete from BMSSHIP_DETAILS_ORDER
|
|
|
- where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
- </delete>
|
|
|
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
- delete from BMSSHIP_DETAILS_ORDER
|
|
|
- where 1!=1
|
|
|
- <if test="purchaseOrderId != null">
|
|
|
- or PURCHASE_ORDER_ID = #{purchaseOrderId}
|
|
|
- </if>
|
|
|
- <if test="detailsNo != null and detailsNo != ''">
|
|
|
- or DETAILS_NO = #{detailsNo}
|
|
|
- </if>
|
|
|
- <if test="detailsTime != null">
|
|
|
- or TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = '#{detailsTime}'
|
|
|
- </if>
|
|
|
- <if test="detailsFeeType != null and detailsFeeType != ''">
|
|
|
- or DETAILS_FEE_TYPE = #{detailsFeeType}
|
|
|
- </if>
|
|
|
- <if test="detailsAmount != null">
|
|
|
- or DETAILS_AMOUNT = #{detailsAmount}
|
|
|
- </if>
|
|
|
- <if test="wetherToStatement != null">
|
|
|
- or WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
- </if>
|
|
|
- <if test="truckResultTotalId != null">
|
|
|
- or TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId}
|
|
|
- </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>
|
|
|
- </delete>
|
|
|
- <insert id="insert" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
- insert into BMSSHIP_DETAILS_ORDER (DETAILS_ID, PURCHASE_ORDER_ID, DETAILS_NO,
|
|
|
- DETAILS_TIME, DETAILS_FEE_TYPE, DETAILS_AMOUNT,
|
|
|
- WETHER_TO_STATEMENT, TRUCK_RESULT_TOTAL_ID,
|
|
|
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK)
|
|
|
- values (#{detailsId,jdbcType=DECIMAL}, #{purchaseOrderId,jdbcType=DECIMAL}, #{detailsNo,jdbcType=VARCHAR},
|
|
|
- #{detailsTime,jdbcType=TIMESTAMP}, #{detailsFeeType,jdbcType=VARCHAR}, #{detailsAmount,jdbcType=DECIMAL},
|
|
|
- #{wetherToStatement,jdbcType=DECIMAL}, #{truckResultTotalId,jdbcType=DECIMAL},
|
|
|
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
- insert into BMSSHIP_DETAILS_ORDER
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="detailsId != null">
|
|
|
- DETAILS_ID,
|
|
|
- </if>
|
|
|
- <if test="purchaseOrderId != null">
|
|
|
- PURCHASE_ORDER_ID,
|
|
|
- </if>
|
|
|
- <if test="detailsNo != null">
|
|
|
- DETAILS_NO,
|
|
|
- </if>
|
|
|
- <if test="detailsTime != null">
|
|
|
- DETAILS_TIME,
|
|
|
- </if>
|
|
|
- <if test="detailsFeeType != null">
|
|
|
- DETAILS_FEE_TYPE,
|
|
|
- </if>
|
|
|
- <if test="detailsAmount != null">
|
|
|
- DETAILS_AMOUNT,
|
|
|
- </if>
|
|
|
- <if test="wetherToStatement != null">
|
|
|
- WETHER_TO_STATEMENT,
|
|
|
- </if>
|
|
|
- <if test="truckResultTotalId != null">
|
|
|
- TRUCK_RESULT_TOTAL_ID,
|
|
|
- </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>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="detailsId != null">
|
|
|
- #{detailsId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="purchaseOrderId != null">
|
|
|
- #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="detailsNo != null">
|
|
|
- #{detailsNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="detailsTime != null">
|
|
|
- #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="detailsFeeType != null">
|
|
|
- #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="detailsAmount != null">
|
|
|
- #{detailsAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="wetherToStatement != null">
|
|
|
- #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="truckResultTotalId != null">
|
|
|
- #{truckResultTotalId,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>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
- update BMSSHIP_DETAILS_ORDER
|
|
|
- set PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
- DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
|
|
|
- DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
- DETAILS_FEE_TYPE = #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
- DETAILS_AMOUNT = #{detailsAmount,jdbcType=DECIMAL},
|
|
|
- WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
- TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId,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}
|
|
|
- where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
- update BMSSHIP_DETAILS_ORDER
|
|
|
- <set>
|
|
|
- <if test="purchaseOrderId != null">
|
|
|
- PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="detailsNo != null">
|
|
|
- DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="detailsTime != null">
|
|
|
- DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="detailsFeeType != null">
|
|
|
- DETAILS_FEE_TYPE = #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="detailsAmount != null">
|
|
|
- DETAILS_AMOUNT = #{detailsAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="wetherToStatement != null">
|
|
|
- WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="truckResultTotalId != null">
|
|
|
- TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId,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>
|
|
|
- </set>
|
|
|
- where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
- </update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select" />
|
|
|
- where DETAILS_ID = #{detailsId,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 BMSSHIP_DETAILS_ORDER
|
|
|
- (DETAILS_ID,
|
|
|
- PURCHASE_ORDER_ID, DETAILS_NO, DETAILS_TIME,
|
|
|
- DETAILS_FEE_TYPE, DETAILS_AMOUNT,
|
|
|
- WETHER_TO_STATEMENT, TRUCK_RESULT_TOTAL_ID,
|
|
|
- INSERT_USERNAME, INSERT_TIME,
|
|
|
- UPDATE_USERNAME, UPDATE_TIME,
|
|
|
- INSERT_UPDATE_REMARK)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.detailsId,jdbcType=DECIMAL},
|
|
|
- #{item.purchaseOrderId,jdbcType=DECIMAL}, #{item.detailsNo,jdbcType=VARCHAR}, #{item.detailsTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.detailsFeeType,jdbcType=VARCHAR}, #{item.detailsAmount,jdbcType=DECIMAL},
|
|
|
- #{item.wetherToStatement,jdbcType=DECIMAL}, #{item.truckResultTotalId,jdbcType=DECIMAL},
|
|
|
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
- </insert>
|
|
|
- <update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update BMSSHIP_DETAILS_ORDER
|
|
|
- set
|
|
|
- DETAILS_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,PURCHASE_ORDER_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,DETAILS_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,DETAILS_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,DETAILS_FEE_TYPE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsFeeType,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,DETAILS_AMOUNT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsAmount,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,WETHER_TO_STATEMENT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.wetherToStatement,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,TRUCK_RESULT_TOTAL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.truckResultTotalId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,INSERT_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
- when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where DETAILS_ID in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
- #{item.detailsId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- </update>
|
|
|
- <delete id="batchDelete" parameterType="java.util.List">
|
|
|
- delete from BMSSHIP_DETAILS_ORDER
|
|
|
- where DETAILS_ID in
|
|
|
- <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
- <!-- 友情提示!!!-->
|
|
|
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns"/>
|
|
|
+ FROM BMSSHIP_DETAILS_ORDER
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns_alias"/>
|
|
|
+ FROM BMSSHIP_DETAILS_ORDER t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="detailsId != null">
|
|
|
+ and DETAILS_ID = #{detailsId}
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderId != null">
|
|
|
+ and PURCHASE_ORDER_ID = #{purchaseOrderId}
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo != null and detailsNo != ''">
|
|
|
+ and DETAILS_NO = #{detailsNo}
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime != null">
|
|
|
+ and TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = #{detailsTime}
|
|
|
+ </if>
|
|
|
+ <if test="detailsFeeType != null and detailsFeeType != ''">
|
|
|
+ and DETAILS_FEE_TYPE = #{detailsFeeType}
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ and DETAILS_AMOUNT = #{detailsAmount}
|
|
|
+ </if>
|
|
|
+ <if test="wetherToStatement != null">
|
|
|
+ and WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
+ </if>
|
|
|
+ <if test="truckResultTotalId != null">
|
|
|
+ and TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId}
|
|
|
+ </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>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="detailsId != null">
|
|
|
+ and DETAILS_ID = #{detailsId}
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderId != null">
|
|
|
+ and PURCHASE_ORDER_ID = #{purchaseOrderId}
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo != null and detailsNo != ''">
|
|
|
+ and DETAILS_NO LIKE '%${detailsNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime != null">
|
|
|
+ and TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = #{detailsTime}
|
|
|
+ </if>
|
|
|
+ <if test="detailsFeeType != null and detailsFeeType != ''">
|
|
|
+ and DETAILS_FEE_TYPE LIKE '%${detailsFeeType}%'
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ and DETAILS_AMOUNT = #{detailsAmount}
|
|
|
+ </if>
|
|
|
+ <if test="wetherToStatement != null">
|
|
|
+ and WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
+ </if>
|
|
|
+ <if test="truckResultTotalId != null">
|
|
|
+ and TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId}
|
|
|
+ </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>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete
|
|
|
+ from BMSSHIP_DETAILS_ORDER
|
|
|
+ where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from BMSSHIP_DETAILS_ORDER
|
|
|
+ where 1!=1
|
|
|
+ <if test="purchaseOrderId != null">
|
|
|
+ or PURCHASE_ORDER_ID = #{purchaseOrderId}
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo != null and detailsNo != ''">
|
|
|
+ or DETAILS_NO = #{detailsNo}
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime != null">
|
|
|
+ or TO_CHAR(DETAILS_TIME,'yyyy-MM-dd') = '#{detailsTime}'
|
|
|
+ </if>
|
|
|
+ <if test="detailsFeeType != null and detailsFeeType != ''">
|
|
|
+ or DETAILS_FEE_TYPE = #{detailsFeeType}
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ or DETAILS_AMOUNT = #{detailsAmount}
|
|
|
+ </if>
|
|
|
+ <if test="wetherToStatement != null">
|
|
|
+ or WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
+ </if>
|
|
|
+ <if test="truckResultTotalId != null">
|
|
|
+ or TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId}
|
|
|
+ </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>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
+ insert into BMSSHIP_DETAILS_ORDER (DETAILS_ID, PURCHASE_ORDER_ID, DETAILS_NO,
|
|
|
+ DETAILS_TIME, DETAILS_FEE_TYPE, DETAILS_AMOUNT,
|
|
|
+ WETHER_TO_STATEMENT, TRUCK_RESULT_TOTAL_ID,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK)
|
|
|
+ values (#{detailsId,jdbcType=DECIMAL}, #{purchaseOrderId,jdbcType=DECIMAL}, #{detailsNo,jdbcType=VARCHAR},
|
|
|
+ #{detailsTime,jdbcType=TIMESTAMP}, #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
+ #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ #{wetherToStatement,jdbcType=DECIMAL}, #{truckResultTotalId,jdbcType=DECIMAL},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
+ insert into BMSSHIP_DETAILS_ORDER
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="detailsId != null">
|
|
|
+ DETAILS_ID,
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderId != null">
|
|
|
+ PURCHASE_ORDER_ID,
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo != null">
|
|
|
+ DETAILS_NO,
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime != null">
|
|
|
+ DETAILS_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="detailsFeeType != null">
|
|
|
+ DETAILS_FEE_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ DETAILS_AMOUNT,
|
|
|
+ </if>
|
|
|
+ <if test="wetherToStatement != null">
|
|
|
+ WETHER_TO_STATEMENT,
|
|
|
+ </if>
|
|
|
+ <if test="truckResultTotalId != null">
|
|
|
+ TRUCK_RESULT_TOTAL_ID,
|
|
|
+ </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>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="detailsId != null">
|
|
|
+ #{detailsId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderId != null">
|
|
|
+ #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo != null">
|
|
|
+ #{detailsNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime != null">
|
|
|
+ #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="detailsFeeType != null">
|
|
|
+ #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="wetherToStatement != null">
|
|
|
+ #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="truckResultTotalId != null">
|
|
|
+ #{truckResultTotalId,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>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
+ update BMSSHIP_DETAILS_ORDER
|
|
|
+ set PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
+ DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
|
|
|
+ DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
+ DETAILS_FEE_TYPE = #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
+ DETAILS_AMOUNT = #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId,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}
|
|
|
+ where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmsshipDetailsOrder">
|
|
|
+ update BMSSHIP_DETAILS_ORDER
|
|
|
+ <set>
|
|
|
+ <if test="purchaseOrderId != null">
|
|
|
+ PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo != null">
|
|
|
+ DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime != null">
|
|
|
+ DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="detailsFeeType != null">
|
|
|
+ DETAILS_FEE_TYPE = #{detailsFeeType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ DETAILS_AMOUNT = #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="wetherToStatement != null">
|
|
|
+ WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="truckResultTotalId != null">
|
|
|
+ TRUCK_RESULT_TOTAL_ID = #{truckResultTotalId,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>
|
|
|
+ </set>
|
|
|
+ where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where DETAILS_ID = #{detailsId,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 BMSSHIP_DETAILS_ORDER
|
|
|
+ (DETAILS_ID,
|
|
|
+ PURCHASE_ORDER_ID, DETAILS_NO, DETAILS_TIME,
|
|
|
+ DETAILS_FEE_TYPE, DETAILS_AMOUNT,
|
|
|
+ WETHER_TO_STATEMENT, TRUCK_RESULT_TOTAL_ID,
|
|
|
+ INSERT_USERNAME, INSERT_TIME,
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.detailsId,jdbcType=DECIMAL},
|
|
|
+ #{item.purchaseOrderId,jdbcType=DECIMAL}, #{item.detailsNo,jdbcType=VARCHAR},
|
|
|
+ #{item.detailsTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.detailsFeeType,jdbcType=VARCHAR}, #{item.detailsAmount,jdbcType=DECIMAL},
|
|
|
+ #{item.wetherToStatement,jdbcType=DECIMAL}, #{item.truckResultTotalId,jdbcType=DECIMAL},
|
|
|
+ #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update BMSSHIP_DETAILS_ORDER
|
|
|
+ set
|
|
|
+ DETAILS_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,PURCHASE_ORDER_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_FEE_TYPE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsFeeType,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_AMOUNT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsAmount,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,WETHER_TO_STATEMENT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.wetherToStatement,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TRUCK_RESULT_TOTAL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.truckResultTotalId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DETAILS_ID" separator=" ">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where DETAILS_ID in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.detailsId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from BMSSHIP_DETAILS_ORDER
|
|
|
+ where DETAILS_ID in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
|
-
|
|
|
+ <!-- 采购船运详单 -->
|
|
|
+ <select id="getPurchaseShipDetails" parameterType="DECIMAL" resultType="java.util.Map">
|
|
|
+ SELECT BDO.DETAILS_NO AS "detailsNo",
|
|
|
+ BDO.DETAILS_TIME AS "detailsTime",
|
|
|
+ RC.CAPACITY_NUMBER AS "capacityNumber",
|
|
|
+ RP1.PORT_NAME AS "startPlace",
|
|
|
+ RP3.PORT_NAME AS "endPlace",
|
|
|
+ APO.PUCHASE_ORDER_MATERIAL_NUMBER AS "materialNumber",
|
|
|
+ BDO.DETAILS_AMOUNT AS "detailsAmount",
|
|
|
+ RP2.PORT_NAME AS "carrierName",
|
|
|
+ RM.MATERIAL_NAME AS "materialName",
|
|
|
+ RM.MATERIAL_CODE AS "materialCode"
|
|
|
+ FROM BMSSHIP_DETAILS_STATEMENT BDS
|
|
|
+ LEFT JOIN BMSSHIP_DETAILS_ORDER BDO
|
|
|
+ ON BDS.DETAILS_ID = BDO.DETAILS_ID
|
|
|
+ LEFT JOIN AMS_PURCHASE_ORDER APO
|
|
|
+ ON APO.PURCHASE_ORDER_ID = BDO.PURCHASE_ORDER_ID
|
|
|
+ LEFT JOIN AMSSHIP_DELIVERY_NOTICE ADN
|
|
|
+ ON ADN.BATCH_ID = APO.BATCH_ID
|
|
|
+ LEFT JOIN RMS_PORT RP1
|
|
|
+ ON RP1.PORT_ID = ADN.PORT_ID
|
|
|
+ LEFT JOIN RMS_PORT RP2
|
|
|
+ ON RP2.PORT_ID = ADN.CARRIER_ID
|
|
|
+ LEFT JOIN AMSSHIP_DELIVERY_ATTORNEY ADA
|
|
|
+ ON ADA.BATCH_ID = APO.BATCH_ID
|
|
|
+ LEFT JOIN RMS_PORT RP3
|
|
|
+ ON RP3.PORT_ID = ADA.DOWN_SWIM_PORT_ID
|
|
|
+ LEFT JOIN DIL_BATCH DB
|
|
|
+ ON DB.BATCH_ID = APO.BATCH_ID
|
|
|
+ LEFT JOIN RMS_MATERIAL RM
|
|
|
+ ON DB.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
+ ON TTR.RESULT_TOTAL_ID = BDO.TRUCK_RESULT_TOTAL_ID
|
|
|
+ LEFT JOIN OMSTRUCK_ORDER OO
|
|
|
+ ON OO.ORDER_ID = TTR.ORDER_ID
|
|
|
+ LEFT JOIN RMS_DRIVER_CAPACITY RDC
|
|
|
+ ON OO.DRIVER_CAPACITY_ID = RDC.DRIVER_CAPACITY_ID
|
|
|
+ LEFT JOIN RMS_CAPACITY RC
|
|
|
+ ON RDC.CAPACITY_ID = RC.CAPACITY_ID
|
|
|
+ WHERE BDS.STATEMENT_ID = #{statementId}
|
|
|
+ </select>
|
|
|
</mapper>
|