fix: 修复#448门诊划价项目分类过滤失效 - 耗材和诊疗查询缺少categoryCode过滤条件

- adviceType=2(耗材)查询添加categoryCode过滤
- adviceType=3(诊疗)查询添加categoryCode过滤
- 与adviceType=1(药品)保持一致的过滤逻辑
- 修复选择耗材类型时仍检索出药品的问题
This commit is contained in:
guanyu
2026-04-25 15:27:02 +08:00
parent 914f2d8229
commit 4beb4c40c5

View File

@@ -186,6 +186,9 @@
<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>
<if test="categoryCode != null and categoryCode != ''">
AND t1.category_code = #{categoryCode}
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()"> <if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND t1.id IN AND t1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")"> <foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
@@ -280,6 +283,9 @@
<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>
<if test="categoryCode != null and categoryCode != ''">
AND t1.category_code = #{categoryCode}
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()"> <if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND t1.id IN AND t1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")"> <foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">