|
@@ -1,601 +1,633 @@
|
|
|
<?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.OmsshipShipmentInstructionsMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
- <id column="SHIPMENT_INSTRUCTIONS_ID" jdbcType="DECIMAL" property="shipmentInstructionsId" />
|
|
|
- <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
|
|
|
- <result column="RECIPIENT_CARRIER_ID" jdbcType="DECIMAL" property="recipientCarrierId" />
|
|
|
- <result column="PORT_CARRIER_ID" jdbcType="DECIMAL" property="portCarrierId" />
|
|
|
- <result column="INSTRUCTIONS_TOTAL_TONNAGE" jdbcType="DECIMAL" property="instructionsTotalTonnage" />
|
|
|
- <result column="INSTRUCTION_TIME" jdbcType="TIMESTAMP" property="instructionTime" />
|
|
|
- <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" />
|
|
|
- <result column="INSTRUCTION_ISSUE_STATUS" jdbcType="VARCHAR" property="instructionIssueStatus" />
|
|
|
- </resultMap>
|
|
|
- <sql id="columns">
|
|
|
- SHIPMENT_INSTRUCTIONS_ID, BATCH_ID, RECIPIENT_CARRIER_ID, PORT_CARRIER_ID, INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
+ <id column="SHIPMENT_INSTRUCTIONS_ID" jdbcType="DECIMAL" property="shipmentInstructionsId"/>
|
|
|
+ <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
|
|
|
+ <result column="RECIPIENT_CARRIER_ID" jdbcType="DECIMAL" property="recipientCarrierId"/>
|
|
|
+ <result column="PORT_CARRIER_ID" jdbcType="DECIMAL" property="portCarrierId"/>
|
|
|
+ <result column="INSTRUCTIONS_TOTAL_TONNAGE" jdbcType="DECIMAL" property="instructionsTotalTonnage"/>
|
|
|
+ <result column="INSTRUCTION_TIME" jdbcType="TIMESTAMP" property="instructionTime"/>
|
|
|
+ <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"/>
|
|
|
+ <result column="INSTRUCTION_ISSUE_STATUS" jdbcType="VARCHAR" property="instructionIssueStatus"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ SHIPMENT_INSTRUCTIONS_ID, BATCH_ID, RECIPIENT_CARRIER_ID, PORT_CARRIER_ID, INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
INSTRUCTION_TIME, DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, INSTRUCTION_ISSUE_STATUS
|
|
|
- </sql>
|
|
|
- <sql id="columns_alias">
|
|
|
- t.SHIPMENT_INSTRUCTIONS_ID, t.BATCH_ID, t.RECIPIENT_CARRIER_ID, t.PORT_CARRIER_ID,
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.SHIPMENT_INSTRUCTIONS_ID, t.BATCH_ID, t.RECIPIENT_CARRIER_ID, t.PORT_CARRIER_ID,
|
|
|
t.INSTRUCTIONS_TOTAL_TONNAGE, t.INSTRUCTION_TIME, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME,
|
|
|
t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
t.INSTRUCTION_ISSUE_STATUS
|
|
|
- </sql>
|
|
|
- <sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- </sql>
|
|
|
- <sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias"/> FROM OMSSHIP_SHIPMENT_INSTRUCTIONS t
|
|
|
- </sql>
|
|
|
- <sql id="where">
|
|
|
- <where>
|
|
|
- <if test="shipmentInstructionsId != null">
|
|
|
- and SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
|
|
|
- </if>
|
|
|
- <if test="batchId != null">
|
|
|
- and BATCH_ID = #{batchId}
|
|
|
- </if>
|
|
|
- <if test="recipientCarrierId != null">
|
|
|
- and RECIPIENT_CARRIER_ID = #{recipientCarrierId}
|
|
|
- </if>
|
|
|
- <if test="portCarrierId != null">
|
|
|
- and PORT_CARRIER_ID = #{portCarrierId}
|
|
|
- </if>
|
|
|
- <if test="instructionsTotalTonnage != null">
|
|
|
- and INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage}
|
|
|
- </if>
|
|
|
- <if test="instructionTime != null">
|
|
|
- and TO_CHAR(INSTRUCTION_TIME,'yyyy-MM-dd') = #{instructionTime}
|
|
|
- </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>
|
|
|
- <if test="instructionIssueStatus != null and instructionIssueStatus != ''">
|
|
|
- and INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
- <sql id="whereLike">
|
|
|
- <where>
|
|
|
- <if test="shipmentInstructionsId != null">
|
|
|
- and SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
|
|
|
- </if>
|
|
|
- <if test="batchId != null">
|
|
|
- and BATCH_ID = #{batchId}
|
|
|
- </if>
|
|
|
- <if test="recipientCarrierId != null">
|
|
|
- and RECIPIENT_CARRIER_ID = #{recipientCarrierId}
|
|
|
- </if>
|
|
|
- <if test="portCarrierId != null">
|
|
|
- and PORT_CARRIER_ID = #{portCarrierId}
|
|
|
- </if>
|
|
|
- <if test="instructionsTotalTonnage != null">
|
|
|
- and INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage}
|
|
|
- </if>
|
|
|
- <if test="instructionTime != null">
|
|
|
- and TO_CHAR(INSTRUCTION_TIME,'yyyy-MM-dd') = #{instructionTime}
|
|
|
- </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>
|
|
|
- <if test="instructionIssueStatus != null and instructionIssueStatus != ''">
|
|
|
- and INSTRUCTION_ISSUE_STATUS LIKE '%${instructionIssueStatus}%'
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
- delete from OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
- </delete>
|
|
|
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
- delete from OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- where 1!=1
|
|
|
- <if test="batchId != null">
|
|
|
- or BATCH_ID = #{batchId}
|
|
|
- </if>
|
|
|
- <if test="recipientCarrierId != null">
|
|
|
- or RECIPIENT_CARRIER_ID = #{recipientCarrierId}
|
|
|
- </if>
|
|
|
- <if test="portCarrierId != null">
|
|
|
- or PORT_CARRIER_ID = #{portCarrierId}
|
|
|
- </if>
|
|
|
- <if test="instructionsTotalTonnage != null">
|
|
|
- or INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage}
|
|
|
- </if>
|
|
|
- <if test="instructionTime != null">
|
|
|
- or TO_CHAR(INSTRUCTION_TIME,'yyyy-MM-dd') = '#{instructionTime}'
|
|
|
- </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>
|
|
|
- <if test="instructionIssueStatus != null and instructionIssueStatus != ''">
|
|
|
- or INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus}
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
- <insert id="insert" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
- insert into OMSSHIP_SHIPMENT_INSTRUCTIONS (SHIPMENT_INSTRUCTIONS_ID, BATCH_ID,
|
|
|
- RECIPIENT_CARRIER_ID, PORT_CARRIER_ID, INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
- INSTRUCTION_TIME, DELETE_NAME, DELETE_TIME,
|
|
|
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
- INSTRUCTION_ISSUE_STATUS)
|
|
|
- values (#{shipmentInstructionsId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL},
|
|
|
- #{recipientCarrierId,jdbcType=DECIMAL}, #{portCarrierId,jdbcType=DECIMAL}, #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
- #{instructionTime,jdbcType=TIMESTAMP}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR},
|
|
|
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
|
|
|
- #{instructionIssueStatus,jdbcType=VARCHAR})
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
- insert into OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="shipmentInstructionsId != null">
|
|
|
- SHIPMENT_INSTRUCTIONS_ID,
|
|
|
- </if>
|
|
|
- <if test="batchId != null">
|
|
|
- BATCH_ID,
|
|
|
- </if>
|
|
|
- <if test="recipientCarrierId != null">
|
|
|
- RECIPIENT_CARRIER_ID,
|
|
|
- </if>
|
|
|
- <if test="portCarrierId != null">
|
|
|
- PORT_CARRIER_ID,
|
|
|
- </if>
|
|
|
- <if test="instructionsTotalTonnage != null">
|
|
|
- INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
- </if>
|
|
|
- <if test="instructionTime != null">
|
|
|
- INSTRUCTION_TIME,
|
|
|
- </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>
|
|
|
- <if test="instructionIssueStatus != null">
|
|
|
- INSTRUCTION_ISSUE_STATUS,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="shipmentInstructionsId != null">
|
|
|
- #{shipmentInstructionsId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="batchId != null">
|
|
|
- #{batchId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="recipientCarrierId != null">
|
|
|
- #{recipientCarrierId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="portCarrierId != null">
|
|
|
- #{portCarrierId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="instructionsTotalTonnage != null">
|
|
|
- #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="instructionTime != null">
|
|
|
- #{instructionTime,jdbcType=TIMESTAMP},
|
|
|
- </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>
|
|
|
- <if test="instructionIssueStatus != null">
|
|
|
- #{instructionIssueStatus,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
- update OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- set BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
- RECIPIENT_CARRIER_ID = #{recipientCarrierId,jdbcType=DECIMAL},
|
|
|
- PORT_CARRIER_ID = #{portCarrierId,jdbcType=DECIMAL},
|
|
|
- INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
- INSTRUCTION_TIME = #{instructionTime,jdbcType=TIMESTAMP},
|
|
|
- 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},
|
|
|
- INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus,jdbcType=VARCHAR}
|
|
|
- where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
- update OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- <set>
|
|
|
- <if test="batchId != null">
|
|
|
- BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="recipientCarrierId != null">
|
|
|
- RECIPIENT_CARRIER_ID = #{recipientCarrierId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="portCarrierId != null">
|
|
|
- PORT_CARRIER_ID = #{portCarrierId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="instructionsTotalTonnage != null">
|
|
|
- INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="instructionTime != null">
|
|
|
- INSTRUCTION_TIME = #{instructionTime,jdbcType=TIMESTAMP},
|
|
|
- </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>
|
|
|
- <if test="instructionIssueStatus != null">
|
|
|
- INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
- </update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,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 OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- (SHIPMENT_INSTRUCTIONS_ID,
|
|
|
- BATCH_ID, RECIPIENT_CARRIER_ID,
|
|
|
- PORT_CARRIER_ID, INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
- INSTRUCTION_TIME, DELETE_NAME,
|
|
|
- DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
|
|
|
- UPDATE_USERNAME, UPDATE_TIME,
|
|
|
- INSERT_UPDATE_REMARK, DELETED,
|
|
|
- INSTRUCTION_ISSUE_STATUS)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.shipmentInstructionsId,jdbcType=DECIMAL},
|
|
|
- #{item.batchId,jdbcType=DECIMAL}, #{item.recipientCarrierId,jdbcType=DECIMAL},
|
|
|
- #{item.portCarrierId,jdbcType=DECIMAL}, #{item.instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
- #{item.instructionTime,jdbcType=TIMESTAMP}, #{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},
|
|
|
- #{item.instructionIssueStatus,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
- </insert>
|
|
|
- <update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- set
|
|
|
- SHIPMENT_INSTRUCTIONS_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,BATCH_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RECIPIENT_CARRIER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.recipientCarrierId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,PORT_CARRIER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.portCarrierId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,INSTRUCTIONS_TOTAL_TONNAGE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.instructionsTotalTonnage,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,INSTRUCTION_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.instructionTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,DELETE_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,DELETE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,DELETED=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,INSTRUCTION_ISSUE_STATUS=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID" close="end">
|
|
|
- when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.instructionIssueStatus,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where SHIPMENT_INSTRUCTIONS_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
- #{item.shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- </update>
|
|
|
- <delete id="batchDelete" parameterType="java.util.List">
|
|
|
- delete from OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- where SHIPMENT_INSTRUCTIONS_ID in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
- <!-- 友情提示!!!-->
|
|
|
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
- <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="selectAll" resultType="java.util.Map">
|
|
|
- select *
|
|
|
- from(
|
|
|
- select distinct
|
|
|
- osi.SHIPMENT_INSTRUCTIONS_ID "instructionsId",
|
|
|
- osi.INSERT_TIME "insertTime",
|
|
|
- rpi.PIER_NAME "piername",
|
|
|
- rpo.PORT_NAME "portname",
|
|
|
- rpo.PORT_NAME "portname2",
|
|
|
- rm.MATERIAL_NAME "materialName",
|
|
|
- db.RESULT_FOREIGN_SHIP_NAME "foreignShipName",
|
|
|
- rs.SHIPPER_NAME "shipperName",
|
|
|
- rs.SHIPPER_CONTACT_NUMBER "shipperContactNumber",
|
|
|
- osi.INSTRUCTION_TIME "instructionTime",
|
|
|
- osi.INSTRUCTIONS_TOTAL_TONNAGE "instruct"
|
|
|
- from OMSSHIP_SHIPMENT_INSTRUCTIONS osi
|
|
|
- left join AMSSHIP_DELIVERY_ATTORNEY ada
|
|
|
- on osi.BATCH_ID = ada.BATCH_ID
|
|
|
- left join RMS_PIER rpi
|
|
|
- on osi.RECIPIENT_CARRIER_ID=rpi.PIER_ID
|
|
|
- left join RMS_PORT rpo
|
|
|
- on osi.PORT_CARRIER_ID=rpo.PORT_ID
|
|
|
- left join AMSSHIP_DELIVERY_NOTICE adn
|
|
|
- on ada.BATCH_ID=adn.BATCH_ID
|
|
|
- left join DIL_BATCH db
|
|
|
- on osi.BATCH_ID = db.BATCH_ID
|
|
|
- left join RMS_MATERIAL rm
|
|
|
- on db.MATERIAL_ID = rm.MATERIAL_ID
|
|
|
- left join RMS_SHIPPER rs
|
|
|
- on adn.REQUESTER_GROUP_ID=rs.SHIPPER_ID
|
|
|
- where osi.DELETED = 0
|
|
|
- )
|
|
|
- <where>
|
|
|
- <if test="piername!= null">
|
|
|
- and
|
|
|
- <foreach collection="piername" item="item" open="(" separator="," close=")">
|
|
|
- "piername" in #{item}
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns"/>
|
|
|
+ FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT
|
|
|
+ <include refid="columns_alias"/>
|
|
|
+ FROM OMSSHIP_SHIPMENT_INSTRUCTIONS t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="shipmentInstructionsId != null">
|
|
|
+ and SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ and BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="recipientCarrierId != null">
|
|
|
+ and RECIPIENT_CARRIER_ID = #{recipientCarrierId}
|
|
|
+ </if>
|
|
|
+ <if test="portCarrierId != null">
|
|
|
+ and PORT_CARRIER_ID = #{portCarrierId}
|
|
|
+ </if>
|
|
|
+ <if test="instructionsTotalTonnage != null">
|
|
|
+ and INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime != null">
|
|
|
+ and TO_CHAR(INSTRUCTION_TIME,'yyyy-MM-dd') = #{instructionTime}
|
|
|
+ </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>
|
|
|
+ <if test="instructionIssueStatus != null and instructionIssueStatus != ''">
|
|
|
+ and INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="shipmentInstructionsId != null">
|
|
|
+ and SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ and BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="recipientCarrierId != null">
|
|
|
+ and RECIPIENT_CARRIER_ID = #{recipientCarrierId}
|
|
|
+ </if>
|
|
|
+ <if test="portCarrierId != null">
|
|
|
+ and PORT_CARRIER_ID = #{portCarrierId}
|
|
|
+ </if>
|
|
|
+ <if test="instructionsTotalTonnage != null">
|
|
|
+ and INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime != null">
|
|
|
+ and TO_CHAR(INSTRUCTION_TIME,'yyyy-MM-dd') = #{instructionTime}
|
|
|
+ </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>
|
|
|
+ <if test="instructionIssueStatus != null and instructionIssueStatus != ''">
|
|
|
+ and INSTRUCTION_ISSUE_STATUS LIKE '%${instructionIssueStatus}%'
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete
|
|
|
+ from OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ where 1!=1
|
|
|
+ <if test="batchId != null">
|
|
|
+ or BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="recipientCarrierId != null">
|
|
|
+ or RECIPIENT_CARRIER_ID = #{recipientCarrierId}
|
|
|
+ </if>
|
|
|
+ <if test="portCarrierId != null">
|
|
|
+ or PORT_CARRIER_ID = #{portCarrierId}
|
|
|
+ </if>
|
|
|
+ <if test="instructionsTotalTonnage != null">
|
|
|
+ or INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime != null">
|
|
|
+ or TO_CHAR(INSTRUCTION_TIME,'yyyy-MM-dd') = '#{instructionTime}'
|
|
|
+ </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>
|
|
|
+ <if test="instructionIssueStatus != null and instructionIssueStatus != ''">
|
|
|
+ or INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
+ insert into OMSSHIP_SHIPMENT_INSTRUCTIONS (SHIPMENT_INSTRUCTIONS_ID, BATCH_ID,
|
|
|
+ RECIPIENT_CARRIER_ID, PORT_CARRIER_ID, INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
+ INSTRUCTION_TIME, DELETE_NAME, DELETE_TIME,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
+ INSTRUCTION_ISSUE_STATUS)
|
|
|
+ values (#{shipmentInstructionsId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL},
|
|
|
+ #{recipientCarrierId,jdbcType=DECIMAL}, #{portCarrierId,jdbcType=DECIMAL},
|
|
|
+ #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
+ #{instructionTime,jdbcType=TIMESTAMP}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
|
|
|
+ #{instructionIssueStatus,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
+ insert into OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="shipmentInstructionsId != null">
|
|
|
+ SHIPMENT_INSTRUCTIONS_ID,
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ BATCH_ID,
|
|
|
+ </if>
|
|
|
+ <if test="recipientCarrierId != null">
|
|
|
+ RECIPIENT_CARRIER_ID,
|
|
|
+ </if>
|
|
|
+ <if test="portCarrierId != null">
|
|
|
+ PORT_CARRIER_ID,
|
|
|
+ </if>
|
|
|
+ <if test="instructionsTotalTonnage != null">
|
|
|
+ INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime != null">
|
|
|
+ INSTRUCTION_TIME,
|
|
|
+ </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>
|
|
|
+ <if test="instructionIssueStatus != null">
|
|
|
+ INSTRUCTION_ISSUE_STATUS,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="shipmentInstructionsId != null">
|
|
|
+ #{shipmentInstructionsId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ #{batchId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="recipientCarrierId != null">
|
|
|
+ #{recipientCarrierId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="portCarrierId != null">
|
|
|
+ #{portCarrierId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="instructionsTotalTonnage != null">
|
|
|
+ #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime != null">
|
|
|
+ #{instructionTime,jdbcType=TIMESTAMP},
|
|
|
+ </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>
|
|
|
+ <if test="instructionIssueStatus != null">
|
|
|
+ #{instructionIssueStatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
+ update OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ set BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ RECIPIENT_CARRIER_ID = #{recipientCarrierId,jdbcType=DECIMAL},
|
|
|
+ PORT_CARRIER_ID = #{portCarrierId,jdbcType=DECIMAL},
|
|
|
+ INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
+ INSTRUCTION_TIME = #{instructionTime,jdbcType=TIMESTAMP},
|
|
|
+ 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},
|
|
|
+ INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus,jdbcType=VARCHAR}
|
|
|
+ where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmsshipShipmentInstructions">
|
|
|
+ update OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ <set>
|
|
|
+ <if test="batchId != null">
|
|
|
+ BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="recipientCarrierId != null">
|
|
|
+ RECIPIENT_CARRIER_ID = #{recipientCarrierId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="portCarrierId != null">
|
|
|
+ PORT_CARRIER_ID = #{portCarrierId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="instructionsTotalTonnage != null">
|
|
|
+ INSTRUCTIONS_TOTAL_TONNAGE = #{instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime != null">
|
|
|
+ INSTRUCTION_TIME = #{instructionTime,jdbcType=TIMESTAMP},
|
|
|
+ </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>
|
|
|
+ <if test="instructionIssueStatus != null">
|
|
|
+ INSTRUCTION_ISSUE_STATUS = #{instructionIssueStatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId,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 OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ (SHIPMENT_INSTRUCTIONS_ID,
|
|
|
+ BATCH_ID, RECIPIENT_CARRIER_ID,
|
|
|
+ PORT_CARRIER_ID, INSTRUCTIONS_TOTAL_TONNAGE,
|
|
|
+ INSTRUCTION_TIME, DELETE_NAME,
|
|
|
+ DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK, DELETED,
|
|
|
+ INSTRUCTION_ISSUE_STATUS)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.shipmentInstructionsId,jdbcType=DECIMAL},
|
|
|
+ #{item.batchId,jdbcType=DECIMAL}, #{item.recipientCarrierId,jdbcType=DECIMAL},
|
|
|
+ #{item.portCarrierId,jdbcType=DECIMAL}, #{item.instructionsTotalTonnage,jdbcType=DECIMAL},
|
|
|
+ #{item.instructionTime,jdbcType=TIMESTAMP}, #{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},
|
|
|
+ #{item.instructionIssueStatus,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ set
|
|
|
+ SHIPMENT_INSTRUCTIONS_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="portname!= null">
|
|
|
- and
|
|
|
- <foreach collection="portname" item="item" open="(" separator="," close=")">
|
|
|
- "portname" in #{item}
|
|
|
+ ,BATCH_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="portname2!= null">
|
|
|
- and
|
|
|
- <foreach collection="portname2" item="item" open="(" separator="," close=")">
|
|
|
- "portname2" in #{item}
|
|
|
+ ,RECIPIENT_CARRIER_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.recipientCarrierId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="materialName!= null">
|
|
|
- and
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="," close=")">
|
|
|
- "materialName" in #{item}
|
|
|
+ ,PORT_CARRIER_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.portCarrierId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="foreignShipName!= null">
|
|
|
- and
|
|
|
- <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
|
|
|
- "foreignShipName" in #{item}
|
|
|
+ ,INSTRUCTIONS_TOTAL_TONNAGE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.instructionsTotalTonnage,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="shipperName!= null">
|
|
|
- and
|
|
|
- <foreach collection="shipperName" item="item" open="(" separator="," close=")">
|
|
|
- "shipperName" in #{item}
|
|
|
+ ,INSTRUCTION_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.instructionTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="shipperContactNumber!= null">
|
|
|
- and
|
|
|
- <foreach collection="shipperContactNumber" item="item" open="(" separator="," close=")">
|
|
|
- "shipperContactNumber" in #{item}
|
|
|
+ ,DELETE_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="instructionTime!= null">
|
|
|
- and
|
|
|
- <foreach collection="instructionTime" item="item" open="(" separator="," close=")">
|
|
|
- "instructionTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ ,DELETE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- <if test="instruct!= null">
|
|
|
- and
|
|
|
- <foreach collection="instruct" item="item" open="(" separator="," close=")">
|
|
|
- "instruct" in #{item}
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- <include refid="orderByInsertTime"></include>
|
|
|
- </select>
|
|
|
- <!-- 自动生成id-->
|
|
|
- <select id="selectMaxId" resultType="DECIMAL">
|
|
|
- SELECT MAX(SHIPMENT_INSTRUCTIONS_ID)+1 FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- </select>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSTRUCTION_ISSUE_STATUS=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case SHIPMENT_INSTRUCTIONS_ID"
|
|
|
+ close="end">
|
|
|
+ when #{item.shipmentInstructionsId,jdbcType=DECIMAL} then #{item.instructionIssueStatus,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where SHIPMENT_INSTRUCTIONS_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.shipmentInstructionsId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ where SHIPMENT_INSTRUCTIONS_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <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="selectAll" resultType="java.util.Map">
|
|
|
+ select *
|
|
|
+ from(
|
|
|
+ select distinct
|
|
|
+ osi.SHIPMENT_INSTRUCTIONS_ID "instructionsId",
|
|
|
+ osi.INSERT_TIME "insertTime",
|
|
|
+ rpi.PIER_NAME "piername",
|
|
|
+ rpo.PORT_NAME "portname",
|
|
|
+ rpo.PORT_NAME "portname2",
|
|
|
+ rm.MATERIAL_NAME "materialName",
|
|
|
+ db.RESULT_FOREIGN_SHIP_NAME "foreignShipName",
|
|
|
+ rs.SHIPPER_NAME "shipperName",
|
|
|
+ rs.SHIPPER_CONTACT_NUMBER "shipperContactNumber",
|
|
|
+ osi.INSTRUCTION_TIME "instructionTime",
|
|
|
+ osi.INSTRUCTIONS_TOTAL_TONNAGE "instruct"
|
|
|
+ from OMSSHIP_SHIPMENT_INSTRUCTIONS osi
|
|
|
+ left join AMSSHIP_DELIVERY_ATTORNEY ada
|
|
|
+ on osi.BATCH_ID = ada.BATCH_ID
|
|
|
+ left join RMS_PIER rpi
|
|
|
+ on osi.RECIPIENT_CARRIER_ID=rpi.PIER_ID
|
|
|
+ left join RMS_PORT rpo
|
|
|
+ on osi.PORT_CARRIER_ID=rpo.PORT_ID
|
|
|
+ left join AMSSHIP_DELIVERY_NOTICE adn
|
|
|
+ on ada.BATCH_ID=adn.BATCH_ID
|
|
|
+ left join DIL_BATCH db
|
|
|
+ on osi.BATCH_ID = db.BATCH_ID
|
|
|
+ left join RMS_MATERIAL rm
|
|
|
+ on db.MATERIAL_ID = rm.MATERIAL_ID
|
|
|
+ left join RMS_SHIPPER rs
|
|
|
+ on adn.REQUESTER_GROUP_ID=rs.SHIPPER_ID
|
|
|
+ where osi.DELETED = 0
|
|
|
+ )
|
|
|
+ <where>
|
|
|
+ <if test="piername!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="piername" item="item" open="(" separator="," close=")">
|
|
|
+ "piername" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="portname!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="portname" item="item" open="(" separator="," close=")">
|
|
|
+ "portname" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="portname2!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="portname2" item="item" open="(" separator="," close=")">
|
|
|
+ "portname2" 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="shipperName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="shipperName" item="item" open="(" separator="," close=")">
|
|
|
+ "shipperName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="shipperContactNumber!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="shipperContactNumber" item="item" open="(" separator="," close=")">
|
|
|
+ "shipperContactNumber" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="instructionTime!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="instructionTime" item="item" open="(" separator="," close=")">
|
|
|
+ "instructionTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="instruct!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="instruct" item="item" open="(" separator="," close=")">
|
|
|
+ "instruct" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderByInsertTime"></include>
|
|
|
+ </select>
|
|
|
+ <!-- 自动生成id-->
|
|
|
+ <select id="selectMaxId" resultType="DECIMAL">
|
|
|
+ SELECT MAX(SHIPMENT_INSTRUCTIONS_ID) + 1
|
|
|
+ FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectShipmentInstructions" parameterType="DECIMAL" resultType="java.util.Map">
|
|
|
+ SELECT BATCH_ID "batchId",
|
|
|
+ RECIPIENT_CARRIER_ID "recipientCarrierId",
|
|
|
+ PORT_CARRIER_ID "portCarrierId",
|
|
|
+ INSTRUCTIONS_TOTAL_TONNAGE "instructionsTotalTonnage",
|
|
|
+ INSTRUCTION_TIME "instructionTime"
|
|
|
+ FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
+ WHERE SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="selectShipmentInstructions" parameterType="DECIMAL" resultType="java.util.Map">
|
|
|
- SELECT
|
|
|
- BATCH_ID "batchId",
|
|
|
- RECIPIENT_CARRIER_ID "recipientCarrierId",
|
|
|
- PORT_CARRIER_ID "portCarrierId",
|
|
|
- INSTRUCTIONS_TOTAL_TONNAGE "instructionsTotalTonnage",
|
|
|
- INSTRUCTION_TIME "instructionTime"
|
|
|
- FROM OMSSHIP_SHIPMENT_INSTRUCTIONS
|
|
|
- WHERE SHIPMENT_INSTRUCTIONS_ID = #{shipmentInstructionsId}
|
|
|
- </select>
|
|
|
+ <!--得到批次id-->
|
|
|
+ <select id="getBatchId" resultType="java.util.LinkedHashMap">
|
|
|
+ select BATCH_ID "id",
|
|
|
+ BATCH_ID "value",
|
|
|
+ CONCAT(CONCAT(RM.MATERIAL_NAME, '"'), CONCAT(DB.RESULT_FOREIGN_SHIP_NAME, '"')) "label"
|
|
|
+ from DIL_BATCH DB
|
|
|
+ left join RMS_MATERIAL RM
|
|
|
+ on RM.MATERIAL_ID = DB.MATERIAL_ID
|
|
|
+ </select>
|
|
|
|
|
|
- <!--得到批次id-->
|
|
|
- <select id="getBatchId" resultType="java.util.LinkedHashMap">
|
|
|
- select
|
|
|
- BATCH_ID "id",
|
|
|
- BATCH_ID "value",
|
|
|
- CONCAT(CONCAT(RM.MATERIAL_NAME, '"'), CONCAT(DB.RESULT_FOREIGN_SHIP_NAME, '"')) "label"
|
|
|
- from DIL_BATCH DB
|
|
|
- left join RMS_MATERIAL RM
|
|
|
- on RM.MATERIAL_ID = DB.MATERIAL_ID
|
|
|
- </select>
|
|
|
+ <!-- 得到港口和码头 -->
|
|
|
+ <select id="getPortAndPier" parameterType="DECIMAL" resultType="java.util.Map">
|
|
|
+ SELECT ACTR.GROUP_ID AS "pierId",
|
|
|
+ ADN.PORT_ID AS "portId"
|
|
|
+ FROM AMSSHIP_CARGO_TRANSFER_RESULT ACTR
|
|
|
+ LEFT JOIN AMSSHIP_DELIVERY_NOTICE ADN
|
|
|
+ ON ADN.BATCH_ID = ACTR.BATCH_ID
|
|
|
+ WHERE ADN.BATCH_ID = #{batchId}
|
|
|
+ </select>
|
|
|
</mapper>
|