|
@@ -4,8 +4,6 @@
|
|
<resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
<resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
<id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
|
|
<id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
|
|
<result column="TOTAL_RESULT_ID" jdbcType="DECIMAL" property="totalResultId"/>
|
|
<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="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
|
|
<result column="RESULT_DELIVERY_DATE" jdbcType="TIMESTAMP" property="resultDeliveryDate"/>
|
|
<result column="RESULT_DELIVERY_DATE" jdbcType="TIMESTAMP" property="resultDeliveryDate"/>
|
|
<result column="RESULT_ACTUAL_INSTALLATIONS" jdbcType="DECIMAL" property="resultActualInstallations"/>
|
|
<result column="RESULT_ACTUAL_INSTALLATIONS" jdbcType="DECIMAL" property="resultActualInstallations"/>
|
|
@@ -25,14 +23,14 @@
|
|
<result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
|
|
<result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="columns">
|
|
<sql id="columns">
|
|
- RESULT_ID, TOTAL_RESULT_ID, LOCATION_START_PORT_ID, ARRIVAL_PORT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
|
|
|
|
|
|
+ RESULT_ID, TOTAL_RESULT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
|
|
RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER, RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
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,
|
|
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,
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
DELETED
|
|
DELETED
|
|
</sql>
|
|
</sql>
|
|
<sql id="columns_alias">
|
|
<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_ID, t.TOTAL_RESULT_ID, t.BATCH_ID,
|
|
t.RESULT_DELIVERY_DATE, t.RESULT_ACTUAL_INSTALLATIONS, t.RESULT_NUMBER, t.RWAREHOUSE_MATERIAL_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.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.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
@@ -56,12 +54,6 @@
|
|
<if test="totalResultId != null">
|
|
<if test="totalResultId != null">
|
|
and TOTAL_RESULT_ID = #{totalResultId}
|
|
and TOTAL_RESULT_ID = #{totalResultId}
|
|
</if>
|
|
</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">
|
|
<if test="batchId != null">
|
|
and BATCH_ID = #{batchId}
|
|
and BATCH_ID = #{batchId}
|
|
</if>
|
|
</if>
|
|
@@ -123,12 +115,6 @@
|
|
<if test="totalResultId != null">
|
|
<if test="totalResultId != null">
|
|
and TOTAL_RESULT_ID = #{totalResultId}
|
|
and TOTAL_RESULT_ID = #{totalResultId}
|
|
</if>
|
|
</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">
|
|
<if test="batchId != null">
|
|
and BATCH_ID = #{batchId}
|
|
and BATCH_ID = #{batchId}
|
|
</if>
|
|
</if>
|
|
@@ -193,12 +179,6 @@
|
|
<if test="totalResultId != null">
|
|
<if test="totalResultId != null">
|
|
or TOTAL_RESULT_ID = #{totalResultId}
|
|
or TOTAL_RESULT_ID = #{totalResultId}
|
|
</if>
|
|
</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">
|
|
<if test="batchId != null">
|
|
or BATCH_ID = #{batchId}
|
|
or BATCH_ID = #{batchId}
|
|
</if>
|
|
</if>
|
|
@@ -252,8 +232,8 @@
|
|
</if>
|
|
</if>
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
<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,
|
|
|
|
|
|
+ insert into TMSSHIP_LOAD_SHIP_RESULT (RESULT_ID, TOTAL_RESULT_ID,
|
|
|
|
+ BATCH_ID, RESULT_DELIVERY_DATE,
|
|
RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
|
|
RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
|
|
RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
|
|
RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
|
|
@@ -261,8 +241,7 @@
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED)
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED)
|
|
values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL},
|
|
values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL},
|
|
- #{locationStartPortId,jdbcType=DECIMAL},
|
|
|
|
- #{arrivalPortId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL},
|
|
|
|
|
|
+ #{batchId,jdbcType=DECIMAL},
|
|
#{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
#{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
#{resultActualInstallations,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR},
|
|
#{resultActualInstallations,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR},
|
|
#{rwarehouseMaterialId,jdbcType=DECIMAL}, #{resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
#{rwarehouseMaterialId,jdbcType=DECIMAL}, #{resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
@@ -281,12 +260,6 @@
|
|
<if test="totalResultId != null">
|
|
<if test="totalResultId != null">
|
|
TOTAL_RESULT_ID,
|
|
TOTAL_RESULT_ID,
|
|
</if>
|
|
</if>
|
|
- <if test="locationStartPortId != null">
|
|
|
|
- LOCATION_START_PORT_ID,
|
|
|
|
- </if>
|
|
|
|
- <if test="arrivalPortId != null">
|
|
|
|
- ARRIVAL_PORT_ID,
|
|
|
|
- </if>
|
|
|
|
<if test="batchId != null">
|
|
<if test="batchId != null">
|
|
BATCH_ID,
|
|
BATCH_ID,
|
|
</if>
|
|
</if>
|
|
@@ -346,12 +319,6 @@
|
|
<if test="totalResultId != null">
|
|
<if test="totalResultId != null">
|
|
#{totalResultId,jdbcType=DECIMAL},
|
|
#{totalResultId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
- <if test="locationStartPortId != null">
|
|
|
|
- #{locationStartPortId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
- <if test="arrivalPortId != null">
|
|
|
|
- #{arrivalPortId,jdbcType=DECIMAL},
|
|
|
|
- </if>
|
|
|
|
<if test="batchId != null">
|
|
<if test="batchId != null">
|
|
#{batchId,jdbcType=DECIMAL},
|
|
#{batchId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
@@ -408,8 +375,6 @@
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmsshipLoadShipResult">
|
|
update TMSSHIP_LOAD_SHIP_RESULT
|
|
update TMSSHIP_LOAD_SHIP_RESULT
|
|
set TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
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},
|
|
BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
RESULT_DELIVERY_DATE = #{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
RESULT_DELIVERY_DATE = #{resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations,jdbcType=DECIMAL},
|
|
RESULT_ACTUAL_INSTALLATIONS = #{resultActualInstallations,jdbcType=DECIMAL},
|
|
@@ -435,12 +400,6 @@
|
|
<if test="totalResultId != null">
|
|
<if test="totalResultId != null">
|
|
TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
</if>
|
|
</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">
|
|
<if test="batchId != null">
|
|
BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
@@ -510,8 +469,8 @@
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
insert into TMSSHIP_LOAD_SHIP_RESULT
|
|
insert into TMSSHIP_LOAD_SHIP_RESULT
|
|
(RESULT_ID,
|
|
(RESULT_ID,
|
|
- TOTAL_RESULT_ID, LOCATION_START_PORT_ID,
|
|
|
|
- ARRIVAL_PORT_ID, BATCH_ID, RESULT_DELIVERY_DATE,
|
|
|
|
|
|
+ TOTAL_RESULT_ID,
|
|
|
|
+ BATCH_ID, RESULT_DELIVERY_DATE,
|
|
RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
|
|
RESULT_ACTUAL_INSTALLATIONS, RESULT_NUMBER,
|
|
RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
RWAREHOUSE_MATERIAL_ID, RESULT_ARRIVAL_PORT_TIME,
|
|
RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
|
|
RESULT_OUT_PORT_TIME, RESULT_LOAD_SHIP_DATE,
|
|
@@ -522,8 +481,7 @@
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
select
|
|
select
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
- #{item.totalResultId,jdbcType=DECIMAL}, #{item.locationStartPortId,jdbcType=DECIMAL},
|
|
|
|
- #{item.arrivalPortId,jdbcType=DECIMAL}, #{item.batchId,jdbcType=DECIMAL},
|
|
|
|
|
|
+ #{item.totalResultId,jdbcType=DECIMAL},
|
|
#{item.resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
#{item.resultDeliveryDate,jdbcType=TIMESTAMP},
|
|
#{item.resultActualInstallations,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=VARCHAR},
|
|
#{item.resultActualInstallations,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=VARCHAR},
|
|
#{item.rwarehouseMaterialId,jdbcType=DECIMAL}, #{item.resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
#{item.rwarehouseMaterialId,jdbcType=DECIMAL}, #{item.resultArrivalPortTime,jdbcType=TIMESTAMP},
|
|
@@ -546,14 +504,6 @@
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
|
|
</foreach>
|
|
</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=
|
|
,BATCH_ID=
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
@@ -700,9 +650,9 @@
|
|
LEFT JOIN TMSSHIP_SHIP_LOCATION tsl
|
|
LEFT JOIN TMSSHIP_SHIP_LOCATION tsl
|
|
ON ttr.RESULT_ID = tsl.TOTAL_RESULT_ID
|
|
ON ttr.RESULT_ID = tsl.TOTAL_RESULT_ID
|
|
LEFT JOIN RMS_PORT rps
|
|
LEFT JOIN RMS_PORT rps
|
|
- ON tlsr.LOCATION_START_PORT_ID = rps.PORT_ID
|
|
|
|
|
|
+ ON ada.DOWN_SWIM_PORT_ID = rps.PORT_ID
|
|
LEFT JOIN RMS_PORT rpe
|
|
LEFT JOIN RMS_PORT rpe
|
|
- ON tlsr.ARRIVAL_PORT_ID = rpe.PORT_ID
|
|
|
|
|
|
+ ON ada.PORT_ID = rpe.PORT_ID
|
|
WHERE tlsr.DELETED = 0)
|
|
WHERE tlsr.DELETED = 0)
|
|
<where>
|
|
<where>
|
|
<if test="noticePort != null">
|
|
<if test="noticePort != null">
|
|
@@ -861,9 +811,11 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 通过港口查询港存库实时库存id -->
|
|
<!-- 通过港口查询港存库实时库存id -->
|
|
- <select id="selectGmIdByPortId" parameterType="java.lang.Integer" resultType="java.math.BigDecimal">
|
|
|
|
|
|
+ <select id="selectGmIdByPortId" parameterType="java.util.Map" resultType="java.util.Map">
|
|
select WGM.GM_ID "gmId"
|
|
select WGM.GM_ID "gmId"
|
|
from WMSH_GRID_MATERIAL WGM
|
|
from WMSH_GRID_MATERIAL WGM
|
|
- WHERE WGM.PORT_ID=#{portId}
|
|
|
|
|
|
+ left join AMSSHIP_DELIVERY_ATTORNEY ADA
|
|
|
|
+ on ADA.BATCH_ID=WGM.BATCH_ID
|
|
|
|
+ WHERE WGM.BATCH_ID=#{batchId} and ADA.DOWN_SWIM_PORT_ID=#{downSwimPortId}
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|