|
|
@@ -384,55 +384,63 @@
|
|
384
|
384
|
where id = #{id,jdbcType=VARCHAR}
|
|
385
|
385
|
</update>
|
|
386
|
386
|
<select id="selectNotSealedStorage" parameterType="integer" resultType="com.chinaitop.depot.param.BasicStorageAndTankParam">
|
|
387
|
|
- select
|
|
388
|
|
- bs.storehouse_id houseId,
|
|
389
|
|
- bs.storehouse_code storehouseCode,
|
|
390
|
|
- bs.storehouse_name houseName
|
|
391
|
|
- from
|
|
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
|
|
396
|
|
- where
|
|
397
|
|
- bs.del_flag = 1
|
|
398
|
|
- and bs.org_id = #{orgId}
|
|
399
|
|
- and sgc.id is null
|
|
|
387
|
+ select
|
|
|
388
|
+ a.storehouse_id houseId,
|
|
|
389
|
+ b.storehouse_name houseName
|
|
|
390
|
+ from basic_warehouse a
|
|
|
391
|
+ left join basic_storehouse b on b.storehouse_id=a.storehouse_id
|
|
|
392
|
+ where a.del_flag=1
|
|
|
393
|
+ and a.library_type=0
|
|
|
394
|
+ and a.crk_status in (2,4)
|
|
|
395
|
+ and a.org_id=#{orgId}
|
|
|
396
|
+ group by a.storehouse_id,b.storehouse_name
|
|
|
397
|
+ union all
|
|
|
398
|
+ select
|
|
|
399
|
+ a.id houseId,
|
|
|
400
|
+ a.storagetank_name houseName
|
|
|
401
|
+ from basic_tank a
|
|
|
402
|
+ where a.del_flag=1
|
|
|
403
|
+ and a.library_type=0
|
|
|
404
|
+ and a.crk_status in (2,4)
|
|
|
405
|
+ and a.org_id=#{orgId}
|
|
400
|
406
|
</select>
|
|
401
|
407
|
<select id="checkGrainAttribute" parameterType="integer" resultType="com.chinaitop.depot.grainSituationCard.model.StorageSealedConfirmation">
|
|
402
|
408
|
select
|
|
403
|
|
- house_id houseId,
|
|
404
|
|
- org_id orgId,
|
|
405
|
|
- warehouse_id warehouseId,
|
|
406
|
|
- sub_type grainKind,
|
|
407
|
|
- quality grainAttribute,
|
|
408
|
|
- number_update sealedNumber,
|
|
409
|
|
- ypdj grainGrade,
|
|
410
|
|
- location placeOfOrigin,
|
|
411
|
|
- harvest_time harvestYear
|
|
412
|
|
- from
|
|
413
|
|
- storage_qualitycheck
|
|
|
409
|
+ ch houseId,
|
|
|
410
|
+ unitid orgId,
|
|
|
411
|
+ hwh warehouseId,
|
|
|
412
|
+ pz grainKind,
|
|
|
413
|
+ hwxz grainAttribute,
|
|
|
414
|
+ kcsl sealedNumber,
|
|
|
415
|
+ dj grainGrade,
|
|
|
416
|
+ gb placeOfOrigin,
|
|
|
417
|
+ scnf harvestYear,
|
|
|
418
|
+ rq applyTime
|
|
|
419
|
+ from lsreport_ts:data_kcgl_kcsw_default
|
|
414
|
420
|
<where>
|
|
415
|
|
- history_status = 0
|
|
416
|
|
- and type_update = '0'
|
|
417
|
|
- and org_id = #{orgId}
|
|
418
|
|
- and house_id = #{houseId}
|
|
419
|
|
- <if test="warehouseId != null and warehouseId != ''">
|
|
420
|
|
- and warehouse_id = #{warehouseId}
|
|
421
|
|
- </if>
|
|
|
421
|
+ and ch = #{houseId}
|
|
|
422
|
+ and hwh = #{warehouseId}
|
|
|
423
|
+ and hwxz in(
|
|
|
424
|
+ 6864,
|
|
|
425
|
+ 6865,
|
|
|
426
|
+ 6877,
|
|
|
427
|
+ 6878,
|
|
|
428
|
+ 6879,
|
|
|
429
|
+ 6866
|
|
|
430
|
+ )
|
|
422
|
431
|
</where>
|
|
423
|
|
- order by id desc limit 0,1
|
|
424
|
432
|
</select>
|
|
425
|
|
- <select id="checkNoticeReceive" parameterType="integer" resultType="integer">
|
|
|
433
|
+ <select id="checkNoticeReceive" parameterType="java.util.Map" resultType="integer">
|
|
426
|
434
|
select
|
|
427
|
435
|
hzqlsxzdm
|
|
428
|
|
- from
|
|
429
|
|
- business_notice_receive
|
|
430
|
|
- where
|
|
431
|
|
- org_id = #{orgId}
|
|
432
|
|
- and house_id = #{houseId}
|
|
433
|
|
- and ware_house_id = #{warehouseId}
|
|
434
|
|
- order by
|
|
435
|
|
- id desc limit 0,1
|
|
|
436
|
+ from business_notice_receive
|
|
|
437
|
+ where is_sheet=0 and audit_state=6 and crktype=1
|
|
|
438
|
+ and house_id = #{houseId,jdbcType=INTEGER}
|
|
|
439
|
+ <if test="warehouseId != null">
|
|
|
440
|
+ and ware_house_id = #{warehouseId,jdbcType=INTEGER}
|
|
|
441
|
+ </if>
|
|
|
442
|
+ receive_time > #{applyTime,,jdbcType=TIMESTAMP}
|
|
|
443
|
+ order by id desc limit 0,1
|
|
436
|
444
|
</select>
|
|
437
|
445
|
<select id="checkAuditState" parameterType="object" resultType="string">
|
|
438
|
446
|
select
|