|
@@ -20,17 +20,19 @@
|
|
|
<result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
|
|
|
<result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
|
<result column="UNLOADER_ID" jdbcType="DECIMAL" property="unloaderId" />
|
|
|
+ <result column="UNLOAD_NUMBER" jdbcType="DECIMAL" property="unloadNumber" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID, RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
|
|
|
- UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID, SEGMENT_SQE, MATERIAL_ID, UNLOADER_ID
|
|
|
+ RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID, RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
|
|
|
+ UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID, SEGMENT_SQE, MATERIAL_ID, UNLOADER_ID,
|
|
|
+ UNLOAD_NUMBER
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.RESULT_ID, t.RESULT_NUMBER, t.RESULT_TOTAL_ID, t.RESULT_START_TIME, t.RESULT_END_TIME,
|
|
|
- t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID,
|
|
|
- t.SEGMENT_SQE, t.MATERIAL_ID, t.UNLOADER_ID
|
|
|
+ t.RESULT_ID, t.RESULT_NUMBER, t.RESULT_TOTAL_ID, t.RESULT_START_TIME, t.RESULT_END_TIME,
|
|
|
+ t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
+ t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID,
|
|
|
+ t.SEGMENT_SQE, t.MATERIAL_ID, t.UNLOADER_ID, t.UNLOAD_NUMBER
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM TMSTRUCK_UNLOAD_RESULT
|
|
@@ -94,6 +96,9 @@
|
|
|
<if test="unloaderId != null">
|
|
|
and UNLOADER_ID = #{unloaderId}
|
|
|
</if>
|
|
|
+ <if test="unloadNumber != null">
|
|
|
+ and UNLOAD_NUMBER = #{unloadNumber}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -152,6 +157,9 @@
|
|
|
<if test="unloaderId != null">
|
|
|
and UNLOADER_ID = #{unloaderId}
|
|
|
</if>
|
|
|
+ <if test="unloadNumber != null">
|
|
|
+ and UNLOAD_NUMBER = #{unloadNumber}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
@@ -212,6 +220,9 @@
|
|
|
<if test="unloaderId != null">
|
|
|
or UNLOADER_ID = #{unloaderId}
|
|
|
</if>
|
|
|
+ <if test="unloadNumber != null">
|
|
|
+ or UNLOAD_NUMBER = #{unloadNumber}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
|
insert into TMSTRUCK_UNLOAD_RESULT (RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID,
|
|
@@ -219,15 +230,15 @@
|
|
|
UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID,
|
|
|
- SEGMENT_SQE, MATERIAL_ID, UNLOADER_ID
|
|
|
- )
|
|
|
+ SEGMENT_SQE, MATERIAL_ID, UNLOADER_ID,
|
|
|
+ UNLOAD_NUMBER)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{resultTotalId,jdbcType=DECIMAL},
|
|
|
#{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP}, #{resultDuration,jdbcType=DECIMAL},
|
|
|
#{unloadStatus,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
#{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
#{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
- #{segmentSqe,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{unloaderId,jdbcType=DECIMAL}
|
|
|
- )
|
|
|
+ #{segmentSqe,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{unloaderId,jdbcType=DECIMAL},
|
|
|
+ #{unloadNumber,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
|
insert into TMSTRUCK_UNLOAD_RESULT
|
|
@@ -286,6 +297,9 @@
|
|
|
<if test="unloaderId != null">
|
|
|
UNLOADER_ID,
|
|
|
</if>
|
|
|
+ <if test="unloadNumber != null">
|
|
|
+ UNLOAD_NUMBER,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -342,6 +356,9 @@
|
|
|
<if test="unloaderId != null">
|
|
|
#{unloaderId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="unloadNumber != null">
|
|
|
+ #{unloadNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
@@ -362,7 +379,8 @@
|
|
|
RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
|
|
|
MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
- UNLOADER_ID = #{unloaderId,jdbcType=DECIMAL}
|
|
|
+ UNLOADER_ID = #{unloaderId,jdbcType=DECIMAL},
|
|
|
+ UNLOAD_NUMBER = #{unloadNumber,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
@@ -419,6 +437,9 @@
|
|
|
<if test="unloaderId != null">
|
|
|
UNLOADER_ID = #{unloaderId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="unloadNumber != null">
|
|
|
+ UNLOAD_NUMBER = #{unloadNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -444,8 +465,8 @@
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETE_NAME,
|
|
|
DELETE_TIME, RESULT_UNLOAD_PLACE_ID,
|
|
|
- SEGMENT_SQE, MATERIAL_ID, UNLOADER_ID
|
|
|
- )
|
|
|
+ SEGMENT_SQE, MATERIAL_ID, UNLOADER_ID,
|
|
|
+ UNLOAD_NUMBER)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
@@ -456,8 +477,8 @@
|
|
|
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
|
|
|
#{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
- #{item.segmentSqe,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.unloaderId,jdbcType=DECIMAL}
|
|
|
- from dual
|
|
|
+ #{item.segmentSqe,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.unloaderId,jdbcType=DECIMAL},
|
|
|
+ #{item.unloadNumber,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -535,6 +556,10 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.unloaderId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,UNLOAD_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
@@ -669,17 +694,17 @@
|
|
|
<select id="selectUnloadMesByOrderNo" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
select *
|
|
|
from (
|
|
|
- select
|
|
|
- TUR.RESULT_ID "resultId",
|
|
|
- TUR.SEGMENT_SQE "segmentSqe",
|
|
|
- TUR.RESULT_TOTAL_ID "resultTotalId"
|
|
|
- from TMSTRUCK_UNLOAD_RESULT TUR
|
|
|
- where TUR.RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
- <if test="updateLoadResult != null">
|
|
|
- and TUR.RESULT_END_TIME is null
|
|
|
- </if>
|
|
|
- order by TUR.SEGMENT_SQE
|
|
|
- )
|
|
|
+ select
|
|
|
+ TUR.RESULT_ID "resultId",
|
|
|
+ TUR.SEGMENT_SQE "segmentSqe",
|
|
|
+ TUR.RESULT_TOTAL_ID "resultTotalId"
|
|
|
+ from TMSTRUCK_UNLOAD_RESULT TUR
|
|
|
+ where TUR.RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
+ <if test="updateLoadResult != null">
|
|
|
+ and TUR.RESULT_END_TIME is null
|
|
|
+ </if>
|
|
|
+ order by TUR.SEGMENT_SQE
|
|
|
+ )
|
|
|
where rownum = 1
|
|
|
</select>
|
|
|
|
|
@@ -879,8 +904,8 @@
|
|
|
SELECT *
|
|
|
FROM (
|
|
|
SELECT
|
|
|
- distinct
|
|
|
- TUR.RESULT_ID "resultId",
|
|
|
+ distinct
|
|
|
+ TUR.RESULT_ID "resultId",
|
|
|
OO.ORDER_NUMBER || RC.CAPACITY_NUMBER || RW.WAREHOUSE_NAME || RM.MATERIAL_NAME "mohu",
|
|
|
OO.ORDER_NUMBER "orderNumber",
|
|
|
RC.CAPACITY_NUMBER "capacityNumber",
|
|
@@ -917,7 +942,7 @@
|
|
|
)
|
|
|
<where>
|
|
|
<if test="con !=null">
|
|
|
- and "mohu" like #{con}
|
|
|
+ and "mohu" like #{con}
|
|
|
</if>
|
|
|
<if test="orderNumber != null">
|
|
|
and
|
|
@@ -994,12 +1019,12 @@
|
|
|
<if test="orderTypee == 100">
|
|
|
AND OO.ORDER_TYPE in (12, 13 ,14,19)
|
|
|
</if>
|
|
|
- <if test="userId != null">
|
|
|
- and ASO.INSERT_USERNAME=#{userId}
|
|
|
- </if>
|
|
|
- <if test="userIds!=null">
|
|
|
- and ASO.UPDATE_USERNAME=#{userIds}
|
|
|
- </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ and ASO.INSERT_USERNAME=#{userId}
|
|
|
+ </if>
|
|
|
+ <if test="userIds!=null">
|
|
|
+ and ASO.UPDATE_USERNAME=#{userIds}
|
|
|
+ </if>
|
|
|
)
|
|
|
<where>
|
|
|
<if test="orderNumber != null">
|
|
@@ -1066,10 +1091,10 @@
|
|
|
oo.ORDER_NUMBER "orderNumber",
|
|
|
|
|
|
TTR.RESULT_TOTAL_ID "totalId"
|
|
|
- FROM OMSTRUCK_ORDER OO
|
|
|
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
- ON TTR.ORDER_ID = OO.ORDER_ID
|
|
|
- WHERE OO.ORDER_NUMBER = #{orderNumber}
|
|
|
+ FROM OMSTRUCK_ORDER OO
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
+ ON TTR.ORDER_ID = OO.ORDER_ID
|
|
|
+ WHERE OO.ORDER_NUMBER = #{orderNumber}
|
|
|
</select>
|
|
|
|
|
|
<select id="getNetWeightByTotalId" parameterType="java.math.BigDecimal" resultType="int">
|