|
@@ -0,0 +1,848 @@
|
|
|
+<?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.TmsshipLoadShipResultMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
|
|
|
+ <result column="TOTAL_RESULT_ID" jdbcType="DECIMAL" property="totalResultId"/>
|
|
|
+ <result column="LOCATION_START_PORT_ID" jdbcType="DECIMAL" property="locationStartPortId"/>
|
|
|
+ <result column="ARRIVAL_PORT_ID" jdbcType="DECIMAL" property="arrivalPortId"/>
|
|
|
+ <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
|
|
|
+ <result column="RESULT_DELIVERY_DATE" jdbcType="TIMESTAMP" property="resultDeliveryDate"/>
|
|
|
+ <result column="RESULT_ACTUAL_INSTALLATIONS" jdbcType="DECIMAL" property="resultActualInstallations"/>
|
|
|
+ <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
|
|
|
+ <result column="RWAREHOUSE_MATERIAL_ID" jdbcType="DECIMAL" property="rwarehouseMaterialId"/>
|
|
|
+ <result column="RESULT_ARRIVAL_PORT_TIME" jdbcType="TIMESTAMP" property="resultArrivalPortTime"/>
|
|
|
+ <result column="RESULT_OUT_PORT_TIME" jdbcType="TIMESTAMP" property="resultOutPortTime"/>
|
|
|
+ <result column="RESULT_LOAD_SHIP_DATE" jdbcType="TIMESTAMP" property="resultLoadShipDate"/>
|
|
|
+ <result column="RESULT_ISCLEAR" jdbcType="VARCHAR" property="resultIsclear"/>
|
|
|
+ <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
|
|
|
+ <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime"/>
|
|
|
+ <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">
|
|
|
+ RESULT_ID, TOTAL_RESULT_ID, LOCATION_START_PORT_ID, ARRIVAL_PORT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER, RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
|
+ RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ DELETED
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.RESULT_ID, t.TOTAL_RESULT_ID, t.LOCATION_START_PORT_ID, t.ARRIVAL_PORT_ID, t.BATCH_ID,
|
|
|
+ t.RESULT_DELIVERY_DATE, t.RESULT_ACTUAL_INSTALLATIONS, t.RESULT_NUMBER, t.RWAREHOUSE_MATERIAL_ID,
|
|
|
+ t.RESULT_ARRIVAL_PORT_TIME, t.RESULT_OUT_PORT_TIME, t.RESULT_LOAD_SHIP_DATE, t.RESULT_ISCLEAR,
|
|
|
+ t.DELETE_NAME, t.DELETE_TIME, 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 TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns_alias"/>
|
|
|
+ FROM TMSSHIP_LOAD_SHIP_RESULT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ and TOTAL_RESULT_ID = #{totalResultId}
|
|
|
+ </if>
|
|
|
+ <if test="locationStartPortId != null">
|
|
|
+ and LOCATION_START_PORT_ID = #{locationStartPortId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalPortId != null">
|
|
|
+ and ARRIVAL_PORT_ID = #{arrivalPortId}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ and BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeliveryDate != null">
|
|
|
+ and TO_CHAR(RESULT_DELIVERY_DATE,'yyyy-MM-dd') = #{resultDeliveryDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultActualInstallations != null">
|
|
|
+ and RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations}
|
|
|
+ </if>
|
|
|
+ <if test="resultNumber != null and resultNumber != ''">
|
|
|
+ and RESULT_NUMBER = #{resultNumber}
|
|
|
+ </if>
|
|
|
+ <if test="rwarehouseMaterialId != null">
|
|
|
+ and RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId}
|
|
|
+ </if>
|
|
|
+ <if test="resultArrivalPortTime != null">
|
|
|
+ and TO_CHAR(RESULT_ARRIVAL_PORT_TIME,'yyyy-MM-dd') = #{resultArrivalPortTime}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ and TO_CHAR(RESULT_OUT_PORT_TIME,'yyyy-MM-dd') = #{resultOutPortTime}
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadShipDate != null">
|
|
|
+ and TO_CHAR(RESULT_LOAD_SHIP_DATE,'yyyy-MM-dd') = #{resultLoadShipDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
+ and RESULT_ISCLEAR = #{resultIsclear}
|
|
|
+ </if>
|
|
|
+ <if test="deleteName != null and deleteName != ''">
|
|
|
+ and DELETE_NAME = #{deleteName}
|
|
|
+ </if>
|
|
|
+ <if test="deleteTime != null and deleteTime != ''">
|
|
|
+ and DELETE_TIME = #{deleteTime}
|
|
|
+ </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="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ and TOTAL_RESULT_ID = #{totalResultId}
|
|
|
+ </if>
|
|
|
+ <if test="locationStartPortId != null">
|
|
|
+ and LOCATION_START_PORT_ID = #{locationStartPortId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalPortId != null">
|
|
|
+ and ARRIVAL_PORT_ID = #{arrivalPortId}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ and BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeliveryDate != null">
|
|
|
+ and TO_CHAR(RESULT_DELIVERY_DATE,'yyyy-MM-dd') = #{resultDeliveryDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultActualInstallations != null">
|
|
|
+ and RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations}
|
|
|
+ </if>
|
|
|
+ <if test="resultNumber != null and resultNumber != ''">
|
|
|
+ and RESULT_NUMBER LIKE '%${resultNumber}%'
|
|
|
+ </if>
|
|
|
+ <if test="rwarehouseMaterialId != null">
|
|
|
+ and RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId}
|
|
|
+ </if>
|
|
|
+ <if test="resultArrivalPortTime != null">
|
|
|
+ and TO_CHAR(RESULT_ARRIVAL_PORT_TIME,'yyyy-MM-dd') = #{resultArrivalPortTime}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ and TO_CHAR(RESULT_OUT_PORT_TIME,'yyyy-MM-dd') = #{resultOutPortTime}
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadShipDate != null">
|
|
|
+ and TO_CHAR(RESULT_LOAD_SHIP_DATE,'yyyy-MM-dd') = #{resultLoadShipDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
+ and RESULT_ISCLEAR LIKE '%${resultIsclear}%'
|
|
|
+ </if>
|
|
|
+ <if test="deleteName != null and deleteName != ''">
|
|
|
+ and DELETE_NAME LIKE '%${deleteName}%'
|
|
|
+ </if>
|
|
|
+ <if test="deleteTime != null and deleteTime != ''">
|
|
|
+ and DELETE_TIME LIKE '%${deleteTime}%'
|
|
|
+ </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 TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ where 1!=1
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ or TOTAL_RESULT_ID = #{totalResultId}
|
|
|
+ </if>
|
|
|
+ <if test="locationStartPortId != null">
|
|
|
+ or LOCATION_START_PORT_ID = #{locationStartPortId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalPortId != null">
|
|
|
+ or ARRIVAL_PORT_ID = #{arrivalPortId}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ or BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeliveryDate != null">
|
|
|
+ or TO_CHAR(RESULT_DELIVERY_DATE,'yyyy-MM-dd') = '#{resultDeliveryDate}'
|
|
|
+ </if>
|
|
|
+ <if test="resultActualInstallations != null">
|
|
|
+ or RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations}
|
|
|
+ </if>
|
|
|
+ <if test="resultNumber != null and resultNumber != ''">
|
|
|
+ or RESULT_NUMBER = #{resultNumber}
|
|
|
+ </if>
|
|
|
+ <if test="rwarehouseMaterialId != null">
|
|
|
+ or RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId}
|
|
|
+ </if>
|
|
|
+ <if test="resultArrivalPortTime != null">
|
|
|
+ or TO_CHAR(RESULT_ARRIVAL_PORT_TIME,'yyyy-MM-dd') = '#{resultArrivalPortTime}'
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ or TO_CHAR(RESULT_OUT_PORT_TIME,'yyyy-MM-dd') = '#{resultOutPortTime}'
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadShipDate != null">
|
|
|
+ or TO_CHAR(RESULT_LOAD_SHIP_DATE,'yyyy-MM-dd') = '#{resultLoadShipDate}'
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
+ or RESULT_ISCLEAR = #{resultIsclear}
|
|
|
+ </if>
|
|
|
+ <if test="deleteName != null and deleteName != ''">
|
|
|
+ or DELETE_NAME = #{deleteName}
|
|
|
+ </if>
|
|
|
+ <if test="deleteTime != null and deleteTime != ''">
|
|
|
+ or DELETE_TIME = #{deleteTime}
|
|
|
+ </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.TmsshipLoadShipResult">
|
|
|
+ insert into TMSSHIP_LOAD_SHIP_RESULT (RESULT_ID, TOTAL_RESULT_ID, LOCATION_START_PORT_ID,
|
|
|
+ ARRIVAL_PORT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
|
|
|
+ RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
|
+ RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
|
|
|
+ RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED)
|
|
|
+ values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ #{locationStartPortId,jdbcType=DECIMAL},
|
|
|
+ #{arrivalPortId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL},
|
|
|
+ #{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
+ #{resultActualInstallations,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR},
|
|
|
+ #{rwarehouseMaterialId,jdbcType=DECIMAL}, #{resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
|
+ #{resultOutPortTime,jdbcType=TIMESTAMP}, #{resultLoadShipDate,jdbcType=TIMESTAMP},
|
|
|
+ #{resultIsclear,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR},
|
|
|
+ #{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.TmsshipLoadShipResult">
|
|
|
+ insert into TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ TOTAL_RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="locationStartPortId != null">
|
|
|
+ LOCATION_START_PORT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="arrivalPortId != null">
|
|
|
+ ARRIVAL_PORT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ BATCH_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultDeliveryDate != null">
|
|
|
+ RESULT_DELIVERY_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="resultActualInstallations != null">
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS,
|
|
|
+ </if>
|
|
|
+ <if test="resultNumber != null">
|
|
|
+ RESULT_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="rwarehouseMaterialId != null">
|
|
|
+ RWAREHOUSE_MATERIAL_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultArrivalPortTime != null">
|
|
|
+ RESULT_ARRIVAL_PORT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ RESULT_OUT_PORT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadShipDate != null">
|
|
|
+ RESULT_LOAD_SHIP_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ RESULT_ISCLEAR,
|
|
|
+ </if>
|
|
|
+ <if test="deleteName != null">
|
|
|
+ DELETE_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="deleteTime != null">
|
|
|
+ DELETE_TIME,
|
|
|
+ </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="resultId != null">
|
|
|
+ #{resultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="locationStartPortId != null">
|
|
|
+ #{locationStartPortId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalPortId != null">
|
|
|
+ #{arrivalPortId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ #{batchId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultDeliveryDate != null">
|
|
|
+ #{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultActualInstallations != null">
|
|
|
+ #{resultActualInstallations,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultNumber != null">
|
|
|
+ #{resultNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="rwarehouseMaterialId != null">
|
|
|
+ #{rwarehouseMaterialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultArrivalPortTime != null">
|
|
|
+ #{resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ #{resultOutPortTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadShipDate != null">
|
|
|
+ #{resultLoadShipDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ #{resultIsclear,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteName != null">
|
|
|
+ #{deleteName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteTime != null">
|
|
|
+ #{deleteTime,jdbcType=VARCHAR},
|
|
|
+ </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.TmsshipLoadShipResult">
|
|
|
+ update TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ set TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ LOCATION_START_PORT_ID = #{locationStartPortId,jdbcType=DECIMAL},
|
|
|
+ ARRIVAL_PORT_ID = #{arrivalPortId,jdbcType=DECIMAL},
|
|
|
+ BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ RESULT_DELIVERY_DATE = #{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations,jdbcType=DECIMAL},
|
|
|
+ RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
|
|
|
+ RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId,jdbcType=DECIMAL},
|
|
|
+ RESULT_ARRIVAL_PORT_TIME = #{resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_OUT_PORT_TIME = #{resultOutPortTime,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_LOAD_SHIP_DATE = #{resultLoadShipDate,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
|
|
|
+ DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
|
|
|
+ DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
|
|
|
+ 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 RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
|
+ update TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ <set>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="locationStartPortId != null">
|
|
|
+ LOCATION_START_PORT_ID = #{locationStartPortId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalPortId != null">
|
|
|
+ ARRIVAL_PORT_ID = #{arrivalPortId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultDeliveryDate != null">
|
|
|
+ RESULT_DELIVERY_DATE = #{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultActualInstallations != null">
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultNumber != null">
|
|
|
+ RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="rwarehouseMaterialId != null">
|
|
|
+ RWAREHOUSE_MATERIAL_ID = #{rwarehouseMaterialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultArrivalPortTime != null">
|
|
|
+ RESULT_ARRIVAL_PORT_TIME = #{resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultOutPortTime != null">
|
|
|
+ RESULT_OUT_PORT_TIME = #{resultOutPortTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadShipDate != null">
|
|
|
+ RESULT_LOAD_SHIP_DATE = #{resultLoadShipDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteName != null">
|
|
|
+ DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteTime != null">
|
|
|
+ DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
|
|
|
+ </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 RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where RESULT_ID = #{resultId,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 TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ (RESULT_ID,
|
|
|
+ TOTAL_RESULT_ID, LOCATION_START_PORT_ID,
|
|
|
+ ARRIVAL_PORT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
|
|
|
+ RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
|
+ RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
|
|
|
+ RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
|
|
|
+ INSERT_USERNAME, INSERT_TIME,
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK, DELETED)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultId,jdbcType=DECIMAL},
|
|
|
+ #{item.totalResultId,jdbcType=DECIMAL}, #{item.locationStartPortId,jdbcType=DECIMAL},
|
|
|
+ #{item.arrivalPortId,jdbcType=DECIMAL}, #{item.batchId,jdbcType=DECIMAL},
|
|
|
+ #{item.resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
+ #{item.resultActualInstallations,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=VARCHAR},
|
|
|
+ #{item.rwarehouseMaterialId,jdbcType=DECIMAL}, #{item.resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.resultOutPortTime,jdbcType=TIMESTAMP}, #{item.resultLoadShipDate,jdbcType=TIMESTAMP},
|
|
|
+ #{item.resultIsclear,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
|
|
|
+ #{item.deleteTime,jdbcType=VARCHAR},
|
|
|
+ #{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 TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,LOCATION_START_PORT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.locationStartPortId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,ARRIVAL_PORT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalPortId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,BATCH_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DELIVERY_DATE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeliveryDate,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ACTUAL_INSTALLATIONS=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultActualInstallations,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_NUMBER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RWAREHOUSE_MATERIAL_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.rwarehouseMaterialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ARRIVAL_PORT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultArrivalPortTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_OUT_PORT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultOutPortTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_LOAD_SHIP_DATE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadShipDate,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ISCLEAR=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETE_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <select id="selectMaxId" resultType="DECIMAL">
|
|
|
+ SELECT MAX(RESULT_ID) + 1
|
|
|
+ FROM TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ </select>
|
|
|
+ <!--查询所有装船信息-->
|
|
|
+ <sql id="orderByInsertTime">
|
|
|
+ <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="selectLoadShipList" resultType="java.util.Map">
|
|
|
+ SELECT * FROM (
|
|
|
+ SELECT DISTINCT ttr.ORDER_ID as "orderId",
|
|
|
+ tlsr.INSERT_TIME as "insertTime",
|
|
|
+ tlsr.RESULT_ID as "resultId",
|
|
|
+ rp.PORT_NAME as "noticePort",
|
|
|
+ adn.NOTICE_DELIVERY_TIME as "noticeTime",
|
|
|
+ rm.MATERIAL_NAME as "materialName",
|
|
|
+ db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
|
|
|
+ actr.RESULT_NUMBER_OF_LOANS as "amount",
|
|
|
+ rrmr.GM_TONNAGE as "portAmount",
|
|
|
+ rc.CAPACITY_NUMBER as "capacityName",
|
|
|
+ oic.INSTRUCTION_PLANNED_LOADING as "planWeight",
|
|
|
+ tsl.LOCATION_VALUE as "nowLocation",
|
|
|
+ tlsr.RESULT_ACTUAL_INSTALLATIONS as "realWeight",
|
|
|
+ tlsr.RESULT_ARRIVAL_PORT_TIME as "arriveTime",
|
|
|
+ tlsr.RESULT_OUT_PORT_TIME as "liveTime",
|
|
|
+ rps.PORT_NAME as "startPortName",
|
|
|
+ rpe.PORT_NAME as "arrivePortName",
|
|
|
+ tlsr.RESULT_LOAD_SHIP_DATE as "loadTime",
|
|
|
+ tlsr.RESULT_ISCLEAR as "isClear",
|
|
|
+ tlsr.INSERT_UPDATE_REMARK as "memo"
|
|
|
+ FROM TMSSHIP_LOAD_SHIP_RESULT tlsr
|
|
|
+ LEFT JOIN TMSSHIP_TOTAL_RESULT ttr
|
|
|
+ ON tlsr.TOTAL_RESULT_ID = ttr.RESULT_ID
|
|
|
+ LEFT JOIN OMSSHIP_INSTRUCTIONS_CAPACITY oic
|
|
|
+ ON oic.INSTRUCTIONS_CAPACITY_ID = ttr.ORDER_ID
|
|
|
+ LEFT JOIN OMSSHIP_SHIPMENT_INSTRUCTIONS osi
|
|
|
+ ON osi.SHIPMENT_INSTRUCTIONS_ID = oic.INSTRUCTIONS_ID
|
|
|
+ LEFT JOIN RMS_CAPACITY rc
|
|
|
+ ON rc.CAPACITY_ID = oic.CAPACITY_ID
|
|
|
+ LEFT JOIN DIL_BATCH db
|
|
|
+ ON tlsr.BATCH_ID = db.BATCH_ID
|
|
|
+ LEFT JOIN RMS_MATERIAL rm
|
|
|
+ ON db.MATERIAL_ID = rm.MATERIAL_ID
|
|
|
+ LEFT JOIN AMSSHIP_DELIVERY_ATTORNEY ada
|
|
|
+ ON ada.BATCH_ID = osi.BATCH_ID
|
|
|
+ LEFT JOIN AMSSHIP_DELIVERY_NOTICE adn
|
|
|
+ ON ada.BATCH_ID = adn.BATCH_ID
|
|
|
+ LEFT JOIN RMS_PORT rp
|
|
|
+ ON rp.PORT_ID = adn.PORT_ID
|
|
|
+ LEFT JOIN AMSSHIP_CARGO_TRANSFER_RESULT actr
|
|
|
+ ON adn.BATCH_ID = actr.BATCH_ID
|
|
|
+ LEFT JOIN WMSH_GRID_MATERIAL rrmr
|
|
|
+ ON tlsr.RWAREHOUSE_MATERIAL_ID = rrmr.GM_ID
|
|
|
+ LEFT JOIN TMSSHIP_SHIP_LOCATION tsl
|
|
|
+ ON ttr.RESULT_ID = tsl.TOTAL_RESULT_ID
|
|
|
+ LEFT JOIN RMS_PORT rps
|
|
|
+ ON tlsr.LOCATION_START_PORT_ID = rps.PORT_ID
|
|
|
+ LEFT JOIN RMS_PORT rpe
|
|
|
+ ON tlsr.ARRIVAL_PORT_ID = rpe.PORT_ID
|
|
|
+ WHERE tlsr.DELETED = 0)
|
|
|
+ <where>
|
|
|
+ <if test="noticePort != null">
|
|
|
+ and
|
|
|
+ <foreach collection="noticePort" item="item" open="(" separator="," close=")">
|
|
|
+ "noticePort" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="noticeTime != null">
|
|
|
+ and
|
|
|
+ <foreach collection="noticeTime" item="item" open="(" separator="," close=")">
|
|
|
+ "noticeTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </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="amount != null">
|
|
|
+ and
|
|
|
+ <foreach collection="amount" item="item" open="(" separator="," close=")">
|
|
|
+ "amount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="portAmount != null">
|
|
|
+ and
|
|
|
+ <foreach collection="portAmount" item="item" open="(" separator="," close=")">
|
|
|
+ "portAmount" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="capacityName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="capacityName" item="item" open="(" separator="," close=")">
|
|
|
+ "capacityName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="planWeight != null">
|
|
|
+ and
|
|
|
+ <foreach collection="planWeight" item="item" open="(" separator="," close=")">
|
|
|
+ "planWeight" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="nowLocation != null">
|
|
|
+ and
|
|
|
+ <foreach collection="nowLocation" item="item" open="(" separator="," close=")">
|
|
|
+ "nowLocation" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="realWeight != null">
|
|
|
+ and
|
|
|
+ <foreach collection="realWeight" item="item" open="(" separator="," close=")">
|
|
|
+ "realWeight" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="arriveTime != null">
|
|
|
+ and
|
|
|
+ <foreach collection="arriveTime" item="item" open="(" separator="," close=")">
|
|
|
+ "arriveTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="liveTime != null">
|
|
|
+ and
|
|
|
+ <foreach collection="liveTime" item="item" open="(" separator="," close=")">
|
|
|
+ "liveTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="startPortName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="startPortName" item="item" open="(" separator="," close=")">
|
|
|
+ "startPortName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="arrivePortName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="arrivePortName" item="item" open="(" separator="," close=")">
|
|
|
+ "arrivePortName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="loadTime != null">
|
|
|
+ and
|
|
|
+ <foreach collection="loadTime" item="item" open="(" separator="," close=")">
|
|
|
+ "loadTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="isClear != null">
|
|
|
+ and
|
|
|
+ <foreach collection="isClear" item="item" open="(" separator="," close=")">
|
|
|
+ "isClear" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="memo != null">
|
|
|
+ and
|
|
|
+ <foreach collection="memo" item="item" open="(" separator="," close=")">
|
|
|
+ "memo" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderByInsertTime"></include>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectAllWeight" resultType="DECIMAL" parameterType="DECIMAL">
|
|
|
+ select SUM(t_loadShip.RESULT_ACTUAL_INSTALLATIONS) "sumWeight"
|
|
|
+ from OMSSHIP_INSTRUCTIONS_CAPACITY oi_capacity
|
|
|
+ left join TMSSHIP_TOTAL_RESULT t_total
|
|
|
+ on oi_capacity.INSTRUCTIONS_CAPACITY_ID = t_total.ORDER_ID
|
|
|
+ left join TMSSHIP_LOAD_SHIP_RESULT t_loadShip
|
|
|
+ on t_total.RESULT_ID = t_loadShip.TOTAL_RESULT_ID
|
|
|
+ where oi_capacity.INSTRUCTIONS_ID = #{instructionsId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectLoadShip" parameterType="DECIMAL" resultType="java.util.Map">
|
|
|
+ SELECT LOCATION_START_PORT_ID "locationStartPortId",
|
|
|
+ ARRIVAL_PORT_ID "arrivalPortId",
|
|
|
+ BATCH_ID "batchId",
|
|
|
+ RESULT_DELIVERY_DATE "resultDeliveryDate",
|
|
|
+ RESULT_ACTUAL_INSTALLATIONS "resultActualInstallations",
|
|
|
+ RWAREHOUSE_MATERIAL_ID "rwarehouseMaterialId",
|
|
|
+ RESULT_ARRIVAL_PORT_TIME "resultArrivalPortTime",
|
|
|
+ RESULT_OUT_PORT_TIME "resultOutPortTime",
|
|
|
+ RESULT_LOAD_SHIP_DATE "resultLoadShipDate",
|
|
|
+ RESULT_ISCLEAR "resultIsClear"
|
|
|
+ FROM TMSSHIP_LOAD_SHIP_RESULT
|
|
|
+ WHERE RESULT_ID = #{resultId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 通过外轮船名和物资名称得到批次id -->
|
|
|
+ <select id="getBatchId" parameterType="java.util.Map" resultType="DECIMAL">
|
|
|
+ SELECT BATCH_ID
|
|
|
+ FROM DIL_BATCH db
|
|
|
+ LEFT JOIN RMS_MATERIAL rm
|
|
|
+ ON rm.MATERIAL_ID = db.MATERIAL_ID
|
|
|
+ WHERE rm.MATERIAL_NAME = #{materialName}
|
|
|
+ AND db.RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
|
|
|
+ </select>
|
|
|
+</mapper>
|