|
@@ -634,6 +634,133 @@
|
|
ON RS.STACKING_ID = RPG.STACKING_ID
|
|
ON RS.STACKING_ID = RPG.STACKING_ID
|
|
where wir.inbound_type = 0
|
|
where wir.inbound_type = 0
|
|
and wir.result_deleted = 0
|
|
and wir.result_deleted = 0
|
|
|
|
+ and wir.RESULT_STATUS != 2
|
|
|
|
+ order by wir.inbound_time desc
|
|
|
|
+ <where>
|
|
|
|
+ <if test="INBOUND_NUMBER != null">
|
|
|
|
+ and "INBOUND_NUMBER" in
|
|
|
|
+ <foreach collection="INBOUND_NUMBER" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="WAREHOUSE_NAME != null">
|
|
|
|
+ and "WAREHOUSE_NAME" in
|
|
|
|
+ <foreach collection="WAREHOUSE_NAME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="STACKING_NO != null">
|
|
|
|
+ and "STACKING_NO" in
|
|
|
|
+ <foreach collection="STACKING_NO" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="GRID_GRADATION_NUMBER != null">
|
|
|
|
+ and "GRID_GRADATION_NUMBER" in
|
|
|
|
+ <foreach collection="GRID_GRADATION_NUMBER" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="FURNACE_NUMBER != null">
|
|
|
|
+ and "FURNACE_NUMBER" in
|
|
|
|
+ <foreach collection="FURNACE_NUMBER" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="MATERIAL_CODE != null">
|
|
|
|
+ and "MATERIAL_CODE" in
|
|
|
|
+ <foreach collection="MATERIAL_CODE" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="MATERIAL_NAME != null">
|
|
|
|
+ and "MATERIAL_NAME" in
|
|
|
|
+ <foreach collection="MATERIAL_NAME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="THEORETICAL_WEIGHT != null">
|
|
|
|
+ and "THEORETICAL_WEIGHT" in
|
|
|
|
+ <foreach collection="THEORETICAL_WEIGHT" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="BUNDLE_WEIGHT != null">
|
|
|
|
+ and "BUNDLE_WEIGHT" in
|
|
|
|
+ <foreach collection="BUNDLE_WEIGHT" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="MEASURE_NAME != null">
|
|
|
|
+ and "MEASURE_NAME" in
|
|
|
|
+ <foreach collection="MEASURE_NAME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="PRODUCTION_DATE != null">
|
|
|
|
+ and "PRODUCTION_DATE" in
|
|
|
|
+ <foreach collection="PRODUCTION_DATE" item="item" open="(" separator="," close=")">
|
|
|
|
+ to_date('${item}','yyyy-mm-dd hh24:mi:ss')
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="APERSONNEL_NAME != null">
|
|
|
|
+ and "APERSONNEL_NAME" in
|
|
|
|
+ <foreach collection="APERSONNEL_NAME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="BPERSONNEL_NAME != null">
|
|
|
|
+ and "BPERSONNEL_NAME" in
|
|
|
|
+ <foreach collection="BPERSONNEL_NAME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="DPERSONNEL_NAME != null">
|
|
|
|
+ and "DPERSONNEL_NAME" in
|
|
|
|
+ <foreach collection="DPERSONNEL_NAME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="SHIPPER_BRANCH_FACTORY != null">
|
|
|
|
+ and "SHIPPER_BRANCH_FACTORY" in
|
|
|
|
+ <foreach collection="SHIPPER_BRANCH_FACTORY" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="PERSONNEL_WORKSHOP != null">
|
|
|
|
+ and "PERSONNEL_WORKSHOP" in
|
|
|
|
+ <foreach collection="PERSONNEL_WORKSHOP" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="INBOUND_TIME != null">
|
|
|
|
+ and "INBOUND_TIME" in
|
|
|
|
+ <foreach collection="INBOUND_TIME" item="item" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ <include refid="orderBy"></include>
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectWmsReservedResult" resultType="java.util.LinkedHashMap">
|
|
|
|
+ select
|
|
|
|
+ wir.INBOUND_ID "inboundId",
|
|
|
|
+ wir.inbound_number "inboundNo",
|
|
|
|
+ wir.inbound_time "inboundTime",
|
|
|
|
+ wir.inbound_iscomplete "isComplete",
|
|
|
|
+ RW.WAREHOUSE_NAME "warehouseName",
|
|
|
|
+ RS.STACKING_NO "stackingNo",
|
|
|
|
+ RPG.GRID_GRADATION_NUMBER "gridGradationNumber"
|
|
|
|
+ from wmsp_inbound_result wir
|
|
|
|
+ left join RMS_PWAREHOUSE_GRID rpg
|
|
|
|
+ ON RPG.GRID_ID = wir.GRID_ID
|
|
|
|
+ LEFT JOIN RMS_WAREHOUSE RW
|
|
|
|
+ ON RW.WAREHOUSE_ID = rpg.WAREHOUSE_ID
|
|
|
|
+ LEFT JOIN RMS_STACKING RS
|
|
|
|
+ ON RS.STACKING_ID = RPG.STACKING_ID
|
|
|
|
+ where wir.inbound_type = 0
|
|
|
|
+ and wir.result_deleted = 0
|
|
|
|
+ and wir.RESULT_STATUS = 2
|
|
order by wir.inbound_time desc
|
|
order by wir.inbound_time desc
|
|
<where>
|
|
<where>
|
|
<if test="INBOUND_NUMBER != null">
|
|
<if test="INBOUND_NUMBER != null">
|
|
@@ -1196,16 +1323,16 @@
|
|
update WMSP_INBOUND_RESULT set RESULT_STATUS= 2 where INBOUND_DISTRIBUTE_ID = #{distributeId}
|
|
update WMSP_INBOUND_RESULT set RESULT_STATUS= 2 where INBOUND_DISTRIBUTE_ID = #{distributeId}
|
|
</update>
|
|
</update>
|
|
<update id="updateStatusByMaterilaId">
|
|
<update id="updateStatusByMaterilaId">
|
|
- update WMSP_INBOUND_RESULT set RESULT_STATUS= 1 where MATERIAL_ID=#{materialId}
|
|
|
|
|
|
+ update WMSP_INBOUND_RESULT set INBOUND_ISCOMPLETE = 1 where MATERIAL_ID=#{materialId}
|
|
</update>
|
|
</update>
|
|
<update id="updateStatusByMaterialId">
|
|
<update id="updateStatusByMaterialId">
|
|
- update wmsp_inbound_result set result_status=2 where inbound_id in
|
|
|
|
|
|
+ update wmsp_inbound_result set INBOUND_ISCOMPLETE=2 where inbound_id in
|
|
(
|
|
(
|
|
select * from(
|
|
select * from(
|
|
select inbound_id from WMSP_INBOUND_RESULT wir
|
|
select inbound_id from WMSP_INBOUND_RESULT wir
|
|
left join rms_material_steel rms
|
|
left join rms_material_steel rms
|
|
on wir.material_id = rms.material_steel_id
|
|
on wir.material_id = rms.material_steel_id
|
|
- where rms.material_id=(select distinct material_id from rms_material_steel where material_steel_id =#{materialId} ) and result_status='1' and Rownum='1'
|
|
|
|
|
|
+ where rms.material_id=(select distinct material_id from rms_material_steel where material_steel_id =#{materialId} ) and INBOUND_ISCOMPLETE='1' and Rownum='1'
|
|
order by wir.insert_time desc
|
|
order by wir.insert_time desc
|
|
)
|
|
)
|
|
)
|
|
)
|
|
@@ -1217,7 +1344,7 @@
|
|
</select>
|
|
</select>
|
|
<select id="getTypeMaterilaId" resultType="java.lang.Integer">
|
|
<select id="getTypeMaterilaId" resultType="java.lang.Integer">
|
|
select count(*) from WMSP_INBOUND_RESULT
|
|
select count(*) from WMSP_INBOUND_RESULT
|
|
- where MATERIAL_ID=#{materialId} and RESULT_STATUS='2'
|
|
|
|
|
|
+ where MATERIAL_ID=#{materialId} and INBOUND_ISCOMPLETE='2'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|