|
@@ -6,6 +6,7 @@
|
|
|
<id column="job_id" jdbcType="VARCHAR" property="jobId"/>
|
|
|
<id column="code" jdbcType="VARCHAR" property="code"/>
|
|
|
<result column="layer" jdbcType="VARCHAR" property="layer"/>
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
<result column="kind" jdbcType="VARCHAR" property="kind"/>
|
|
|
<result column="gis" jdbcType="VARCHAR" property="gis"
|
|
|
typeHandler="com.shkpr.service.alambizplugin.dbdao.pgtype.GeomTypeHandlePg"/>
|
|
@@ -31,6 +32,7 @@
|
|
|
<id column="code" jdbcType="VARCHAR" property="code"/>
|
|
|
<id column="job_id" jdbcType="VARCHAR" property="jobId"/>
|
|
|
<result column="layer" jdbcType="VARCHAR" property="layer"/>
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
<result column="kind" jdbcType="VARCHAR" property="kind"/>
|
|
|
<result column="gis" jdbcType="VARCHAR" property="gis"
|
|
|
typeHandler="com.shkpr.service.alambizplugin.dbdao.pgtype.GeomPointTypeHandlePg"/>
|
|
@@ -45,6 +47,7 @@
|
|
|
<id column="job_id" jdbcType="VARCHAR" property="jobId"/>
|
|
|
<id column="code" jdbcType="VARCHAR" property="code"/>
|
|
|
<result column="layer" jdbcType="VARCHAR" property="layer"/>
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
<result column="kind" jdbcType="VARCHAR" property="kind"/>
|
|
|
<result column="gis" jdbcType="VARCHAR" property="gis"
|
|
|
typeHandler="com.shkpr.service.alambizplugin.dbdao.pgtype.GeomLineStringTypeHandlePg"/>
|
|
@@ -52,22 +55,32 @@
|
|
|
<result column="source" jdbcType="SMALLINT" property="source"/>
|
|
|
<result column="up_node" jdbcType="VARCHAR" property="upNode"/>
|
|
|
<result column="down_node" jdbcType="VARCHAR" property="downNode"/>
|
|
|
+ <result column="up_no" jdbcType="VARCHAR" property="upNo"/>
|
|
|
+ <result column="down_no" jdbcType="VARCHAR" property="downNo"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="findAddPointByProjId" fetchSize="3000" resultMap="Point">
|
|
|
- select la.code, la.job_id, la.layer, la.kind, la.gis, la.apply, la.source, la.elevation, la.no
|
|
|
+ select la.code, la.job_id, la.layer, la.kind, la.gis, la.apply, la.source, la.elevation, la.no,
|
|
|
+ case when lt.name is null then
|
|
|
+ (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
|
|
|
+ else lt.name end as name
|
|
|
from k3_gis_survey_layer_apply la
|
|
|
join k3_gis_survey_job_info jo on la.job_id = jo.uid
|
|
|
join k3_gis_survey_project_info pit on jo.proj_id = pit.uid
|
|
|
+ left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
|
|
|
where pit.uid = #{projId,jdbcType=VARCHAR}
|
|
|
and jo.disused = 0
|
|
|
- and la.apply = 'add' and kind = 'point'
|
|
|
+ and la.apply = 'add' and la.kind = 'point'
|
|
|
</select>
|
|
|
|
|
|
<select id="findAddLineByProjId" fetchSize="3000" resultMap="Line">
|
|
|
select la.code, la.job_id, la.layer, la.kind, la.apply, la.source, la.up_node, la.down_node,
|
|
|
+ un.no as up_no, dn.no as down_no,
|
|
|
case when un.code is not null and dn.code is not null then concat('[', un.gis, ',', dn.gis, ']') else la.gis end
|
|
|
- as gis
|
|
|
+ as gis,
|
|
|
+ case when lt.name is null then
|
|
|
+ (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
|
|
|
+ else lt.name end as name
|
|
|
from k3_gis_survey_layer_apply as la
|
|
|
join k3_gis_survey_job_info jo on la.job_id = jo.uid
|
|
|
join k3_gis_survey_project_info pit on jo.proj_id = pit.uid
|
|
@@ -75,24 +88,33 @@
|
|
|
on la.up_node = un.code and un.kind = 'point' and la.job_id = un.job_id
|
|
|
left join k3_gis_survey_layer_apply as dn
|
|
|
on la.down_node = dn.code and dn.kind = 'point' and la.job_id = dn.job_id
|
|
|
+ left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
|
|
|
where pit.uid = #{projId,jdbcType=VARCHAR}
|
|
|
and jo.disused = 0
|
|
|
and la.apply = 'add' and la.kind = 'line';
|
|
|
</select>
|
|
|
|
|
|
<select id="findAddPointByJobId" fetchSize="3000" resultMap="Point">
|
|
|
- select la.code, la.job_id, la.layer, la.kind, la.gis, la.apply, la.source, la.elevation, la.no
|
|
|
+ select la.code, la.job_id, la.layer, la.kind, la.gis, la.apply, la.source, la.elevation, la.no,
|
|
|
+ case when lt.name is null then
|
|
|
+ (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
|
|
|
+ else lt.name end as name
|
|
|
from k3_gis_survey_layer_apply la
|
|
|
join k3_gis_survey_job_info jo on la.job_id = jo.uid
|
|
|
join k3_gis_survey_project_info pit on jo.proj_id = pit.uid
|
|
|
+ left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
|
|
|
where jo.uid = #{jobId,jdbcType=VARCHAR}
|
|
|
- and la.apply = 'add' and kind = 'point'
|
|
|
+ and la.apply = 'add' and la.kind = 'point'
|
|
|
</select>
|
|
|
|
|
|
<select id="findAddLineByJobId" fetchSize="3000" resultMap="Line">
|
|
|
select la.code, la.job_id, la.layer, la.kind, la.apply, la.source, la.up_node, la.down_node,
|
|
|
+ un.no as up_no, dn.no as down_no,
|
|
|
case when un.code is not null and dn.code is not null then concat('[', un.gis, ',', dn.gis, ']') else la.gis end
|
|
|
- as gis
|
|
|
+ as gis,
|
|
|
+ case when lt.name is null then
|
|
|
+ (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
|
|
|
+ else lt.name end as name
|
|
|
from k3_gis_survey_layer_apply as la
|
|
|
join k3_gis_survey_job_info jo on la.job_id = jo.uid
|
|
|
join k3_gis_survey_project_info pit on jo.proj_id = pit.uid
|
|
@@ -100,6 +122,7 @@
|
|
|
on la.up_node = un.code and un.kind = 'point' and la.job_id = un.job_id
|
|
|
left join k3_gis_survey_layer_apply as dn
|
|
|
on la.down_node = dn.code and dn.kind = 'point' and la.job_id = dn.job_id
|
|
|
+ left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
|
|
|
where jo.uid = #{jobId,jdbcType=VARCHAR}
|
|
|
and la.apply = 'add' and la.kind = 'line';
|
|
|
</select>
|
|
@@ -109,15 +132,20 @@
|
|
|
la.depth, la.no,
|
|
|
case when la.kind = 'line' and un.code is not null and dn.code is not null
|
|
|
then concat('[', un.gis, ',', dn.gis, ']') else la.gis end as gis,
|
|
|
+ case when lt.name is null then
|
|
|
+ (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
|
|
|
+ else lt.name end as name,
|
|
|
pv.property as property_property, pv.code as property_code, pv.job_id as property_job_id,
|
|
|
pv.value as property_value
|
|
|
from k3_gis_survey_layer_apply as la
|
|
|
join k3_gis_survey_job_info jo on la.job_id = jo.uid
|
|
|
+ join k3_gis_survey_project_info pit on jo.proj_id = pit.uid
|
|
|
left join k3_gis_survey_layer_apply as un
|
|
|
on la.up_node = un.code and un.kind = 'point' and la.job_id = un.job_id
|
|
|
left join k3_gis_survey_layer_apply as dn
|
|
|
on la.down_node = dn.code and dn.kind = 'point' and la.job_id = dn.job_id
|
|
|
left join k3_gis_survey_property_value pv on la.code = pv.code and la.job_id = pv.job_id
|
|
|
+ left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
|
|
|
where la.job_id = #{jobId,jdbcType=VARCHAR} and la.kind = #{kind,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
|