From 1bfbc52da47b22f00a1c1f5f670c30f70d999873 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Mon, 02 Feb 2026 18:18:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml b/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
index 71cf5bc..6493925 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
@@ -23,6 +23,7 @@
<resultMap id="fwAreaDivideStatisticsResultMap" type="org.sxkj.fw.area.vo.FwAreaDivideStatisticsVO">
<result column="id" property="id"/>
<result column="area_name" property="areaName"/>
+ <result column="area_type_keys" property="areaTypeKeys"/>
<result column="scene_name" property="sceneName"/>
<result column="scene_type" property="sceneType"/>
<result column="device_count" property="deviceCount"/>
@@ -75,6 +76,13 @@
<if test="param2.areaCode != null and param2.areaCode != ''">
and ad.area_code = #{param2.areaCode}
</if>
+ <if test="param2.areaTypeKeyList != null and param2.areaTypeKeyList.size > 0">
+ and (
+ <foreach collection="param2.areaTypeKeyList" item="key" separator=" or ">
+ find_in_set(#{key}, ad.area_type_keys)
+ </foreach>
+ )
+ </if>
<if test="param2.deptList != null and param2.deptList.size > 0">
and ad.create_dept in
<foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")">
@@ -94,6 +102,30 @@
left join ja_fw_police_station ps on ps.id = ad.police_station_id and ps.is_deleted = 0
<where>
ad.is_deleted = 0
+ <if test="isSetSceneManage != null and isSetSceneManage == 1">
+ and exists (
+ select 1
+ from ja_fw_defense_scene ds
+ join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id and dsm.is_deleted = 0
+ where ds.is_deleted = 0
+ and ds.area_divide_ids is not null
+ and ds.area_divide_ids != ''
+ and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', ''))
+ )
+ </if>
+ <if test="isSetSceneManage != null and isSetSceneManage == 1 and flyTime != null">
+ and exists (
+ select 1
+ from ja_fw_defense_scene ds
+ join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id and dsm.is_deleted = 0
+ where ds.is_deleted = 0
+ and ds.area_divide_ids is not null
+ and ds.area_divide_ids != ''
+ and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', ''))
+ and (dsm.effective_date_start is null or dsm.effective_date_start <= #{flyTime})
+ and (dsm.effective_date_end is null or dsm.effective_date_end >= #{flyTime})
+ )
+ </if>
<if test="filterSelected != null and filterSelected == 1">
and (
not exists (
@@ -126,6 +158,13 @@
and ds.area_divide_ids is not null
and ds.area_divide_ids != ''
and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', ''))
+ )
+ </if>
+ <if test="areaTypeKeyList != null and areaTypeKeyList.size > 0">
+ and (
+ <foreach collection="areaTypeKeyList" item="key" separator=" or ">
+ find_in_set(#{key}, ad.area_type_keys)
+ </foreach>
)
</if>
</where>
@@ -198,6 +237,7 @@
select
stats.id,
stats.area_name,
+ stats.area_type_keys,
stats.scene_name,
stats.scene_type,
stats.device_count,
@@ -214,15 +254,18 @@
select
ad.id,
ad.area_name,
+ ad.area_type_keys,
(
select group_concat(distinct ds.scene_name)
from ja_fw_defense_scene ds
+ join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id and dsm.is_deleted = 0
where ds.is_deleted = 0
and find_in_set(ad.id, ds.area_divide_ids)
) as scene_name,
(
select group_concat(distinct ds.scene_type)
from ja_fw_defense_scene ds
+ join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id and dsm.is_deleted = 0
where ds.is_deleted = 0
and find_in_set(ad.id, ds.area_divide_ids)
) as scene_type,
@@ -264,6 +307,13 @@
from ja_fw_area_divide ad
<where>
ad.is_deleted = 0
+ and exists (
+ select 1
+ from ja_fw_defense_scene ds
+ join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id and dsm.is_deleted = 0
+ where ds.is_deleted = 0
+ and find_in_set(ad.id, ds.area_divide_ids)
+ )
<if test="param2.id != null and param2.id != ''">
and ad.id = #{param2.id}
</if>
@@ -282,6 +332,13 @@
<if test="param2.areaCode != null and param2.areaCode != ''">
and ad.area_code = #{param2.areaCode}
</if>
+ <if test="param2.areaTypeKeyList != null and param2.areaTypeKeyList.size > 0">
+ and (
+ <foreach collection="param2.areaTypeKeyList" item="key" separator=" or ">
+ find_in_set(#{key}, ad.area_type_keys)
+ </foreach>
+ )
+ </if>
<if test="param2.deptList != null and param2.deptList.size > 0">
and ad.create_dept in
<foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")">
@@ -296,6 +353,7 @@
select
stats.id,
stats.area_name,
+ stats.area_type_keys,
stats.scene_name,
stats.scene_type,
stats.device_count,
@@ -312,6 +370,7 @@
select
ad.id,
ad.area_name,
+ ad.area_type_keys,
(
select group_concat(distinct ds.scene_name)
from ja_fw_defense_scene ds
--
Gitblit v1.9.3