Ver código fonte

Merge branch '1.0' of http://gogs.tcmbrain.com/zjh/pre_paramater into 1.0

zjh 2 anos atrás
pai
commit
2bcff4e0f6

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


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


BIN
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>