Browse Source

模糊搜索

ecss-tx
han\hanst 2 months ago
parent
commit
eb7a79e4fe
  1. 8
      src/main/resources/mapper/pms/EamMapper.xml
  2. 20
      src/main/resources/mapper/pms/EamProjectMapper.xml
  3. 6
      src/main/resources/mapper/pms/ProofingInformationMapper.xml

8
src/main/resources/mapper/pms/EamMapper.xml

@ -3646,10 +3646,10 @@
WHERE WHERE
a.site in (select eas.site from eam_access_site as eas where eas.username = #{query.userName}) a.site in (select eas.site from eam_access_site as eas where eas.username = #{query.userName})
<if test="query.documentTypeId != null and query.documentTypeId != ''"> <if test="query.documentTypeId != null and query.documentTypeId != ''">
AND a.document_type_id LIKE #{query.documentTypeId}
AND UPPER(a.document_type_id) LIKE '%' + UPPER(#{query.documentTypeId}) + '%'
</if> </if>
<if test="query.documentType != null and query.documentType != ''"> <if test="query.documentType != null and query.documentType != ''">
AND a.document_type LIKE #{query.documentType}
AND UPPER(a.document_type) LIKE '%' + UPPER(#{query.documentType}) + '%'
</if> </if>
</select> </select>
<select id="checkEamDocumentType" resultType="com.xujie.sys.modules.pms.data.EamDocumentTypeData"> <select id="checkEamDocumentType" resultType="com.xujie.sys.modules.pms.data.EamDocumentTypeData">
@ -3750,10 +3750,10 @@
AND a.project_category = #{query.projectCategory} AND a.project_category = #{query.projectCategory}
</if> </if>
<if test="query.documentTypeId != null and query.documentTypeId != ''"> <if test="query.documentTypeId != null and query.documentTypeId != ''">
AND a.document_type_id like #{query.documentTypeId}
AND UPPER(a.document_type_id) LIKE '%' + UPPER(#{query.documentTypeId}) + '%'
</if> </if>
<if test="query.documentType != null and query.documentType != ''"> <if test="query.documentType != null and query.documentType != ''">
AND c.document_type like #{query.documentType}
AND UPPER(c.document_type) LIKE '%' + UPPER(#{query.documentType}) + '%'
</if> </if>
ORDER BY ORDER BY
b.bu_no, b.bu_no,

20
src/main/resources/mapper/pms/EamProjectMapper.xml

@ -99,20 +99,20 @@
</if> </if>
<if test="query.projectNo != null and query.projectNo != ''"> <if test="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>
<if test="query.projectDesc != null and query.projectDesc != ''"> <if test="query.projectDesc != null and query.projectDesc != ''">
and a.project_desc like #{query.projectDesc}
and UPPER(a.project_desc) like '%' + UPPER(#{query.projectDesc}) + '%'
</if> </if>
<if test="query.customerNo != null and query.customerNo != ''"> <if test="query.customerNo != null and query.customerNo != ''">
and a.customer_no like #{query.customerNo}
and UPPER(a.customer_no) like '%' + UPPER(#{query.customerNo}) + '%'
</if> </if>
<if test="query.customerDesc != null and query.customerDesc != ''"> <if test="query.customerDesc != null and query.customerDesc != ''">
and c.customer_desc like #{query.customerDesc}
and UPPER(c.customer_desc) like '%' + UPPER(#{query.customerDesc}) + '%'
</if> </if>
<if test="query.buDesc != null and query.buDesc != ''"> <if test="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>
<if test="query.projectNo != null and query.projectNo != ''"> <if test="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>
<if test="query.projectDesc != null and query.projectDesc != ''"> <if test="query.projectDesc != null and query.projectDesc != ''">
and b.project_desc like '%'+#{query.projectDesc}+'%'
and UPPER(b.project_desc) like '%' + UPPER(#{query.projectDesc}) + '%'
</if> </if>
<if test="query.projectPartId != null and query.projectPartId != ''"> <if test="query.projectPartId != null and query.projectPartId != ''">
and a.id = #{query.projectPartId} and a.id = #{query.projectPartId}
</if> </if>
<if test="query.testPartNo != null and query.testPartNo != ''"> <if test="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>
<if test="query.partDesc != null and query.partDesc != ''"> <if test="query.partDesc != null and query.partDesc != ''">
and a.part_desc like '%'+#{query.partDesc}+'%'
and UPPER(a.part_desc) like '%' + UPPER(#{query.partDesc}) + '%'
</if> </if>
<if test="query.customerNo != null and query.customerNo != ''"> <if test="query.customerNo != null and query.customerNo != ''">
and a.customer_no like '%'+#{query.customerNo}+'%'
and UPPER(a.customer_no) like '%' + UPPER(#{query.customerNo}) + '%'
</if> </if>
<if test="query.customerDesc != null and query.customerDesc != ''"> <if test="query.customerDesc != null and query.customerDesc != ''">
and c.customer_desc like '%'+#{query.customerDesc}+'%'
and UPPER(c.customer_desc) like '%' + UPPER(#{query.customerDesc}) + '%'
</if> </if>
<if test="query.buDesc != null and query.buDesc != ''"> <if test="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}

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

@ -201,13 +201,13 @@
AND project_id = #{query.projectId} AND project_id = #{query.projectId}
) )
<if test="query.documentTypeId != null and query.documentTypeId != ''"> <if test="query.documentTypeId != null and query.documentTypeId != ''">
AND a.document_type_id like '%' + #{query.documentTypeId} + '%'
AND UPPER(a.document_type_id) like '%' + UPPER(#{query.documentTypeId}) + '%'
</if> </if>
<if test="query.documentType != null and query.documentType != ''"> <if test="query.documentType != null and query.documentType != ''">
AND a.document_type like '%' + #{query.documentType} + '%'
AND UPPER(a.document_type) like '%' + UPPER(#{query.documentType}) + '%'
</if> </if>
<if test="query.responsibleDepartment != null and query.responsibleDepartment != ''"> <if test="query.responsibleDepartment != null and query.responsibleDepartment != ''">
AND a.responsible_department like '%' + #{query.responsibleDepartment} + '%'
AND UPPER(a.responsible_department) like '%' + UPPER(#{query.responsibleDepartment}) + '%'
</if> </if>
</select> </select>
<select id="documentExists1" resultType="java.lang.Boolean"> <select id="documentExists1" resultType="java.lang.Boolean">

Loading…
Cancel
Save