fix: 修复门诊划价无法检索收费项目问题 (Bug #215)
问题原因: - 门诊划价调用 getAdviceBaseInfo 时 pricingFlag 为 null - SQL 固定过滤 pricing_flag=1 OR IS NULL,导致 pricing_flag=0 的诊疗项目被错误过滤 修复方案: - 将固定过滤条件改为动态条件 - 当 pricingFlag 为 null 时不添加过滤,查询所有启用状态项目 - 当 pricingFlag 有值时按传入值过滤 影响范围: - 修复门诊划价检索功能 - 不影响医生站等其他场景的 pricing_flag 过滤逻辑
This commit is contained in:
@@ -238,7 +238,11 @@
|
|||||||
AND T3.organization_id = #{organizationId}
|
AND T3.organization_id = #{organizationId}
|
||||||
</if>
|
</if>
|
||||||
WHERE t1.delete_flag = '0'
|
WHERE t1.delete_flag = '0'
|
||||||
AND (t1.pricing_flag = 1 OR t1.pricing_flag IS NULL)
|
<!-- 🔧 Bug #215 修复:当 pricingFlag 为 null 时不添加过滤条件,
|
||||||
|
避免门诊划价场景查询诊疗项目 (adviceType=3) 返回空结果 -->
|
||||||
|
<if test="pricingFlag != null">
|
||||||
|
AND (t1.pricing_flag = #{pricingFlag} OR t1.pricing_flag IS NULL)
|
||||||
|
</if>
|
||||||
<if test="searchKey != null and searchKey != ''">
|
<if test="searchKey != null and searchKey != ''">
|
||||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user