|
|
@@ -344,9 +344,12 @@
|
|
|
P."updated_at" AS updatedAt,
|
|
|
'1' AS selectType,
|
|
|
'' AS attachmentId,
|
|
|
- '' AS nodeId ,
|
|
|
+ '' AS nodeId,
|
|
|
'' AS fileName,
|
|
|
- '' AS filePath
|
|
|
+ '' AS filePath,
|
|
|
+ '' AS resourceCode,
|
|
|
+ '' AS zl,
|
|
|
+ '' AS area
|
|
|
FROM PUBLIC.t_project P
|
|
|
|
|
|
<where>
|
|
|
@@ -395,7 +398,10 @@
|
|
|
info.ID AS attachmentId,
|
|
|
info.node_id AS nodeId,
|
|
|
info.file_name AS fileName,
|
|
|
- info.file_path AS filePath
|
|
|
+ info.file_path AS filePath,
|
|
|
+ '' AS resourceCode,
|
|
|
+ '' AS zl,
|
|
|
+ '' AS area
|
|
|
FROM PUBLIC.t_project_attachment_info info
|
|
|
LEFT JOIN t_project project on info.project_id=project.id
|
|
|
<where>
|
|
|
@@ -412,7 +418,49 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</if>
|
|
|
- ORDER BY
|
|
|
+ <if test="filterType==0">
|
|
|
+ UNION
|
|
|
+ </if>
|
|
|
+ <if test="filterType==0 or filterType==3">
|
|
|
+ SELECT
|
|
|
+ project."id" AS ID,
|
|
|
+ project."name" AS NAME,
|
|
|
+ project."code" AS code,
|
|
|
+ project."company" AS company,
|
|
|
+ project."created_at" AS createAt,
|
|
|
+ project."updated_at" AS updateAt,
|
|
|
+ project."project_type" AS projectType,
|
|
|
+ project."on_chain_num" AS onChainNum,
|
|
|
+ project."creator_id" AS creatorId,
|
|
|
+ project."updated_at" AS updatedAt,
|
|
|
+ '3' AS selectType,
|
|
|
+ '' AS attachmentId,
|
|
|
+ '' AS nodeId,
|
|
|
+ '' AS fileName,
|
|
|
+ '' AS filePath,
|
|
|
+ (code.resource_immobile_code || code.resource_business_code || code.resource_project_code) AS resourceCode,
|
|
|
+ details.zl AS zl,
|
|
|
+ CAST(ROUND(details.geom_area, 2) AS VARCHAR) AS area
|
|
|
+ FROM
|
|
|
+ "public"."t_land_one_code" code
|
|
|
+ LEFT JOIN "public"."t_node_land" node on code.land_code =node.id
|
|
|
+ LEFT JOIN "public"."t_geom_db_details" details on node.geom_db_id =details.upload_id
|
|
|
+ LEFT JOIN "public"."t_project" project on code.project_id =project.id
|
|
|
+ <where>
|
|
|
+ <if test="keyWords != null and keyWords.size() > 0">
|
|
|
+ regexp_like((code.resource_immobile_code || code.resource_business_code || code.resource_project_code),
|
|
|
+ REGEXP_REPLACE(
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , '[\r\n\s]+', '', 'g')
|
|
|
+ , 'i')
|
|
|
+ </if>
|
|
|
+ AND project.id is not null
|
|
|
+ <if test="isOnchain != null and isOnchain">
|
|
|
+ AND on_chain_num > 0
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </if>
|
|
|
+ ORDER BY
|
|
|
updatedAt DESC
|
|
|
LIMIT #{pageSize} OFFSET #{offset}
|
|
|
</select>
|
|
|
@@ -436,9 +484,11 @@
|
|
|
'' AS attachmentId,
|
|
|
'' AS nodeId ,
|
|
|
'' AS fileName,
|
|
|
- '' AS filePath
|
|
|
+ '' AS filePath,
|
|
|
+ '' AS resourceCode,
|
|
|
+ '' AS zl,
|
|
|
+ '' AS area
|
|
|
FROM PUBLIC.t_project P
|
|
|
-
|
|
|
<where>
|
|
|
<if test="keyWords != null and keyWords.size() > 0">
|
|
|
regexp_like(P.name,
|
|
|
@@ -485,7 +535,10 @@
|
|
|
info.ID AS attachmentId,
|
|
|
info.node_id AS nodeId,
|
|
|
info.file_name AS fileName,
|
|
|
- info.file_path AS filePath
|
|
|
+ info.file_path AS filePath,
|
|
|
+ '' AS resourceCode,
|
|
|
+ '' AS zl,
|
|
|
+ '' AS area
|
|
|
FROM PUBLIC.t_project_attachment_info info
|
|
|
LEFT JOIN t_project project on info.project_id=project.id
|
|
|
<where>
|
|
|
@@ -502,6 +555,50 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</if>
|
|
|
+
|
|
|
+ <if test="filterType==0">
|
|
|
+ UNION
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="filterType==0 or filterType==3">
|
|
|
+ SELECT
|
|
|
+ project."id" AS ID,
|
|
|
+ project."name" AS NAME,
|
|
|
+ project."code" AS code,
|
|
|
+ project."company" AS company,
|
|
|
+ project."created_at" AS createAt,
|
|
|
+ project."updated_at" AS updateAt,
|
|
|
+ project."project_type" AS projectType,
|
|
|
+ project."on_chain_num" AS onChainNum,
|
|
|
+ project."creator_id" AS creatorId,
|
|
|
+ project."updated_at" AS updatedAt,
|
|
|
+ '3' AS selectType,
|
|
|
+ '' AS attachmentId,
|
|
|
+ '' AS nodeId ,
|
|
|
+ '' AS fileName,
|
|
|
+ '' AS filePath,
|
|
|
+ (code.resource_immobile_code || code.resource_business_code || code.resource_project_code) AS resourceCode,
|
|
|
+ details.zl AS zl,
|
|
|
+ CAST(ROUND(details.geom_area, 2) AS VARCHAR) AS area
|
|
|
+ FROM
|
|
|
+ "public"."t_land_one_code" code
|
|
|
+ LEFT JOIN "public"."t_node_land" node on code.land_code =node.id
|
|
|
+ LEFT JOIN "public"."t_geom_db_details" details on node.geom_db_id =details.upload_id
|
|
|
+ LEFT JOIN "public"."t_project" project on code.project_id =project.id
|
|
|
+ <where>
|
|
|
+ <if test="keyWords != null and keyWords.size() > 0">
|
|
|
+ regexp_like((code.resource_immobile_code || code.resource_business_code || code.resource_project_code),
|
|
|
+ REGEXP_REPLACE(
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , '[\r\n\s]+', '', 'g')
|
|
|
+ , 'i')
|
|
|
+ </if>
|
|
|
+ AND project.id is not null
|
|
|
+ <if test="isOnchain != null and isOnchain">
|
|
|
+ AND on_chain_num > 0
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </if>
|
|
|
) AS distinct_projects
|
|
|
</select>
|
|
|
|
|
|
@@ -590,6 +687,48 @@
|
|
|
) AS distinct_projects
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getSearchGraphicLayerCount" parameterType="com.siwei.apply.domain.vo.ProjectFilterVo" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM (
|
|
|
+ SELECT
|
|
|
+ project."id" AS ID,
|
|
|
+ project."name" AS NAME,
|
|
|
+ project."code" AS code,
|
|
|
+ project."company" AS company,
|
|
|
+ project."created_at" AS createAt,
|
|
|
+ project."updated_at" AS updateAt,
|
|
|
+ project."project_type" AS projectType,
|
|
|
+ project."on_chain_num" AS onChainNum,
|
|
|
+ project."creator_id" AS creatorId,
|
|
|
+ project."updated_at" AS updatedAt,
|
|
|
+ '3' AS selectType,
|
|
|
+ '' AS attachmentId,
|
|
|
+ '' AS nodeId,
|
|
|
+ '' AS fileName,
|
|
|
+ '' AS filePath,
|
|
|
+ (code.resource_immobile_code || code.resource_business_code || code.resource_project_code) AS resourceCode,
|
|
|
+ details.zl AS zl,
|
|
|
+ CAST(ROUND(details.geom_area, 2) AS VARCHAR) AS area
|
|
|
+ FROM
|
|
|
+ "public"."t_land_one_code" code
|
|
|
+ LEFT JOIN "public"."t_node_land" node on code.land_code =node.id
|
|
|
+ LEFT JOIN "public"."t_geom_db_details" details on node.geom_db_id =details.upload_id
|
|
|
+ LEFT JOIN "public"."t_project" project on code.project_id =project.id
|
|
|
+ <where>
|
|
|
+ <if test="keyWords != null and keyWords.size() > 0">
|
|
|
+ regexp_like((code.resource_immobile_code || code.resource_business_code || code.resource_project_code),
|
|
|
+ REGEXP_REPLACE(
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , '[\r\n\s]+', '', 'g')
|
|
|
+ , 'i')
|
|
|
+ </if>
|
|
|
+ AND project.id is not null
|
|
|
+ <if test="isOnchain != null and isOnchain">
|
|
|
+ AND on_chain_num > 0
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ) AS distinct_projects
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
<delete id="deleteNodeByTable">
|