医嘱类型勾选全部之后项目报错的bug

This commit is contained in:
2025-11-11 10:12:40 +08:00
parent 38233110f2
commit d5f8b0f23b

View File

@@ -44,8 +44,8 @@
<!-- 改进SQL逻辑确保所有情况都能正确处理避免空的FROM子查询 -->
<!-- 当adviceTypes包含4或不在1-3范围内时或者adviceTypes为空/null时查询所有类型 -->
<choose>
<!-- 检查adviceTypes是否为null、空列表或者包含4或其他不在1-3范围内的值 -->
<when test="adviceTypes == null or adviceTypes.isEmpty() or adviceTypes.contains(4)">
<!-- 检查adviceTypes是否为null、空列表或者包含4、5或其他不在1-3范围内的值 -->
<when test="adviceTypes == null or adviceTypes.isEmpty() or adviceTypes.contains(4) or adviceTypes.contains(5)">
<!-- 查询所有类型 -->
SELECT T1.tenant_id,
1 AS advice_type,