|
|
@@ -1022,8 +1022,8 @@
|
|
|
'供应商' as "objTypeName",
|
|
|
1 as "objType",
|
|
|
tms.flg_valid as "flgValid",
|
|
|
- null as "phone",
|
|
|
- null as "addressFull"
|
|
|
+ tms.contact_phone as "phone",
|
|
|
+ tms.return_address as "addressFull"
|
|
|
from dkic_b.t_mst_supplier tms
|
|
|
<where >
|
|
|
<if test="flgValid">
|
|
|
@@ -1035,6 +1035,13 @@
|
|
|
<if test="objName != null and objName != ''">
|
|
|
AND tms.sup_name LIKE concat('%',my_ex.likequery(#{objCode}),'%')
|
|
|
</if>
|
|
|
+ <if test="searchText != null and searchText != ''">
|
|
|
+ AND (
|
|
|
+ tms.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tms.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tms.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
union all
|
|
|
select cus.cus_id as "objId",
|
|
|
@@ -1056,11 +1063,19 @@
|
|
|
<if test="objName != null and objName != ''">
|
|
|
AND cus.cus_name LIKE concat('%',my_ex.likequery(#{objName}),'%')
|
|
|
</if>
|
|
|
- <if test="flgValid">
|
|
|
- AND cus.flgValid
|
|
|
+ <if test="searchText != null and searchText != ''">
|
|
|
+ AND ( cus.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or cus.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or cus.address_full LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ )
|
|
|
</if>
|
|
|
</where>
|
|
|
) tt
|
|
|
+ <where>
|
|
|
+ <if test="objType != null and objType != ''">
|
|
|
+ AND tt.objType = #{objType}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
|
@@ -1087,6 +1102,13 @@
|
|
|
<if test="objName != null and objName != ''">
|
|
|
AND tms.sup_name LIKE concat('%',my_ex.likequery(#{objCode}),'%')
|
|
|
</if>
|
|
|
+ <if test="searchText != null and searchText != ''">
|
|
|
+ AND (
|
|
|
+ tms.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tms.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tms.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
union all
|
|
|
select cus.cus_id as "objId",
|
|
|
@@ -1108,8 +1130,19 @@
|
|
|
<if test="objName != null and objName != ''">
|
|
|
AND cus.cus_name LIKE concat('%',my_ex.likequery(#{objName}),'%')
|
|
|
</if>
|
|
|
+ <if test="searchText != null and searchText != ''">
|
|
|
+ AND ( cus.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or cus.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or cus.address_full LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
) tt
|
|
|
+ <where>
|
|
|
+ <if test="objType != null and objType != ''">
|
|
|
+ AND tt.objType = #{objType}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
|