Bläddra i källkod

仓房下拉校验

hanqingsong 1 år sedan
förälder
incheckning
fc27d18265

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

@@ -385,24 +385,18 @@
385
   </update>
385
   </update>
386
   <select id="selectNotSealedStorage" parameterType="integer" resultType="com.chinaitop.depot.param.BasicStorageAndTankParam">
386
   <select id="selectNotSealedStorage" parameterType="integer" resultType="com.chinaitop.depot.param.BasicStorageAndTankParam">
387
     select
387
     select
388
-        distinct bs.storehouse_id houseId,
388
+        bs.storehouse_id houseId,
389
         bs.storehouse_code storehouseCode,
389
         bs.storehouse_code storehouseCode,
390
         bs.storehouse_name houseName
390
         bs.storehouse_name houseName
391
     from
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
     where
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
   </select>
400
   </select>
407
   <select id="checkGrainAttribute" parameterType="integer" resultType="com.chinaitop.depot.grainSituationCard.model.StorageSealedConfirmation">
401
   <select id="checkGrainAttribute" parameterType="integer" resultType="com.chinaitop.depot.grainSituationCard.model.StorageSealedConfirmation">
408
     select
402
     select