From 40ba81465a264ea69bd965dc1421421b3de0997b Mon Sep 17 00:00:00 2001 From: linfso Date: Sat, 11 Jan 2025 19:27:29 +0800 Subject: [PATCH] md --- .../resources/mapper/EmisTmsScanRecordMapper.xml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml index 2a4e1e8d8..572ab02d3 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsScanRecordMapper.xml @@ -469,21 +469,16 @@ and scan_type='20' - and not exists ( - select 1 from emis_tms_scan_record b - where b.del_flag='0' and a.bill_code=b.bill_code - and b.scan_site=a.pre_or_next_station_code - and b.scan_type='30' + and main_bill_code not in( + select main_bill_code from emis_tms_scan_record b where b.del_flag='0' and b.scan_type='30' and b.scan_site_code=a.pre_or_next_station_code ) and scan_type='30' - and not exists ( - select 1 from emis_tms_scan_record b - where b.del_flag='0' and a.bill_code=b.bill_code - and b.pre_or_next_station_code=a.scan_site and b.scan_type='20' + and main_bill_code not in( + select main_bill_code from emis_tms_scan_record b where b.del_flag='0' and b.scan_type='20' and b.pre_or_next_station_code=a.scan_site_code )