Browse Source

模糊查询

master
han\hanst 4 hours ago
parent
commit
5339e0b147
  1. 102
      src/main/resources/mapper/pms/ProofingInformationMapper.xml

102
src/main/resources/mapper/pms/ProofingInformationMapper.xml

@ -273,14 +273,14 @@
status != '草稿' AND RelatedPerson = #{userId}
<if test="query.projectNo != null and query.projectNo != ''">
AND (
project_no = #{query.projectNo}
project_no like '%' + #{query.projectNo} + '%'
OR project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
)
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
and project_desc like #{query.projectDesc}
and project_desc like '%' + #{query.projectDesc} + '%'
</if>
<if test="query.uploadedFlag != null and query.uploadedFlag != ''">
<choose>
@ -303,20 +303,23 @@
</if>
<if test="query.testPartNo != null and query.testPartNo != ''">
AND (
test_part_no = #{query.testPartNo}
test_part_no like '%' + #{query.testPartNo} + '%'
OR test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
)
</if>
<if test="query.partDesc != null and query.partDesc != ''">
and part_desc like #{query.partDesc}
and part_desc like '%' + #{query.partDesc} + '%'
</if>
<if test="query.proofingNo != null and query.proofingNo != ''">
and proofing_no like '%' + #{query.proofingNo} + '%'
</if>
<if test="query.customerNo != null and query.customerNo != ''">
and customer_no = like #{query.customerNo}
and customer_no like '%' + #{query.customerNo} + '%'
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
and customer_desc = like #{query.customerDesc}
and customer_desc like '%' + #{query.customerDesc} + '%'
</if>
<if test="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( site, bu_no ) = #{query.buDesc}
@ -376,7 +379,7 @@
AND documentDefinitionListId = #{query.documentDefinitionListId}
</if>
<if test="query.documentTypeId != null and query.documentTypeId != ''">
AND document_type_id = #{query.documentTypeId}
AND document_type_id like '%' + #{query.documentTypeId} + '%'
</if>
<if test="query.documentType != null and query.documentType != ''">
AND document_type like '%' + #{query.documentType} + '%'
@ -394,7 +397,7 @@
<if test="query.projectNo != null and query.projectNo != ''">
<![CDATA[
AND (
project_no = #{query.projectNo}
project_no like '%' + #{query.projectNo} + '%'
OR project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
@ -403,7 +406,7 @@
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
<![CDATA[
and project_desc like #{query.projectDesc}
and project_desc like '%' + #{query.projectDesc} + '%'
]]>
</if>
<if test="query.uploadedFlag != null and query.uploadedFlag != ''">
@ -428,7 +431,7 @@
<if test="query.testPartNo != null and query.testPartNo != ''">
<![CDATA[
AND (
test_part_no = #{query.testPartNo}
test_part_no like '%' + #{query.testPartNo} + '%'
OR test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
@ -437,17 +440,22 @@
</if>
<if test="query.partDesc != null and query.partDesc != ''">
<![CDATA[
AND part_desc like #{query.partDesc}
AND part_desc like '%' + #{query.partDesc} + '%'
]]>
</if>
<if test="query.proofingNo != null and query.proofingNo != ''">
<![CDATA[
AND proofing_no like '%' + #{query.proofingNo} + '%'
]]>
</if>
<if test="query.customerNo != null and query.customerNo != ''">
<![CDATA[
AND customer_no LIKE #{query.customerNo}
AND customer_no LIKE '%' + #{query.customerNo} + '%'
]]>
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
<![CDATA[
AND customer_desc LIKE #{query.customerDesc}
AND customer_desc LIKE '%' + #{query.customerDesc} + '%'
]]>
</if>
<if test="query.buDesc != null and query.buDesc != ''">
@ -530,7 +538,7 @@
</if>
<if test="query.documentTypeId != null and query.documentTypeId != ''">
<![CDATA[
AND document_type_id = #{query.documentTypeId}
AND document_type_id like '%' + #{query.documentTypeId} + '%'
]]>
</if>
<if test="query.documentType != null and query.documentType != ''">
@ -548,7 +556,7 @@
status != '草稿'
<if test="query.projectNo != null and query.projectNo != ''">
AND (
project_no like #{query.projectNo}
project_no like '%' + #{query.projectNo} + '%'
OR project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
@ -568,29 +576,29 @@
</choose>
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
and project_desc like #{query.projectDesc}
and project_desc like '%' + #{query.projectDesc} + '%'
</if>
<if test="query.testPartNo != null and query.testPartNo != ''">
AND (
test_part_no like #{query.testPartNo}
test_part_no like '%' + #{query.testPartNo} + '%'
OR test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
)
</if>
<if test="query.partDesc != null and query.partDesc != ''">
and part_desc like #{query.partDesc}
and part_desc like '%' + #{query.partDesc} + '%'
</if>
<if test="query.proofingNo != null and query.proofingNo != ''">
<![CDATA[
AND proofing_no like #{query.proofingNo}
AND proofing_no like '%' + #{query.proofingNo} + '%'
]]>
</if>
<if test="query.customerNo != null and query.customerNo != ''">
and customer_no like #{query.customerNo}
and customer_no like '%' + #{query.customerNo} + '%'
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
and customer_desc like #{query.customerDesc}
and customer_desc like '%' + #{query.customerDesc} + '%'
</if>
<if test="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( site, bu_no ) = #{query.buDesc}
@ -647,7 +655,7 @@
AND #{query.endDate} >= build_date
</if>
<if test="query.documentTypeId != null and query.documentTypeId != ''">
AND document_type_id = #{query.documentTypeId}
AND document_type_id like '%' + #{query.documentTypeId} + '%'
</if>
<if test="query.documentType != null and query.documentType != ''">
AND document_type like '%' + #{query.documentType} + '%'
@ -697,34 +705,34 @@
status != '草稿' AND RelatedPerson = #{userId}
<if test="query.projectNo != null and query.projectNo != ''">
AND (
project_no like #{query.projectNo}
project_no like '%' + #{query.projectNo} + '%'
OR project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
)
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
and project_desc like #{query.projectDesc}
and project_desc like '%' + #{query.projectDesc} + '%'
</if>
<if test="query.confirmFlag != null and query.confirmFlag != ''">
and confirm_flag like #{query.confirmFlag}
</if>
<if test="query.testPartNo != null and query.testPartNo != ''">
AND (
test_part_no like #{query.testPartNo}
test_part_no like '%' + #{query.testPartNo} + '%'
OR test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
)
</if>
<if test="query.partDesc != null and query.partDesc != ''">
and part_desc like #{query.partDesc}
and part_desc like '%' + #{query.partDesc} + '%'
</if>
<if test="query.customerNo != null and query.customerNo != ''">
and customer_no like #{query.customerNo}
and customer_no like '%' + #{query.customerNo} + '%'
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
and customer_desc like #{query.customerDesc}
and customer_desc like '%' + #{query.customerDesc} + '%'
</if>
<if test="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( site, bu_no ) = #{query.buDesc}
@ -761,7 +769,7 @@
<if test="query.projectNo != null and query.projectNo != ''">
<![CDATA[
AND (
project_no like #{query.projectNo}
project_no like '%' + #{query.projectNo} + '%'
OR project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
@ -770,7 +778,7 @@
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
<![CDATA[
and project_desc like #{query.projectDesc}
and project_desc like '%' + #{query.projectDesc} + '%'
]]>
</if>
<if test="query.confirmFlag != null and query.confirmFlag != ''">
@ -781,7 +789,7 @@
<if test="query.testPartNo != null and query.testPartNo != ''">
<![CDATA[
AND (
test_part_no like #{query.testPartNo}
test_part_no like '%' + #{query.testPartNo} + '%'
OR test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
@ -790,17 +798,17 @@
</if>
<if test="query.partDesc != null and query.partDesc != ''">
<![CDATA[
and part_desc like #{query.partDesc}
and part_desc like '%' + #{query.partDesc} + '%'
]]>
</if>
<if test="query.customerNo != null and query.customerNo != ''">
<![CDATA[
AND customer_no LIKE #{query.customerNo}
AND customer_no LIKE '%' + #{query.customerNo} + '%'
]]>
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
<![CDATA[
AND customer_desc LIKE #{query.customerDesc}
AND customer_desc LIKE '%' + #{query.customerDesc} + '%'
]]>
</if>
<if test="query.buDesc != null and query.buDesc != ''">
@ -844,34 +852,34 @@
status != '草稿'
<if test="query.projectNo != null and query.projectNo != ''">
AND (
project_no like #{query.projectNo}
project_no like '%' + #{query.projectNo} + '%'
OR project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
)
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
and project_desc like #{query.projectDesc}
and project_desc like '%' + #{query.projectDesc} + '%'
</if>
<if test="query.confirmFlag != null and query.confirmFlag != ''">
and confirm_flag = #{query.confirmFlag}
</if>
<if test="query.testPartNo != null and query.testPartNo != ''">
AND (
test_part_no like #{query.testPartNo}
test_part_no like '%' + #{query.testPartNo} + '%'
OR test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
)
</if>
<if test="query.partDesc != null and query.partDesc != ''">
and part_desc like #{query.partDesc}
and part_desc like '%' + #{query.partDesc} + '%'
</if>
<if test="query.customerNo != null and query.customerNo != ''">
and customer_no like #{query.customerNo}
and customer_no like '%' + #{query.customerNo} + '%'
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
and customer_desc like #{query.customerDesc}
and customer_desc like '%' + #{query.customerDesc} + '%'
</if>
<if test="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( site, bu_no ) = #{query.buDesc}
@ -1053,28 +1061,28 @@
<where> ppp.status != '草稿'
<if test="query.projectNo != null and query.projectNo != ''">
AND (
b.project_no = #{query.projectNo}
b.project_no like '%' + #{query.projectNo} + '%'
OR b.project_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.projectNo}, ',')
)
)
</if>
<if test="query.projectDesc != null and query.projectDesc != ''">
and b.project_desc like #{query.projectDesc}
and b.project_desc like '%' + #{query.projectDesc} + '%'
</if>
<if test="query.testPartNo != null and query.testPartNo != ''">
AND (
ppp.test_part_no = #{query.testPartNo}
ppp.test_part_no like '%' + #{query.testPartNo} + '%'
OR ppp.test_part_no IN (
SELECT Value FROM CKT_MES_II_REAL.dbo.SplitString(#{query.testPartNo}, ',')
)
)
</if>
<if test="query.partDesc != null and query.partDesc != ''">
and ppp.part_desc like #{query.partDesc}
and ppp.part_desc like '%' + #{query.partDesc} + '%'
</if>
<if test="query.proofingNo != null and query.proofingNo != ''">
and ppi.proofing_no = #{query.proofingNo}
and ppi.proofing_no like '%' + #{query.proofingNo} + '%'
</if>
<if test="query.projectManager != null and query.projectManager != ''">
and ppp.project_manager = #{query.projectManager}
@ -1086,10 +1094,10 @@
and ppp.engineer = #{query.engineer}
</if>
<if test="query.customerNo != null and query.customerNo != ''">
and b.customer_no like #{query.customerNo}
and b.customer_no like '%' + #{query.customerNo} + '%'
</if>
<if test="query.customerDesc != null and query.customerDesc != ''">
and dbo.plm_get_customer_desc(b.site,b.customer_no) like #{query.customerDesc}
and dbo.plm_get_customer_desc(b.site,b.customer_no) like '%' + #{query.customerDesc} + '%'
</if>
<if test="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc ( b.site,b.bu_no ) = #{query.buDesc}

Loading…
Cancel
Save