diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 008006669..14cbdf288 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -3816,17 +3816,23 @@ select a.id, a.bill_code,a.trans_line_type, a.product_type,a.start_site_code,a.send_site_code,a.problem_type,a.virtual_remark from emis_waybill a - left join emis_waybill_batch_status b on a.bill_code = b.bill_code - and (b.site_batch_status is null or b.site_batch_status != '1') where a.del_flag = '0' and a.trans_line_type = #{lineCode} and DATE_FORMAT(a.send_date, '%Y-%m-%d') = ]]> '2025-01-01' - and DATE_FORMAT(a.send_date, '%Y-%m-%d') DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 7 DAY), '%Y-%m-%d') - and (a.problem_type is null or a.problem_type not in (151,170)) - and ((a.virtual_remark is null or a.virtual_remark = '' or a.virtual_remark = ' ')or a.receive_country != '0095') + and DATE_FORMAT(a.send_date, '%Y-%m-%d') DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 7 DAY), + '%Y-%m-%d') + and ((a.virtual_remark is null or a.virtual_remark = '' or a.virtual_remark = ' ')or a.receive_country != + '0095') and a.order_status not in ('0','2') + and not exists ( + select 1 from emis_waybill_batch_status b where a.bill_code = b.bill_code and b.site_batch_status = '1' and b.del_flag = '0' + ) + and not exists ( + select 1 from emis_waybill_problem_info c where a.bill_code = c.bill_code and c.problem_type in (151,170) + and c.del_flag = '0' + ) order by a.create_time desc limit #{offset}, #{pageSize}