Jelajahi Sumber

修改映射国标字典搜索条件

guxinyu 2 tahun lalu
induk
melakukan
e39343e817

TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/dic/TDicStandard.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/common/ImportInsService.java


TEMPAT SAMPAH
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/dic/TDicStandardService.java


+ 4 - 7
cbkj_web_parameter/src/main/resources/mappers/dic/TDicStandardMapper.xml

@@ -92,7 +92,7 @@
     </select>
 
     <select id="getPageListByObj" parameterType="TDicStandard" resultMap="BaseResultMap">
-        SELECT
+        SELECT DISTINCT
         tdb.stan_id,
         tdb.stan_code,
         tdb.stan_name,
@@ -104,18 +104,15 @@
         INNER JOIN t_dic_standard AS tdbb ON tdb.parent_id = (SELECT stan_id
         FROM t_dic_mapping
         WHERE dic_id = #{dicId})
-        <if test=" stanName != null and stanName!='' ">
-            and tdb.stan_name like CONCAT('%',trim(#{stanName}),'%')
-        </if>
-        <if test=" stanCode != null and stanCode!='' ">
-            and tdb.stan_code like CONCAT('%',trim(#{stanCode}),'%')
+        <if test="keyWord !=null and keyWord!='' ">
+            and (tdb.stan_name like CONCAT('%',trim(#{keyWord}),'%') or tdb.stan_code like CONCAT('%',trim(#{keyWord}),'%') )
         </if>
         <if test=" stanType != null and stanType!='' ">
             and tdb.stan_type=#{stanType}
         </if>
     </select>
     <select id="getFname" resultMap="BaseResultMap">
-        select stan_name
+        select stan_id,stan_name,stan_code
         from t_dic_standard
         where parent_id = '0'
     </select>