|
@@ -36,6 +36,9 @@
|
|
|
<if test="id != null and id != ''">
|
|
|
and id = #{id}
|
|
|
</if>
|
|
|
+ <if test="nameOrCode != null and nameOrCode != ''">
|
|
|
+ and code like CONCAT(CONCAT('%', #{nameOrCode}), '%') or name like CONCAT(CONCAT('%', #{nameOrCode}), '%')
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</select>
|
|
|
<!-- 查询字典内容分页 -->
|
|
@@ -68,6 +71,9 @@
|
|
|
<if test="typeVal != null and typeVal != ''">
|
|
|
and type = #{typeVal}
|
|
|
</if>
|
|
|
+ <if test="nameOrCode != null and nameOrCode != ''">
|
|
|
+ and code like CONCAT(CONCAT('%', #{code}), '%') or name like CONCAT(CONCAT('%', #{name}), '%')
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
order by id desc
|
|
|
</select>
|
|
@@ -125,15 +131,15 @@
|
|
|
<!--物料字典导出-->
|
|
|
<select id="export" resultType="java.util.LinkedHashMap">
|
|
|
select
|
|
|
- code,
|
|
|
- name,
|
|
|
- if(part_type = '', null , part_type),
|
|
|
- if(wllb_class = '', null , wllb_class),
|
|
|
- if(size = '', null , size),
|
|
|
- if(max_num = '', null , max_num),
|
|
|
- if(min_num = '', null , min_num),
|
|
|
- if(is_not_disable = '1', '是' , '否'),
|
|
|
- if(is_recommend = '1', '是' , '否' )
|
|
|
+ code,
|
|
|
+ name,
|
|
|
+ if(part_type = '', null , part_type),
|
|
|
+ if(wllb_class = '', null , wllb_class),
|
|
|
+ if(size = '', null , size),
|
|
|
+ if(max_num = '', null , max_num),
|
|
|
+ if(min_num = '', null , min_num),
|
|
|
+ if(is_not_disable = '1', '是' , '否'),
|
|
|
+ if(is_recommend = '1', '是' , '否' )
|
|
|
from tld_material
|
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
|
<if test="name != null and name != ''">
|
|
@@ -160,7 +166,7 @@
|
|
|
</trim>
|
|
|
order by id desc
|
|
|
</select>
|
|
|
- <!--查询物料字典内容分页-->
|
|
|
+ <!-- 查询物料字典内容分页 -->
|
|
|
<select id="getDictionaryPageMaterial" resultType="com.tld.model.Dictionary">
|
|
|
select
|
|
|
a.*,
|
|
@@ -192,6 +198,9 @@
|
|
|
<if test="typeVal != null and typeVal != ''">
|
|
|
and a.type = #{typeVal}
|
|
|
</if>
|
|
|
+ <if test="nameOrCode != null and nameOrCode != ''">
|
|
|
+ and code like CONCAT(CONCAT('%', #{nameOrCode}), '%') or name like CONCAT(CONCAT('%', #{nameOrCode}), '%')
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
order by a.id desc
|
|
|
</select>
|