<iftest="query.projectNo != null and query.projectNo != ''">
<iftest="query.projectNo != null and query.projectNo != ''">
AND (
AND (
a.project_no LIKE #{query.projectNo}
UPPER(a.project_no) LIKE '%' + UPPER(#{query.projectNo}) + '%'
OR a.project_no IN (
OR a.project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
)
)
)
</if>
</if>
<iftest="query.projectDesc != null and query.projectDesc != ''">
<iftest="query.projectDesc != null and query.projectDesc != ''">
and a.project_desc like #{query.projectDesc}
and UPPER(a.project_desc) like '%' + UPPER(#{query.projectDesc}) + '%'
</if>
</if>
<iftest="query.customerNo != null and query.customerNo != ''">
<iftest="query.customerNo != null and query.customerNo != ''">
and a.customer_no like #{query.customerNo}
and UPPER(a.customer_no) like '%' + UPPER(#{query.customerNo}) + '%'
</if>
</if>
<iftest="query.customerDesc != null and query.customerDesc != ''">
<iftest="query.customerDesc != null and query.customerDesc != ''">
and c.customer_desc like #{query.customerDesc}
and UPPER(c.customer_desc) like '%' + UPPER(#{query.customerDesc}) + '%'
</if>
</if>
<iftest="query.buDesc != null and query.buDesc != ''">
<iftest="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( a.site, a.bu_no ) = #{query.buDesc}
AND dbo.get_bu_desc ( a.site, a.bu_no ) = #{query.buDesc}
@ -444,30 +444,30 @@
</if>
</if>
<iftest="query.projectNo != null and query.projectNo != ''">
<iftest="query.projectNo != null and query.projectNo != ''">
AND
AND
(b.project_no like '%'+#{query.projectNo}+'%' OR b.project_no IN (SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')))
(UPPER(b.project_no) like '%'+ UPPER(#{query.projectNo}) +'%' OR b.project_no IN (SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')))
</if>
</if>
<iftest="query.projectDesc != null and query.projectDesc != ''">
<iftest="query.projectDesc != null and query.projectDesc != ''">
and b.project_desc like '%'+#{query.projectDesc}+'%'
and UPPER(b.project_desc) like '%'+ UPPER(#{query.projectDesc}) +'%'
</if>
</if>
<iftest="query.projectPartId != null and query.projectPartId != ''">
<iftest="query.projectPartId != null and query.projectPartId != ''">
and a.id = #{query.projectPartId}
and a.id = #{query.projectPartId}
</if>
</if>
<iftest="query.testPartNo != null and query.testPartNo != ''">
<iftest="query.testPartNo != null and query.testPartNo != ''">
AND (
AND (
a.test_part_no like '%'+#{query.testPartNo}+'%'
UPPER(a.test_part_no) like '%'+ UPPER(#{query.testPartNo}) +'%'
OR a.test_part_no IN (
OR a.test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
)
)
)
</if>
</if>
<iftest="query.partDesc != null and query.partDesc != ''">
<iftest="query.partDesc != null and query.partDesc != ''">
and a.part_desc like '%'+#{query.partDesc}+'%'
and UPPER(a.part_desc) like '%'+ UPPER(#{query.partDesc}) +'%'
</if>
</if>
<iftest="query.customerNo != null and query.customerNo != ''">
<iftest="query.customerNo != null and query.customerNo != ''">
and a.customer_no like '%'+#{query.customerNo}+'%'
and UPPER(a.customer_no) like '%'+ UPPER(#{query.customerNo}) +'%'
</if>
</if>
<iftest="query.customerDesc != null and query.customerDesc != ''">
<iftest="query.customerDesc != null and query.customerDesc != ''">
and c.customer_desc like '%'+#{query.customerDesc}+'%'
and UPPER(c.customer_desc) like '%'+ UPPER(#{query.customerDesc}) +'%'
</if>
</if>
<iftest="query.buDesc != null and query.buDesc != ''">
<iftest="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( b.site, b.bu_no ) = #{query.buDesc}
AND dbo.get_bu_desc ( b.site, b.bu_no ) = #{query.buDesc}