|
@@ -0,0 +1,796 @@
|
|
|
+<?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.BmstrainDetailsOrderMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.BmstrainDetailsOrder">
|
|
|
+ <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="PRICE_ID" jdbcType="DECIMAL" property="priceId"/>
|
|
|
+ <result column="DETAILS_AMOUNT" jdbcType="DECIMAL" property="detailsAmount"/>
|
|
|
+ <result column="DETAILS_FLOAT_AMOUNT" jdbcType="DECIMAL" property="detailsFloatAmount"/>
|
|
|
+ <result column="DETAILS_MAGIN_AMOUNT" jdbcType="DECIMAL" property="detailsMaginAmount"/>
|
|
|
+ <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="WETHER_TO_STATEMENT" jdbcType="DECIMAL" property="wetherToStatement"/>
|
|
|
+ <result column="TRAIN_LOADING_RESULT_ID" jdbcType="DECIMAL" property="trainLoadingResultId"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ DETAILS_ID, PURCHASE_ORDER_ID, DETAILS_NO, DETAILS_TIME, PRICE_ID, DETAILS_AMOUNT,
|
|
|
+ DETAILS_FLOAT_AMOUNT, DETAILS_MAGIN_AMOUNT, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, WETHER_TO_STATEMENT, TRAIN_LOADING_RESULT_ID
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.DETAILS_ID, t.PURCHASE_ORDER_ID, t.DETAILS_NO, t.DETAILS_TIME, t.PRICE_ID, t.DETAILS_AMOUNT,
|
|
|
+ t.DETAILS_FLOAT_AMOUNT, t.DETAILS_MAGIN_AMOUNT, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
+ t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.WETHER_TO_STATEMENT,
|
|
|
+ t.TRAIN_LOADING_RESULT_ID
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns"/>
|
|
|
+ FROM BMSTRAIN_DETAILS_ORDER
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns_alias"/>
|
|
|
+ FROM BMSTRAIN_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="priceId != null">
|
|
|
+ and PRICE_ID = #{priceId}
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ and DETAILS_AMOUNT = #{detailsAmount}
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount != null">
|
|
|
+ and DETAILS_FLOAT_AMOUNT = #{detailsFloatAmount}
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount != null">
|
|
|
+ and DETAILS_MAGIN_AMOUNT = #{detailsMaginAmount}
|
|
|
+ </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="wetherToStatement != null">
|
|
|
+ and WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
+ </if>
|
|
|
+ <if test="trainLoadingResultId != null">
|
|
|
+ and TRAIN_LOADING_RESULT_ID = #{trainLoadingResultId}
|
|
|
+ </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="priceId != null">
|
|
|
+ and PRICE_ID = #{priceId}
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ and DETAILS_AMOUNT = #{detailsAmount}
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount != null">
|
|
|
+ and DETAILS_FLOAT_AMOUNT = #{detailsFloatAmount}
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount != null">
|
|
|
+ and DETAILS_MAGIN_AMOUNT = #{detailsMaginAmount}
|
|
|
+ </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="wetherToStatement != null">
|
|
|
+ and WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
+ </if>
|
|
|
+ <if test="trainLoadingResultId != null">
|
|
|
+ and TRAIN_LOADING_RESULT_ID = #{trainLoadingResultId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete
|
|
|
+ from BMSTRAIN_DETAILS_ORDER
|
|
|
+ where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from BMSTRAIN_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="priceId != null">
|
|
|
+ or PRICE_ID = #{priceId}
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ or DETAILS_AMOUNT = #{detailsAmount}
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount != null">
|
|
|
+ or DETAILS_FLOAT_AMOUNT = #{detailsFloatAmount}
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount != null">
|
|
|
+ or DETAILS_MAGIN_AMOUNT = #{detailsMaginAmount}
|
|
|
+ </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="wetherToStatement != null">
|
|
|
+ or WETHER_TO_STATEMENT = #{wetherToStatement}
|
|
|
+ </if>
|
|
|
+ <if test="trainLoadingResultId != null">
|
|
|
+ or TRAIN_LOADING_RESULT_ID = #{trainLoadingResultId}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.BmstrainDetailsOrder">
|
|
|
+ insert into BMSTRAIN_DETAILS_ORDER (DETAILS_ID, PURCHASE_ORDER_ID, DETAILS_NO,
|
|
|
+ DETAILS_TIME, PRICE_ID, DETAILS_AMOUNT,
|
|
|
+ DETAILS_FLOAT_AMOUNT, DETAILS_MAGIN_AMOUNT,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, WETHER_TO_STATEMENT,
|
|
|
+ TRAIN_LOADING_RESULT_ID)
|
|
|
+ values (#{detailsId,jdbcType=DECIMAL}, #{purchaseOrderId,jdbcType=DECIMAL}, #{detailsNo,jdbcType=VARCHAR},
|
|
|
+ #{detailsTime,jdbcType=TIMESTAMP}, #{priceId,jdbcType=DECIMAL}, #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ #{detailsFloatAmount,jdbcType=DECIMAL}, #{detailsMaginAmount,jdbcType=DECIMAL},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ #{trainLoadingResultId,jdbcType=DECIMAL})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.BmstrainDetailsOrder">
|
|
|
+ insert into BMSTRAIN_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="priceId != null">
|
|
|
+ PRICE_ID,
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ DETAILS_AMOUNT,
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount != null">
|
|
|
+ DETAILS_FLOAT_AMOUNT,
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount != null">
|
|
|
+ DETAILS_MAGIN_AMOUNT,
|
|
|
+ </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="wetherToStatement != null">
|
|
|
+ WETHER_TO_STATEMENT,
|
|
|
+ </if>
|
|
|
+ <if test="trainLoadingResultId != null">
|
|
|
+ TRAIN_LOADING_RESULT_ID,
|
|
|
+ </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="priceId != null">
|
|
|
+ #{priceId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount != null">
|
|
|
+ #{detailsFloatAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount != null">
|
|
|
+ #{detailsMaginAmount,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="wetherToStatement != null">
|
|
|
+ #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="trainLoadingResultId != null">
|
|
|
+ #{trainLoadingResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.BmstrainDetailsOrder">
|
|
|
+ update BMSTRAIN_DETAILS_ORDER
|
|
|
+ set PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
|
|
|
+ DETAILS_NO = #{detailsNo,jdbcType=VARCHAR},
|
|
|
+ DETAILS_TIME = #{detailsTime,jdbcType=TIMESTAMP},
|
|
|
+ PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
|
+ DETAILS_AMOUNT = #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ DETAILS_FLOAT_AMOUNT = #{detailsFloatAmount,jdbcType=DECIMAL},
|
|
|
+ DETAILS_MAGIN_AMOUNT = #{detailsMaginAmount,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},
|
|
|
+ WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ TRAIN_LOADING_RESULT_ID = #{trainLoadingResultId,jdbcType=DECIMAL}
|
|
|
+ where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.BmstrainDetailsOrder">
|
|
|
+ update BMSTRAIN_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="priceId != null">
|
|
|
+ PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount != null">
|
|
|
+ DETAILS_AMOUNT = #{detailsAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount != null">
|
|
|
+ DETAILS_FLOAT_AMOUNT = #{detailsFloatAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount != null">
|
|
|
+ DETAILS_MAGIN_AMOUNT = #{detailsMaginAmount,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="wetherToStatement != null">
|
|
|
+ WETHER_TO_STATEMENT = #{wetherToStatement,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="trainLoadingResultId != null">
|
|
|
+ TRAIN_LOADING_RESULT_ID = #{trainLoadingResultId,jdbcType=DECIMAL},
|
|
|
+ </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 BMSTRAIN_DETAILS_ORDER
|
|
|
+ (DETAILS_ID,
|
|
|
+ PURCHASE_ORDER_ID, DETAILS_NO, DETAILS_TIME,
|
|
|
+ PRICE_ID, DETAILS_AMOUNT, DETAILS_FLOAT_AMOUNT,
|
|
|
+ DETAILS_MAGIN_AMOUNT, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ WETHER_TO_STATEMENT, TRAIN_LOADING_RESULT_ID
|
|
|
+ )
|
|
|
+ ( <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.priceId,jdbcType=DECIMAL}, #{item.detailsAmount,jdbcType=DECIMAL},
|
|
|
+ #{item.detailsFloatAmount,jdbcType=DECIMAL},
|
|
|
+ #{item.detailsMaginAmount,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{item.wetherToStatement,jdbcType=DECIMAL}, #{item.trainLoadingResultId,jdbcType=DECIMAL}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update BMSTRAIN_DETAILS_ORDER
|
|
|
+ set
|
|
|
+ DETAILS_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,PURCHASE_ORDER_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_NO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,PRICE_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_AMOUNT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsAmount,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_FLOAT_AMOUNT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsFloatAmount,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DETAILS_MAGIN_AMOUNT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.detailsMaginAmount,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,WETHER_TO_STATEMENT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.wetherToStatement,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TRAIN_LOADING_RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DETAILS_ID" close="end">
|
|
|
+ when #{item.detailsId,jdbcType=DECIMAL} then #{item.trainLoadingResultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ where DETAILS_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.detailsId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from BMSTRAIN_DETAILS_ORDER
|
|
|
+ where DETAILS_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!-- 展示所有火运详单 -->
|
|
|
+ <select id="getTrainDetailsOrderList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
+ SELECT *
|
|
|
+ FROM (
|
|
|
+ SELECT
|
|
|
+ bdo.INSERT_TIME as "insertTime",
|
|
|
+ bdo.DETAILS_ID as "detailsId",
|
|
|
+ apo.PURCHASE_ORDER_NO as "purchaseOrderNo",
|
|
|
+ rm.MATERIAL_NAME as "materialName",
|
|
|
+ db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
|
|
|
+ bdo.DETAILS_NO as "detailsNo",
|
|
|
+ bdo.DETAILS_TIME as "detailsTime",
|
|
|
+ tlr.RESULT_LOADING_DATE as "loadingDate",
|
|
|
+ tlr.RESULT_WAGON_NO as "wagonNo",
|
|
|
+ tlr.RESULT_BILLABLE_TONNAGE as "billableTonnage",
|
|
|
+ actp.TRAIN_PRICE as "trainPrice",
|
|
|
+ bdo.DETAILS_AMOUNT as "detailsAmount",
|
|
|
+ bdo.DETAILS_FLOAT_AMOUNT as "detailsFloatAmount",
|
|
|
+ bdo.DETAILS_MAGIN_AMOUNT as "detailsMaginAmount"
|
|
|
+ FROM BMSTRAIN_DETAILS_ORDER bdo
|
|
|
+ LEFT JOIN AMS_PURCHASE_ORDER apo
|
|
|
+ ON bdo.PURCHASE_ORDER_ID = apo.PURCHASE_ORDER_ID
|
|
|
+ LEFT JOIN DIL_BATCH db
|
|
|
+ ON db.BATCH_ID = apo.BATCH_ID
|
|
|
+ LEFT JOIN RMS_MATERIAL rm
|
|
|
+ ON rm.MATERIAL_ID = db.MATERIAL_ID
|
|
|
+ LEFT JOIN TMSTRAIN_LOADING_RESULT tlr
|
|
|
+ ON tlr.RESULT_ID = bdo.TRAIN_LOADING_RESULT_ID
|
|
|
+ LEFT JOIN AMS_CONTRACT_TRAIN_PRICE actp
|
|
|
+ ON bdo.PRICE_ID = actp.PRICE_ID
|
|
|
+ )
|
|
|
+ <where>
|
|
|
+ <if test="purchaseOrderNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="purchaseOrderNo" item="item" open="(" separator="," close=")">
|
|
|
+ "purchaseOrderNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="," close=")">
|
|
|
+ "materialName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="foreignShipName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
|
|
|
+ "foreignShipName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsNo" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsTime" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="loadingDate!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="loadingDate" item="item" open="(" separator="," close=")">
|
|
|
+ "loadingDate" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="wagonNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="wagonNo" item="item" open="(" separator="," close=")">
|
|
|
+ "wagonNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="billableTonnage!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="billableTonnage" item="item" open="(" separator="," close=")">
|
|
|
+ "billableTonnage" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="trainPrice!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="trainPrice" item="item" open="(" separator="," close=")">
|
|
|
+ "trainPrice" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsAmount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsFloatAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsFloatAmount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsMaginAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsMaginAmount" 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>
|
|
|
+ </if>
|
|
|
+ <if test="orderField == null ">
|
|
|
+ order by "insertTime" desc
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!-- 展示未生成账单的详单 -->
|
|
|
+ <select id="getUmcomplateTrainDetailsList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
+ SELECT *
|
|
|
+ FROM (
|
|
|
+ SELECT
|
|
|
+ bdo.INSERT_TIME as "insertTime",
|
|
|
+ bdo.DETAILS_ID as "detailsId",
|
|
|
+ apo.PURCHASE_ORDER_NO as "purchaseOrderNo",
|
|
|
+ rm.MATERIAL_NAME as "materialName",
|
|
|
+ db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
|
|
|
+ bdo.DETAILS_NO as "detailsNo",
|
|
|
+ bdo.DETAILS_TIME as "detailsTime",
|
|
|
+ tlr.RESULT_LOADING_DATE as "loadingDate",
|
|
|
+ tlr.RESULT_WAGON_NO as "wagonNo",
|
|
|
+ tlr.RESULT_BILLABLE_TONNAGE as "billableTonnage",
|
|
|
+ actp.TRAIN_PRICE as "trainPrice",
|
|
|
+ bdo.DETAILS_AMOUNT as "detailsAmount",
|
|
|
+ bdo.DETAILS_FLOAT_AMOUNT as "detailsFloatAmount",
|
|
|
+ bdo.DETAILS_MAGIN_AMOUNT as "detailsMaginAmount"
|
|
|
+ FROM BMSTRAIN_DETAILS_ORDER bdo
|
|
|
+ LEFT JOIN AMS_PURCHASE_ORDER apo
|
|
|
+ ON bdo.PURCHASE_ORDER_ID = apo.PURCHASE_ORDER_ID
|
|
|
+ LEFT JOIN DIL_BATCH db
|
|
|
+ ON db.BATCH_ID = apo.BATCH_ID
|
|
|
+ LEFT JOIN RMS_MATERIAL rm
|
|
|
+ ON rm.MATERIAL_ID = db.MATERIAL_ID
|
|
|
+ LEFT JOIN TMSTRAIN_LOADING_RESULT tlr
|
|
|
+ ON tlr.RESULT_ID = bdo.TRAIN_LOADING_RESULT_ID
|
|
|
+ LEFT JOIN AMS_CONTRACT_TRAIN_PRICE actp
|
|
|
+ ON bdo.PRICE_ID = actp.PRICE_ID
|
|
|
+ WHERE bdo.WETHER_TO_STATEMENT = 0
|
|
|
+ )
|
|
|
+ <where>
|
|
|
+ <if test="purchaseOrderNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="purchaseOrderNo" item="item" open="(" separator="," close=")">
|
|
|
+ "purchaseOrderNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="," close=")">
|
|
|
+ "materialName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="foreignShipName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
|
|
|
+ "foreignShipName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsNo" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsTime!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsTime" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="loadingDate!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="loadingDate" item="item" open="(" separator="," close=")">
|
|
|
+ "loadingDate" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="wagonNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="wagonNo" item="item" open="(" separator="," close=")">
|
|
|
+ "wagonNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="billableTonnage!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="billableTonnage" item="item" open="(" separator="," close=")">
|
|
|
+ "billableTonnage" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="trainPrice!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="trainPrice" item="item" open="(" separator="," close=")">
|
|
|
+ "trainPrice" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsAmount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsFloatAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsFloatAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsFloatAmount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsMaginAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsMaginAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "detailsMaginAmount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 展示火运实绩列表 -->
|
|
|
+ <select id="getTrainResultList" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ SELECT *
|
|
|
+ FROM (
|
|
|
+ SELECT tlr.RESULT_ID as "trainLoadingResultId",
|
|
|
+ tlr.INSERT_TIME as "insertTime",
|
|
|
+ apo.PURCHASE_ORDER_NO as "purchaseOrderNo",
|
|
|
+ rm.MATERIAL_NAME as "materialName",
|
|
|
+ db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
|
|
|
+ tlr.RESULT_LOADING_DATE as "resultLoadingDate",
|
|
|
+ tlr.RESULT_WAGON_NO as "resultWagonNo",
|
|
|
+ tlr.RESULT_BILLABLE_TONNAGE as "resultBillableTonnage"
|
|
|
+ FROM TMSTRAIN_LOADING_RESULT tlr
|
|
|
+ LEFT JOIN AMS_PURCHASE_ORDER apo
|
|
|
+ ON apo.PURCHASE_ORDER_ID = tlr.PURCHASE_ORDER_RAIL_PLAN_ID
|
|
|
+ LEFT JOIN DIL_BATCH db
|
|
|
+ ON db.BATCH_ID = apo.PURCHASE_ORDER_ID
|
|
|
+ LEFT JOIN RMS_MATERIAL rm
|
|
|
+ ON rm.MATERIAL_ID = db.MATERIAL_ID
|
|
|
+ )
|
|
|
+ <where>
|
|
|
+ <if test="purchaseOrderNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="purchaseOrderNo" item="item" open="(" separator="," close=")">
|
|
|
+ "purchaseOrderNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="," close=")">
|
|
|
+ "materialName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="foreignShipName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
|
|
|
+ "foreignShipName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultLoadingDate" item="item" open="(" separator="," close=")">
|
|
|
+ "resultLoadingDate" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultWagonNo" item="item" open="(" separator="," close=")">
|
|
|
+ "resultWagonNo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultBillableTonnage" item="item" open="(" separator="," close=")">
|
|
|
+ "resultBillableTonnage" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
+ </select>
|
|
|
+ <select id="selectMaxId" resultType="DECIMAL">
|
|
|
+ SELECT MAX(DETAILS_ID)
|
|
|
+ FROM BMSTRAIN_DETAILS_ORDER
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 得到采购订单id -->
|
|
|
+ <select id="getPurchaseOrderId" parameterType="java.lang.String" resultType="DECIMAL">
|
|
|
+ SELECT PURCHASE_ORDER_ID
|
|
|
+ FROM AMS_PURCHASE_ORDER
|
|
|
+ WHERE PURCHASE_ORDER_NO = #{purchaseOrderNo}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 得到采购订单id -->
|
|
|
+ <select id="getTrainPriceId" parameterType="java.lang.String" resultType="DECIMAL">
|
|
|
+ SELECT PRICE_ID
|
|
|
+ FROM AMS_CONTRACT_TRAIN_PRICE
|
|
|
+ WHERE TRAIN_TYPE = #{trainType}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 得到采购订单id -->
|
|
|
+ <select id="getTrainPrice" parameterType="java.lang.String" resultType="DECIMAL">
|
|
|
+ SELECT TRAIN_PRICE
|
|
|
+ FROM AMS_CONTRACT_TRAIN_PRICE
|
|
|
+ WHERE TRAIN_TYPE = #{trainType}
|
|
|
+ </select>
|
|
|
+</mapper>
|