This commit is contained in:
linfso 2025-01-20 16:57:12 +08:00
parent 7ba834da0f
commit 8b4d4f604b

View File

@ -164,7 +164,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 过滤掉虚拟单 -->
and ( a.problem_type is null or (a.problem_type is not null and (a.problem_type != 173 and a.problem_type != 170 and a.problem_type != 151) ) )
and not exists(
select 1 from emis_waybill_problem_info ewpi where a.bill_code=ewpi.bill_code and ewpi.del_flag='0' and ewpi.`problem_type` !=null and ewpi.`problem_type` in(173,170,151)
)
<if test="params.sendSiteCode != null and params.sendSiteCode != ''">
and a.send_site_code = #{params.sendSiteCode}
@ -176,14 +178,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
and a.bill_code in (
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
and exists (
select 1 from emis_waybill_problem_info ewpi where a.bill_code=ewpi.bill_code and ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
)
</if>
<if test="params.problemQueryType != null and params.problemQueryType == 2 and params.problemQueryIds != null and params.problemQueryIds !=''">
and a.bill_code not in (
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
and not exists (
select 1 from emis_waybill_problem_info ewpi where a.bill_code=ewpi.bill_code and ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
)
</if>