|
|
@@ -172,11 +172,24 @@
|
|
|
<sql id="Condition">
|
|
|
<where>
|
|
|
<if test="intoNo != null and intoNo != ''">
|
|
|
- AND tpi.into_no = #{intoNo}
|
|
|
+ AND tpi.into_no = LIKE concat('%',my_ex.likequery(#{intoNo}),'%')
|
|
|
</if>
|
|
|
<if test="intoType != null and intoType != ''">
|
|
|
AND tpi.into_type LIKE concat('%',my_ex.likequery(#{intoType}),'%')
|
|
|
</if>
|
|
|
+ <if test="intoTypes != null and intoTypes.size()>0">
|
|
|
+ AND tpi.into_type =any(#{intoTypes,typeHandler=StringListTypeHandler})
|
|
|
+ </if>
|
|
|
+ <if test="searchText !=null and searchText != ''">
|
|
|
+ AND (
|
|
|
+ tpi.into_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
<if test="fromId != null and fromId != ''">
|
|
|
AND tpi.from_id = #{fromId}::uuid
|
|
|
</if>
|
|
|
@@ -260,6 +273,7 @@
|
|
|
tmc.cus_phone as "cusPhone",
|
|
|
tmc.cus_from as "cusFrom",
|
|
|
makestaff.staff_name as "makeStaffName",
|
|
|
+ sys.f_get_name_i18n(tdktype.kind_name_i18n, 'zh_CN') AS "intoTypeName",
|
|
|
sys.f_get_name_i18n(tdk.kind_name_i18n, 'zh_CN') AS "intoStatusName"
|
|
|
FROM dkic_b.t_psi_inbound tpi
|
|
|
<include refid="Join_Table"/>
|
|
|
@@ -284,6 +298,7 @@
|
|
|
Left join dkic_b.t_mst_staff tms on tms.staff_id = tpi.staff_id
|
|
|
Left join dkic_b.t_mst_staff makestaff on makestaff.staff_id = tpi.make_staff
|
|
|
LEFT JOIN sys.t_data_kind tdk ON tdk.kind_code = tpi.into_status
|
|
|
+ LEFT JOIN sys.t_data_kind tdktype ON tdktype.kind_code = tpi.into_type
|
|
|
Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
|
|
|
left join dkic_b.t_mst_customer tmc on tpi.cus_id = tmc.cus_id
|
|
|
</sql>
|