|
@@ -1065,6 +1065,8 @@
|
|
|
RC.MATERIAL_NAME "text",
|
|
RC.MATERIAL_NAME "text",
|
|
|
'materialName' "prop"
|
|
'materialName' "prop"
|
|
|
from RMS_MATERIAL RC
|
|
from RMS_MATERIAL RC
|
|
|
|
|
+ left join rms_material_map t
|
|
|
|
|
+ on t.prod_code_l = RC.MATERIAL_CODE
|
|
|
<where>
|
|
<where>
|
|
|
DELETED = 0
|
|
DELETED = 0
|
|
|
<if test="index!=null and index!=''">
|
|
<if test="index!=null and index!=''">
|
|
@@ -1080,6 +1082,10 @@
|
|
|
<if test="materialId!=null and materialId!=''">
|
|
<if test="materialId!=null and materialId!=''">
|
|
|
AND RC.MATERIAL_ID = #{materialId}
|
|
AND RC.MATERIAL_ID = #{materialId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="prodCode!=null and prodCode!=''">
|
|
|
|
|
+ AND ( REGEXP_LIKE(t.prod_code, #{prodCode})
|
|
|
|
|
+ OR REGEXP_LIKE(RC.MATERIAL_CODE, #{prodCode}) )
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
FETCH NEXT 10 ROWS ONLY
|
|
FETCH NEXT 10 ROWS ONLY
|
|
|
)
|
|
)
|
|
@@ -1345,6 +1351,9 @@
|
|
|
<if test="prodCode != null and prodCode != ''">
|
|
<if test="prodCode != null and prodCode != ''">
|
|
|
and REGEXP_LIKE(t.prod_code, #{prodCode})
|
|
and REGEXP_LIKE(t.prod_code, #{prodCode})
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="prodName != null and prodName != ''">
|
|
|
|
|
+ and REGEXP_LIKE(b.material_name, #{prodName})
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
union all
|
|
union all
|
|
|
select '' as "prodCodePk",
|
|
select '' as "prodCodePk",
|
|
@@ -1376,6 +1385,9 @@
|
|
|
<if test="prodCode != null and prodCode != ''">
|
|
<if test="prodCode != null and prodCode != ''">
|
|
|
and REGEXP_LIKE(b.material_code, #{prodCode})
|
|
and REGEXP_LIKE(b.material_code, #{prodCode})
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="prodName != null and prodName != ''">
|
|
|
|
|
+ and REGEXP_LIKE(b.material_name, #{prodName})
|
|
|
|
|
+ </if>
|
|
|
<if test="materialId != null and materialId != ''">
|
|
<if test="materialId != null and materialId != ''">
|
|
|
and REGEXP_LIKE(b.material_id, #{materialId})
|
|
and REGEXP_LIKE(b.material_id, #{materialId})
|
|
|
</if>
|
|
</if>
|
|
@@ -1749,6 +1761,8 @@
|
|
|
ON ARC.TRANS_REQUIREMENT_ID = ATR.TRANS_REQUIREMENT_ID
|
|
ON ARC.TRANS_REQUIREMENT_ID = ATR.TRANS_REQUIREMENT_ID
|
|
|
LEFT JOIN RMS_MATERIAL RM
|
|
LEFT JOIN RMS_MATERIAL RM
|
|
|
ON RM.MATERIAL_ID = ARC.MATERIAL_ID
|
|
ON RM.MATERIAL_ID = ARC.MATERIAL_ID
|
|
|
|
|
+ LEFT JOIN RMS_COMPANY RC
|
|
|
|
|
+ ON RC.COMPANY_ID = ATR.RECEIVING_COMPANY_ID
|
|
|
<where>
|
|
<where>
|
|
|
ATR.DELETED NOT IN (2,5,6)
|
|
ATR.DELETED NOT IN (2,5,6)
|
|
|
<if test="index != null and index != ''">
|
|
<if test="index != null and index != ''">
|
|
@@ -1763,6 +1777,9 @@
|
|
|
<if test="materialId !=null and materialId != ''">
|
|
<if test="materialId !=null and materialId != ''">
|
|
|
AND REGEXP_LIKE(ARC.MATERIAL_ID, #{materialId})
|
|
AND REGEXP_LIKE(ARC.MATERIAL_ID, #{materialId})
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="receiveCompanyName !=null and receiveCompanyName != ''">
|
|
|
|
|
+ AND REGEXP_LIKE(RC.COMPANY_NAME, #{receiveCompanyName})
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
FETCH NEXT 10 ROWS ONLY
|
|
FETCH NEXT 10 ROWS ONLY
|
|
|
)
|
|
)
|