From e221e0593d4ed5b6949d4930895f8017ffe382b6 Mon Sep 17 00:00:00 2001 From: linfso Date: Wed, 2 Jul 2025 13:36:38 +0800 Subject: [PATCH] md --- .../src/main/resources/mapper/EmisTmsCostProfitMapper.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emis-biz/src/main/resources/mapper/EmisTmsCostProfitMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsCostProfitMapper.xml index 053e04d15..5219138ef 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsCostProfitMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsCostProfitMapper.xml @@ -37,7 +37,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.bill_code=b.bill_code and a.del_flag='0' and b.del_flag='0' and b.id = #{id} - and ( FIND_IN_SET(b.`bill_code`,#{billCode}) or FIND_IN_SET(b.`master_bill_code`,#{billCode}) ) + + and ( + FIND_IN_SET(b.`bill_code`,#{billCode}) or + exists ( + select 1 from emis_waybill c where c.master_bill_code = a.bill_code and FIND_IN_SET(c.`bill_code`,#{billCode}) + ) + ) and b.standard_fee = #{standardFee} and b.bill_fee = #{billFee} and b.cost_fee = #{costFee}