|
@@ -1347,6 +1347,7 @@
|
|
|
<update id="updateStatusByMaterilaId">
|
|
|
update WMSP_INBOUND_RESULT set INBOUND_ISCOMPLETE = 1 where MATERIAL_ID=#{materialId}
|
|
|
</update>
|
|
|
+<!-- and wir.insert_time between sysdate and trunc(sysdate + 1, 'dd')-->
|
|
|
<update id="updateStatusByMaterialId">
|
|
|
update wmsp_inbound_result set INBOUND_ISCOMPLETE=2 where inbound_id in
|
|
|
(
|
|
@@ -1354,9 +1355,14 @@
|
|
|
select inbound_id from WMSP_INBOUND_RESULT wir
|
|
|
left join rms_material_steel rms
|
|
|
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 INBOUND_ISCOMPLETE='1' and Rownum='1' and rms.UPDATE_TIME is null
|
|
|
+ left join WMSP_GRID_MATERIAL wgm
|
|
|
+ on wgm.MATERIAL_ID = rms.material_steel_id
|
|
|
+ where rms.material_id=(
|
|
|
+ select distinct rms2.material_id from rms_material_steel rms2
|
|
|
+ where material_steel_id =#{materialId}
|
|
|
+ ) and INBOUND_ISCOMPLETE='1' and wgm.deleted ='0'
|
|
|
order by wir.insert_time desc
|
|
|
- )
|
|
|
+ ) where Rownum='1'
|
|
|
)
|
|
|
|
|
|
</update>
|