|
@@ -7,8 +7,8 @@
|
|
|
<result column="AFTER_STACKING_ID" jdbcType="DECIMAL" property="afterStackingId" />
|
|
|
<result column="BEFORE_LEVEL" jdbcType="DECIMAL" property="beforeLevel" />
|
|
|
<result column="AFTER_BEFORE_STACKING_ID" jdbcType="DECIMAL" property="afterBeforeStackingId" />
|
|
|
-
|
|
|
<result column="QUANTITY" jdbcType="DECIMAL" property="quantity" />
|
|
|
+ <result column="TOTAL_QUANTITY" jdbcType="DECIMAL" property="tatalQuantity" />
|
|
|
<result column="RESULT_MOVELIST_TIME" jdbcType="TIMESTAMP" property="resultMovelistTime" />
|
|
|
<result column="KEEPER_ID" jdbcType="DECIMAL" property="keeperId" />
|
|
|
<result column="RESULT_KEEPER_ISSUE_TIME" jdbcType="TIMESTAMP" property="resultKeeperIssueTime" />
|
|
@@ -24,13 +24,13 @@
|
|
|
<result column="RESULT_REMARK" jdbcType="VARCHAR" property="resultRemark" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- RESULT_ID, RESULT_STACK_NUMBER, AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY, RESULT_MOVELIST_TIME, KEEPER_ID,
|
|
|
+ RESULT_ID, RESULT_STACK_NUMBER, AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY,TOTAL_QUANTITY, RESULT_MOVELIST_TIME, KEEPER_ID,
|
|
|
RESULT_KEEPER_ISSUE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETED, DISTRIBUTIONSTATUS, AFTER_WAREHOUSE_ID, RESULT_STATUS,
|
|
|
RESULT_REMARK
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.RESULT_ID, t.RESULT_STACK_NUMBER, t.AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY, t.RESULT_MOVELIST_TIME,
|
|
|
+ t.RESULT_ID, t.RESULT_STACK_NUMBER, t.AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY,TOTAL_QUANTITY, t.RESULT_MOVELIST_TIME,
|
|
|
t.KEEPER_ID, t.RESULT_KEEPER_ISSUE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.DISTRIBUTIONSTATUS, t.AFTER_WAREHOUSE_ID,
|
|
|
t.RESULT_STATUS, t.RESULT_REMARK
|
|
@@ -61,6 +61,9 @@
|
|
|
<if test="quantity != null">
|
|
|
and QUANTITY = #{quantity}
|
|
|
</if>
|
|
|
+ <if test="tatalQuantity != null">
|
|
|
+ and TOTAL_QUANTITY = #{tatalQuantity}
|
|
|
+ </if>
|
|
|
<if test="resultMovelistTime != null">
|
|
|
and TO_CHAR(RESULT_MOVELIST_TIME,'yyyy-MM-dd') = #{resultMovelistTime}
|
|
|
</if>
|
|
@@ -119,6 +122,9 @@
|
|
|
<if test="afterBeforeStackingId != null">
|
|
|
and AFTER_BEFORE_STACKING_ID = #{afterBeforeStackingId}
|
|
|
</if>
|
|
|
+ <if test="tatalQuantity != null">
|
|
|
+ and TOTAL_QUANTITY = #{tatalQuantity}
|
|
|
+ </if>
|
|
|
<if test="quantity != null">
|
|
|
and QUANTITY = #{quantity}
|
|
|
</if>
|
|
@@ -185,6 +191,9 @@
|
|
|
<if test="quantity != null">
|
|
|
or QUANTITY = #{quantity}
|
|
|
</if>
|
|
|
+ <if test="tatalQuantity != null">
|
|
|
+ or TOTAL_QUANTITY = #{tatalQuantity}
|
|
|
+ </if>
|
|
|
<if test="resultMovelistTime != null">
|
|
|
or TO_CHAR(RESULT_MOVELIST_TIME,'yyyy-MM-dd') = '#{resultMovelistTime}'
|
|
|
</if>
|
|
@@ -226,13 +235,13 @@
|
|
|
</if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.WmspRestackMakeResult">
|
|
|
- insert into WMSP_RESTACK_MAKE_RESULT (RESULT_ID, RESULT_STACK_NUMBER, AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY,
|
|
|
+ insert into WMSP_RESTACK_MAKE_RESULT (RESULT_ID, RESULT_STACK_NUMBER, AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY,TOTAL_QUANTITY,
|
|
|
RESULT_MOVELIST_TIME, KEEPER_ID, RESULT_KEEPER_ISSUE_TIME,
|
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
DISTRIBUTIONSTATUS, AFTER_WAREHOUSE_ID, RESULT_STATUS,
|
|
|
RESULT_REMARK)
|
|
|
- values (#{resultId,jdbcType=DECIMAL}, #{resultStackNumber,jdbcType=VARCHAR}, #{afterStackingId,jdbcType=DECIMAL}, #{beforeLevel,jdbcType=DECIMAL}, #{afterBeforeStackingId,jdbcType=DECIMAL},#{quantity,jdbcType=DECIMAL},
|
|
|
+ values (#{resultId,jdbcType=DECIMAL}, #{resultStackNumber,jdbcType=VARCHAR}, #{afterStackingId,jdbcType=DECIMAL}, #{beforeLevel,jdbcType=DECIMAL}, #{afterBeforeStackingId,jdbcType=DECIMAL},#{quantity,jdbcType=DECIMAL},#{tatalQuantity,jdbcType=DECIMAL},
|
|
|
#{resultMovelistTime,jdbcType=TIMESTAMP}, #{keeperId,jdbcType=DECIMAL}, #{resultKeeperIssueTime,jdbcType=TIMESTAMP},
|
|
|
#{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
|
|
@@ -257,6 +266,9 @@
|
|
|
<if test="afterBeforeStackingId != null">
|
|
|
AFTER_BEFORE_STACKING_ID,
|
|
|
</if>
|
|
|
+ <if test="tatalQuantity != null">
|
|
|
+ TOTAL_QUANTITY,
|
|
|
+ </if>
|
|
|
<if test="quantity != null">
|
|
|
QUANTITY,
|
|
|
</if>
|
|
@@ -320,6 +332,9 @@
|
|
|
<if test="quantity != null">
|
|
|
#{quantity,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="tatalQuantity != null">
|
|
|
+ #{tatalQuantity,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
<if test="resultMovelistTime != null">
|
|
|
#{resultMovelistTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
@@ -368,6 +383,7 @@
|
|
|
BEFORE_LEVEL = #{beforeLevel,jdbcType=DECIMAL},
|
|
|
AFTER_BEFORE_STACKING_ID = #{afterBeforeStackingId,jdbcType=DECIMAL},
|
|
|
QUANTITY = #{quantity,jdbcType=DECIMAL},
|
|
|
+ TOTAL_QUANTITY = #{tatalQuantity,jdbcType=DECIMAL},
|
|
|
RESULT_MOVELIST_TIME = #{resultMovelistTime,jdbcType=TIMESTAMP},
|
|
|
KEEPER_ID = #{keeperId,jdbcType=DECIMAL},
|
|
|
RESULT_KEEPER_ISSUE_TIME = #{resultKeeperIssueTime,jdbcType=TIMESTAMP},
|
|
@@ -401,6 +417,9 @@
|
|
|
<if test="quantity != null">
|
|
|
QUANTITY = #{quantity,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="tatalQuantity != null">
|
|
|
+ TOTAL_QUANTITY = #{tatalQuantity,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
<if test="resultMovelistTime != null">
|
|
|
RESULT_MOVELIST_TIME = #{resultMovelistTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
@@ -458,7 +477,7 @@
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
insert into WMSP_RESTACK_MAKE_RESULT
|
|
|
(RESULT_ID,
|
|
|
- RESULT_STACK_NUMBER, AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,QUANTITY,
|
|
|
+ RESULT_STACK_NUMBER, AFTER_STACKING_ID,BEFORE_LEVEL,AFTER_BEFORE_STACKING_ID,TOTAL_QUANTITY,QUANTITY,
|
|
|
RESULT_MOVELIST_TIME, KEEPER_ID,
|
|
|
RESULT_KEEPER_ISSUE_TIME, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
@@ -469,7 +488,7 @@
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
|
- #{item.resultStackNumber,jdbcType=VARCHAR}, #{item.afterStackingId,jdbcType=DECIMAL}, #{item.beforeLevel,jdbcType=DECIMAL}, #{item.afterBeforeStackingId,jdbcType=DECIMAL},#{item.quantity,jdbcType=DECIMAL},
|
|
|
+ #{item.resultStackNumber,jdbcType=VARCHAR}, #{item.afterStackingId,jdbcType=DECIMAL}, #{item.beforeLevel,jdbcType=DECIMAL}, #{item.afterBeforeStackingId,jdbcType=DECIMAL},#{item.quantity,jdbcType=DECIMAL},#{item.tatalQuantity,jdbcType=DECIMAL},
|
|
|
#{item.resultMovelistTime,jdbcType=TIMESTAMP}, #{item.keeperId,jdbcType=DECIMAL},
|
|
|
#{item.resultKeeperIssueTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
#{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
@@ -507,6 +526,10 @@
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.quantity,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,TOTAL_QUANTITY=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.tatalQuantity,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
,RESULT_MOVELIST_TIME=
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMovelistTime,jdbcType=TIMESTAMP}
|
|
@@ -952,7 +975,7 @@
|
|
|
-- 倒垛单创建时间
|
|
|
wrme.INSERT_TIME "insertTime",
|
|
|
-- 总件数
|
|
|
- wrme.QUANTITY "quantity",
|
|
|
+ wrme.TOTAL_QUANTITY "quantity",
|
|
|
-- 原层次
|
|
|
wrme.BEFORE_LEVEL "beforeLevel",
|
|
|
-- 新垛位
|
|
@@ -1313,7 +1336,7 @@
|
|
|
-- 倒垛单下发时间
|
|
|
wrme.RESULT_KEEPER_ISSUE_TIME "resultKeeperIssueTime",
|
|
|
-- 总件数
|
|
|
- wrme.QUANTITY "quantity",
|
|
|
+ wrme.TOTAL_QUANTITY "quantity",
|
|
|
-- 原层次
|
|
|
wrme.BEFORE_LEVEL "beforeLevel",
|
|
|
-- 新垛位
|
|
@@ -1436,7 +1459,15 @@
|
|
|
<select id="getQuantity" resultType="java.math.BigDecimal">
|
|
|
SELECT WRMR.QUANTITY "quantity"
|
|
|
FROM WMSP_RESTACK_MAKE_RESULT WRMR
|
|
|
- WHERE WRMR.QUANTITY> 0 AND WRMR.RESULT_ID = #{restackMake}
|
|
|
+ WHERE WRMR.QUANTITY>=0 AND WRMR.RESULT_ID = #{restackMake}
|
|
|
+ </select>
|
|
|
+ <select id="getScanResultList" resultType="java.util.Map">
|
|
|
+ SELECT WRCR.RESULT_ID "resultId"
|
|
|
+ FROM WMSP_RESTACK_MAKE_RESULT WRMR
|
|
|
+-- 关联吊牌扫描结果
|
|
|
+ LEFT JOIN WMSP_RESTACK_SCAN_RESULT WRCR
|
|
|
+ ON WRMR.RESULT_ID = WRCR.RESULT_RESTACK_ID
|
|
|
+ WHERE WRCR.RESULT_LOADER_AUDIT =1 AND WRCR.STATUS =1 AND WRMR.RESULT_STACK_NUMBER = #{restackMake}
|
|
|
</select>
|
|
|
<!-- 根据物资唯一id,逻辑删除对应的餐厨网格状态-->
|
|
|
<update id="changeMaterialGrid">
|