From d895d08eb72b2229bb260bebed5db1461e89a382 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 06 三月 2024 15:13:25 +0800
Subject: [PATCH] 数据统计添加新的接口-1

---
 src/main/resources/mapper/sys/ReportMapper.xml |  116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 116 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/sys/ReportMapper.xml b/src/main/resources/mapper/sys/ReportMapper.xml
index d72151f..01c08a8 100644
--- a/src/main/resources/mapper/sys/ReportMapper.xml
+++ b/src/main/resources/mapper/sys/ReportMapper.xml
@@ -134,6 +134,7 @@
         order by code;
     </select>
 
+    <!-- 鏍规嵁椤圭洰缂栫爜鏌ヨ閽诲瓟鏁版嵁鍧愭爣鐐� -->
     <select id="selectExplorationPoints" resultType="com.lf.server.entity.ctrl.CoordinateEntity">
         select ST_X(geom) "x", ST_Y(geom) "y"
         from bs.s_explorationpoint b
@@ -141,4 +142,119 @@
             dirid like #{code} and geom is not null
         </where>
     </select>
+
+    <!-- 鎸夐」鐩粺璁℃暟瀛楅珮绋嬫ā鍨嬮潰绉� -->
+    <select id="countDemAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1", 0.0 "area"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁′笁缁村湴褰㈡ā鍨嬮潰绉� -->
+    <select id="countMptAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1", 0.0 "area"
+        from lf.sys_dir a
+        where pid =
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁″�炬枩鎽勫奖妯″瀷闈㈢Н -->
+    <select id="countOsgbAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1", 0.0 "area"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁℃縺鍏夌偣浜戞ā鍨嬮潰绉� -->
+    <select id="countLasAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1", 0.0 "area"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁″嫎瀵熷伐鐐逛釜鏁� -->
+    <select id="countSurveyWorksiteByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.s_surveyworksite b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁″嫎瀵熸姤鍛婁釜鏁� -->
+    <select id="countExplorationReportByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.s_explorationpoint b
+           inner join lf.sys_attach c on b.eventid = c.tab_guid
+           where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁″穿濉屼釜鏁� -->
+    <select id="countCollapseByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_collapse b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁℃偿鐭虫祦涓暟 -->
+    <select id="countDebrisFlowByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_debrisflow b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁″湴闈㈠闄蜂釜鏁� -->
+    <select id="countGroundCollapseByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_ground_collapse b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁¢珮闄¤竟鍧′釜鏁� -->
+    <select id="countHighSteepSlopeByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_highandsteep_slope b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁℃粦鍧′釜鏁� -->
+    <select id="countLandSlideByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_landslide b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁′笉绋冲畾鏂滃潯涓暟 -->
+    <select id="countUnstableSlopeByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_unstable_slope b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
+
+    <!-- 鎸夐」鐩粺璁℃按姣佷釜鏁� -->
+    <select id="countWaterDamageByPrj" resultType="com.lf.server.entity.ctrl.CountEntity">
+        select name "m1",
+          (select count(*) from bs.g_water_damage b where b.dirid like a.code || '%') "count"
+        from lf.sys_dir a
+        where pid = 0
+        order by code;
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3