Tiroble 3 anos atrás
pai
commit
c4a8f8fe91

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -1,7 +1,7 @@
 api.version: api/v1/wms
 spring:
   profiles:
-    include: ${SPRING_PROFILES:prod}
+    include: ${SPRING_PROFILES:dev}
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8

+ 8 - 2
src/main/resources/com/steerinfo/dil/mapper/WmspInboundResultMapper.xml

@@ -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>