Browse Source

优化药品搜索

hsh 1 year ago
parent
commit
05d494df1b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpBaseMapper.java

+ 3 - 3
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpBaseMapper.java

@@ -78,10 +78,10 @@ public interface YpBaseMapper {
             " c.stock_amount" +
             " FROM yp_print_name b WITH(NOLOCK) , yp_base c WITH(NOLOCK) " +
             " where" +
-            "  (b.py_code like '%${searchText}%' or c.py_code like '%${searchText}%' or" +
-            "  b.d_code  like '%${searchText}%'  or c.d_code  like '%${searchText}%' or" +
+            "  (b.py_code like '${searchText}%' or c.py_code like '${searchText}%' or" +
+            "  b.d_code  like '${searchText}%'  or c.d_code  like '${searchText}%' or" +
             "  b.charge_code = #{searchText} or c.charge_code = #{searchText} or" +
-            "  b.print_name like '%${searchText}%' or c.drugname like '%${searchText}%') and" +
+            "  b.print_name like '${searchText}%' or c.drugname like '${searchText}%') and" +
             "  c.group_no=#{ypBase.groupNo} " +
             "  <when test='ypBase.delFlag!=null'>" +
             "   and isnull(c.del_flag,0)=#{ypBase.delFlag}" +