hanqingsong пре 1 година
родитељ
комит
fc27d18265

+ 8 - 14
src/main/java/com/chinaitop/depot/grainSituationCard/mapper/StorageSealedConfirmationMapper.xml

@@ -385,24 +385,18 @@
385 385
   </update>
386 386
   <select id="selectNotSealedStorage" parameterType="integer" resultType="com.chinaitop.depot.param.BasicStorageAndTankParam">
387 387
     select
388
-        distinct bs.storehouse_id houseId,
388
+        bs.storehouse_id houseId,
389 389
         bs.storehouse_code storehouseCode,
390 390
         bs.storehouse_name houseName
391 391
     from
392
-        basic_storehouse bs left join basic_warehouse bw on
393
-        bs.storehouse_id = bw.storehouse_id
392
+        basic_storehouse bs
393
+        left join storage_grain_card sgc on bs.storehouse_id = sgc.storehouse_id
394
+        and sgc.sfgd = '1'
395
+        and sgc.sfmc = 1
394 396
     where
395
-        bs.org_id = #{orgId}
396
-        and bw.crk_status = 2
397
-    union all select
398
-        distinct bt.id houseId,
399
-        bt.storagetank_code storehouseCode,
400
-        bt.storagetank_name houseName
401
-    from
402
-        basic_tank bt
403
-    where
404
-        bt.org_id = #{orgId}
405
-        and bt.crk_status = 2
397
+        bs.del_flag = 1
398
+        and bs.org_id = #{orgId}
399
+        and sgc.id is null
406 400
   </select>
407 401
   <select id="checkGrainAttribute" parameterType="integer" resultType="com.chinaitop.depot.grainSituationCard.model.StorageSealedConfirmation">
408 402
     select