@@ -49,6 +49,7 @@ import SidePanelItem from '@/components/SidePanelItem/index.vue';
import { environmentalProtectionConstruction } from '@/api/home';
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
import HuanbaoModTwoLayers from './TwoLayers/HuanbaoModTwoLayers.vue';
+import { useDraggable } from '@/utils/drag';
// 定义组件名(便于调试和递归)
defineOptions({
@@ -82,7 +83,7 @@ const modalRes = ref({
bldstt: '',
hydrodtin: '1'
});
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
// 获取数据
const getData = async () => {
if (!baseid.value) return;
diff --git a/frontend/src/modules/huanbaozdjcgzkzQK/index.vue b/frontend/src/modules/huanbaozdjcgzkzQK/index.vue
index 8e09ea9a..179d5e07 100644
--- a/frontend/src/modules/huanbaozdjcgzkzQK/index.vue
+++ b/frontend/src/modules/huanbaozdjcgzkzQK/index.vue
@@ -68,6 +68,7 @@ import svg_liuliangjiancezhan from '@/assets/svg/liuliangjiancezhan.svg';
import svg_shuizhijiancezhan from '@/assets/svg/shuizhijiancezhan.svg';
import svg_zengzhizhanshuizhizhan from '@/assets/svg/zengzhizhanshuizhizhan.svg';
import svg_qixidi from '@/assets/svg/qixidi.svg';
+import { useDraggable } from '@/utils/drag';
defineOptions({
name: 'huanbaoMod'
@@ -103,7 +104,7 @@ const baseid = ref('');
// 弹框相关状态
const modalVisible = ref(false);
const currentFacility = ref
(null);
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
const fetchData = () => {
let params = {
filter: {
diff --git a/frontend/src/modules/liuyu/ai/spdzwaijc/AISPTK.vue b/frontend/src/modules/liuyu/ai/spdzwaijc/AISPTK.vue
index 074c4f03..ab353c35 100644
--- a/frontend/src/modules/liuyu/ai/spdzwaijc/AISPTK.vue
+++ b/frontend/src/modules/liuyu/ai/spdzwaijc/AISPTK.vue
@@ -316,7 +316,8 @@ import { postIdUrl } from '@/api/mapModal';
import dayjs from 'dayjs';
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
import videoCover from '@/assets/images/videFm.jpg';
-
+import { useDraggable } from '@/utils/drag';
+;
const baseUrl = import.meta.env.VITE_APP_ATTACHMENT_URL;
// ==================== Props ====================
@@ -397,7 +398,7 @@ const calendarValue = ref(searchData.value.month);
const detailModalVisible = ref(false);
const detailActiveKey = ref('2');
const detailDate = ref('');
-
+useDraggable(detailModalVisible, { boundary: true, resetOnOpen: true })
// 日历状态映射(运行/未运行)
const calendarStatusMap: Record<
string,
diff --git a/frontend/src/modules/liuyu/ai/spdzwaijc/index.vue b/frontend/src/modules/liuyu/ai/spdzwaijc/index.vue
index ffc41b99..5a61a858 100644
--- a/frontend/src/modules/liuyu/ai/spdzwaijc/index.vue
+++ b/frontend/src/modules/liuyu/ai/spdzwaijc/index.vue
@@ -51,6 +51,7 @@ import SidePanelItem from '@/components/SidePanelItem/index.vue';
import AISPTK from './AISPTK.vue';
import { getAiGyssList } from '@/api/zngj';
import dayjs from 'dayjs';
+import { useDraggable } from '@/utils/drag';
// 定义组件名(便于调试和递归)
defineOptions({
@@ -65,7 +66,7 @@ const panelDetail = ref({});
// ==================== 弹框状态 ====================
const modalVisible = ref(false);
const currentAction = ref('AI_5006');
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
const lyName = computed(() => baseid.value === '02' ? '升鱼斗运行' : '升鱼机运行');
// ==================== 日期选择器配置 ====================
diff --git a/frontend/src/modules/liuyu/yichangyujing/shengtailiuliangxianzhigaojing/shengtailiuliangxianshuju.vue b/frontend/src/modules/liuyu/yichangyujing/shengtailiuliangxianzhigaojing/shengtailiuliangxianshuju.vue
index 4f7d7759..a29ced40 100644
--- a/frontend/src/modules/liuyu/yichangyujing/shengtailiuliangxianzhigaojing/shengtailiuliangxianshuju.vue
+++ b/frontend/src/modules/liuyu/yichangyujing/shengtailiuliangxianzhigaojing/shengtailiuliangxianshuju.vue
@@ -40,6 +40,7 @@ import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
import SidePanelItem from "@/components/SidePanelItem/index.vue";
import { getStllGaojingList } from '@/api/zngj';
import ModeGaoJing from './ModeGaoJing.vue';
+import { useDraggable } from '@/utils/drag';
// 定义组件名(便于调试和递归)
defineOptions({
@@ -51,7 +52,7 @@ const baseid = ref('');
const dataLoading = ref(false);
const isModalOpen = ref(false);
const currentWarnState = ref('');
-
+useDraggable(isModalOpen, { boundary: true, resetOnOpen: true });
const data = ref([
{
name:'正常',
diff --git a/frontend/src/modules/liuyu/yichangyujing/shuizhijiancegaojing/shuizhijianceshuju.vue b/frontend/src/modules/liuyu/yichangyujing/shuizhijiancegaojing/shuizhijianceshuju.vue
index 1b485eb3..418e21dd 100644
--- a/frontend/src/modules/liuyu/yichangyujing/shuizhijiancegaojing/shuizhijianceshuju.vue
+++ b/frontend/src/modules/liuyu/yichangyujing/shuizhijiancegaojing/shuizhijianceshuju.vue
@@ -38,6 +38,7 @@ import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
import SidePanelItem from "@/components/SidePanelItem/index.vue";
import { getShuizhiGaojingList } from '@/api/zngj';
import ModeGaoJing from './ModeGaoJing.vue';
+import { useDraggable } from '@/utils/drag';
defineOptions({
name: "shuizhijianceshuju",
@@ -51,7 +52,7 @@ const defaultValue = ref('0');
// 弹框状态
const modalVisible = ref(false);
const currentWarnState = ref('');
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
const handleCardClick = (warnState: string) => {
currentWarnState.value = warnState;
modalVisible.value = true;
diff --git a/frontend/src/modules/lushengshengtaijiance/index.vue b/frontend/src/modules/lushengshengtaijiance/index.vue
index 3b2b33d9..06706870 100644
--- a/frontend/src/modules/lushengshengtaijiance/index.vue
+++ b/frontend/src/modules/lushengshengtaijiance/index.vue
@@ -68,6 +68,7 @@ import SidePanelItem from '@/components/SidePanelItem/index.vue';
import LsstjkTk from './LsstjkTk.vue';
import { wbsbGetKendoList, getEvnmAutoMonitor } from '@/api/stdc';
import moment from 'moment';
+import { useDraggable } from '@/utils/drag';
// 定义组件名
defineOptions({
@@ -81,7 +82,7 @@ const dataLoading = ref(false);
// ==================== 弹框状态 ====================
const modalVisible = ref(false);
const currentOrderIndex = ref('16');
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
// ==================== 响应式变量定义 ====================
// 选择器配置
const select = ref({
diff --git a/frontend/src/modules/monthlyAvgWaterTemCompareHistory/TwoLayers/monthlyAverageMaxModal.vue b/frontend/src/modules/monthlyAvgWaterTemCompareHistory/TwoLayers/monthlyAverageMaxModal.vue
index 9f31b064..c26fde8a 100644
--- a/frontend/src/modules/monthlyAvgWaterTemCompareHistory/TwoLayers/monthlyAverageMaxModal.vue
+++ b/frontend/src/modules/monthlyAvgWaterTemCompareHistory/TwoLayers/monthlyAverageMaxModal.vue
@@ -70,6 +70,7 @@ import dayjs from 'dayjs';
import { ZoomInOutlined } from '@ant-design/icons-vue';
import type { Dayjs } from 'dayjs';
import MonthlyAverage from '../monthlyAverage.vue';
+import { useDraggable } from '@/utils/drag';
defineOptions({
name: 'MonthlyAverageMaxModal'
@@ -101,7 +102,7 @@ const detailModalData = ref(null);
// 选择器相关 - 内部状态管理
const selectValue = ref('');
const selectOptions = ref([]);
-
+useDraggable(detailModalVisible, { boundary: true, resetOnOpen: true });
// 树形选择器展开状态管理
const treeExpandedKeys = ref([])
const nodeMap = new Map()
diff --git a/frontend/src/modules/monthlyAvgWaterTemCompareHistory/index.vue b/frontend/src/modules/monthlyAvgWaterTemCompareHistory/index.vue
index 2e43cba5..fc37d643 100644
--- a/frontend/src/modules/monthlyAvgWaterTemCompareHistory/index.vue
+++ b/frontend/src/modules/monthlyAvgWaterTemCompareHistory/index.vue
@@ -41,6 +41,7 @@ import dayjs from 'dayjs'
import {
ZoomInOutlined
} from '@ant-design/icons-vue';
+import { useDraggable } from '@/utils/drag';
defineOptions({
name: 'monthlyAvgWaterTemCompareHistory'
@@ -68,7 +69,8 @@ const stationName = ref('');
// 图表放大展示弹框状态
const zoomModalVisible = ref(false);
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
+useDraggable(zoomModalVisible, { boundary: true, resetOnOpen: true });
// 选择器配置
const select = ref({
show: true,
diff --git a/frontend/src/modules/qixidibaohugongzuokaizhanQK/index.vue b/frontend/src/modules/qixidibaohugongzuokaizhanQK/index.vue
index 1015e9be..29fabddb 100644
--- a/frontend/src/modules/qixidibaohugongzuokaizhanQK/index.vue
+++ b/frontend/src/modules/qixidibaohugongzuokaizhanQK/index.vue
@@ -1,206 +1,237 @@
-
-
-
-
-
-
-
-
{{ facility.name }}
-
{{ facility.count
- }}个
-
-
+
+
+
+
+
+
+
+
{{ facility.name }}
+
+ {{ facility.count }}个
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue
index c5d0a8b0..15cf663d 100644
--- a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue
+++ b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue
@@ -57,6 +57,8 @@ import type { ECharts } from 'echarts';
import { msstbprptGetKendoList } from '@/api/stll';
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
import STLLXFFS from './TwoLayer/STLLXFFS.vue';
+import { useDraggable } from '@/utils/drag';
+
// 定义组件名(便于调试和递归)
defineOptions({
name: 'xieFangFangShi'
@@ -78,7 +80,7 @@ const apiRawData = ref
([]); // 保存原始 API 数据
const modalVisible = ref(false);
const modalTitle = ref('');
const selectedData = ref(null);
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
// 颜色配置(根据图片配色)
const colors = [
'#9556a4', // 基荷发电 - 紫色
diff --git a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue
index 30ae4cb3..58bf3cdc 100644
--- a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue
+++ b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue
@@ -38,6 +38,8 @@ import type { ECharts } from 'echarts';
import { vmsstbprptGetKendoList } from '@/api/stll';
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
import FBQKTwolayer from './TwoLayer/FenBuQingKuangTwoLayer.vue';
+import { useDraggable } from '@/utils/drag';
+
// 定义组件名
defineOptions({
name: 'XieFangFenBu'
@@ -59,7 +61,7 @@ const wbsCode = ref('');
const modalVisible = ref(false);
const selectData = ref(''); // 选中的设施类型名称
const jidiName = ref(''); // 选中的基地名称
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
// 设施类型配置
const typeName = [
{ label: '生态放流孔', eqtp: 'EQ_1' },
diff --git a/frontend/src/modules/shengtaidabiaoModJZ/index.vue b/frontend/src/modules/shengtaidabiaoModJZ/index.vue
index 643c913d..3f07c556 100644
--- a/frontend/src/modules/shengtaidabiaoModJZ/index.vue
+++ b/frontend/src/modules/shengtaidabiaoModJZ/index.vue
@@ -105,6 +105,8 @@ import { useMapViewStore } from '@/modules/map/stores/map-view.store';
import STLLXFFS from './TwoLayer/ShengTaiLiuLiangDaBQKTwoLayer.vue';
import ModalYkzhbzdjcgz from './TwoLayer/ModalYkzhbzdjcgz.vue';
import HuanbaoZDJCGZKZ from '@/modules/huanbaozdjcgzkzQK/index.vue';
+import { useDraggable } from '@/utils/drag';
+
// 定义组件名(便于调试和递归)
defineOptions({
name: 'shengtaidabiaoMod'
@@ -149,7 +151,8 @@ const modalVisible = ref(false);
const modalTitle = ref('');
const selectedItem = ref(null);
const huanbaoModalVisible = ref(false);
-
+useDraggable(modalVisible, { boundary: true, resetOnOpen: true });
+useDraggable(huanbaoModalVisible, { boundary: true, resetOnOpen: true });
// 处理电站数量点击事件
const handleStationClick = () => {
huanbaoModalVisible.value = true;
diff --git a/frontend/src/modules/shengtaidabiaoTwoMod/index.vue b/frontend/src/modules/shengtaidabiaoTwoMod/index.vue
index 15e013fd..cdf54d8b 100644
--- a/frontend/src/modules/shengtaidabiaoTwoMod/index.vue
+++ b/frontend/src/modules/shengtaidabiaoTwoMod/index.vue
@@ -67,6 +67,8 @@ import { eqqecRateCount, evnmAutoMonitorGetKendoListCust } from '@/api/stll';
import ModalYkzhbzdjcgz from '../shengtaidabiaoMod/TwoLayer/ModalYkzhbzdjcgz.vue';
import STLLXFFS from './TwoLayer/STLLXFFS.vue'
import { useMapViewStore } from '@/modules/map/stores/map-view.store';
+import { useDraggable } from '@/utils/drag';
+
// 定义组件名(便于调试和递归)
defineOptions({
name: 'shengtaidabiaoMod'
@@ -604,6 +606,8 @@ watch(
const detailModalVisible = ref(false);
const detailModalTitle = ref('');
const detailData = ref([]);
+useDraggable(huanbaoModalVisible, { boundary: true, resetOnOpen: true });
+useDraggable(detailModalVisible, { boundary: true, resetOnOpen: true });
const detailColumns = ref([
{
title: mode.value === 'top' ? '基地名称' : '调节性能',
diff --git a/frontend/src/modules/shengtaidabiaoTwoModJJ/index.vue b/frontend/src/modules/shengtaidabiaoTwoModJJ/index.vue
index 1f9299d0..bb397101 100644
--- a/frontend/src/modules/shengtaidabiaoTwoModJJ/index.vue
+++ b/frontend/src/modules/shengtaidabiaoTwoModJJ/index.vue
@@ -68,6 +68,8 @@ import { eqqecRateCount, evnmAutoMonitorGetKendoListCust } from '@/api/stll';
import ModalYkzhbzdjcgz from '../shengtaidabiaoMod/TwoLayer/ModalYkzhbzdjcgz.vue';
import STLLXFFS from './TwoLayer/STLLXFFS.vue'
import { useMapViewStore } from '@/modules/map/stores/map-view.store';
+import { useDraggable } from '@/utils/drag';
+
// 定义组件名(便于调试和递归)
defineOptions({
name: 'shengtaidabiaoMod'
@@ -97,6 +99,7 @@ const huanbaoModalVisible = ref(false);
const handleStationClick = () => {
huanbaoModalVisible.value = true;
};
+
// 加载数据
const loadData = async () => {
spinning.value = true;
@@ -633,6 +636,8 @@ const detailColumns = ref([
watch(mode, () => {
loadData();
});
+useDraggable(huanbaoModalVisible, { boundary: true, resetOnOpen: true });
+useDraggable(detailModalVisible, { boundary: true, resetOnOpen: true });
diff --git a/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue b/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue
new file mode 100644
index 00000000..c10b93c8
--- /dev/null
+++ b/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
diff --git a/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue b/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue
new file mode 100644
index 00000000..6170d007
--- /dev/null
+++ b/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue
@@ -0,0 +1,228 @@
+
+
+
+ 预警配置管理
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue
new file mode 100644
index 00000000..caa405e3
--- /dev/null
+++ b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue
new file mode 100644
index 00000000..40cb5033
--- /dev/null
+++ b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
diff --git a/frontend/src/views/system/alertRules/components/RulesManagement/index.vue b/frontend/src/views/system/alertRules/components/RulesManagement/index.vue
new file mode 100644
index 00000000..9484aa57
--- /dev/null
+++ b/frontend/src/views/system/alertRules/components/RulesManagement/index.vue
@@ -0,0 +1,358 @@
+
+
+
+ 预警规则
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/alertRules/index.vue b/frontend/src/views/system/alertRules/index.vue
new file mode 100644
index 00000000..15401494
--- /dev/null
+++ b/frontend/src/views/system/alertRules/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementForm.vue b/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementForm.vue
index 4835ade9..90b7d48a 100644
--- a/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementForm.vue
+++ b/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementForm.vue
@@ -26,32 +26,40 @@
/>
-
+
+ placeholder="请输入沿程配置编码"
+ />
+
+
-
-
+
+ placeholder="请选择所在河段"
+ :options="riverOptions"
+ :filter-option="filterOption"
+ @change="handleRiverSelect"
+ :disabled="isEdit"
+ />
+
+
-
+
+ />
+
+
@@ -70,7 +78,7 @@
:key="item.stcd"
:value="item.stcd"
>
- {{ item.stnm }}
+ {{ item.ennm }}
handleEditNodeSelect(dataRef)"
>
- {{ item.stnm }}
+ {{ dataRef.parentId ? item.stnm : item.ennm }}
@@ -280,18 +290,21 @@ import {
ArrowUpOutlined,
ArrowDownOutlined
} from '@ant-design/icons-vue';
+import { getEngInfoDropdown, getAddvcdDropdownByRvcd } from '@/api/select';
interface Props {
visible: boolean;
initialValues?: any | null;
loading?: boolean;
+ riverOptions?: any[];
}
const localLoading = ref(false);
const props = withDefaults(defineProps(), {
visible: false,
initialValues: null,
- loading: false
+ loading: false,
+ riverOptions: () => []
});
const modalVisible = computed({
@@ -311,15 +324,20 @@ const defaultFormData = reactive({
id: undefined,
name: undefined,
code: undefined,
- rvnm: undefined,
- description: undefined
+ rvcd: undefined,
+ remark: undefined
});
const formData: any = reactive({ ...defaultFormData });
const rules: Record = {
name: [{ required: true, message: '请输入沿程配置名称', trigger: 'blur' }],
code: [{ required: true, message: '请输入配置编码', trigger: 'blur' }],
- rvnm: [{ required: true, message: '请输入所在河段', trigger: 'blur' }]
+ rvcd: [{ required: true, message: '请选择所在河段', trigger: 'change' }]
+};
+
+const handleRiverSelect = async (value: string) => {
+ const res = await getEngInfoDropdown({ rvcd: value });
+ stationList.value = res.data || [];
};
const isEdit = computed(() => !!props.initialValues);
@@ -331,7 +349,7 @@ const treeData = ref([]);
const addingNewNode = ref(false);
const newNodeData = ref({
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: ''
});
@@ -340,7 +358,7 @@ const addingChildNode = ref(false);
const currentParentKey = ref(null);
const childNodeData = ref({
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: ''
});
@@ -349,18 +367,13 @@ const editingNode = ref(false);
const editingNodeKey = ref(null);
const editNodeData = ref({
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: '',
originalData: null as any
});
-// 站点列表(模拟数据,实际应从接口获取)
-const stationList = ref([
- { stcd: '1', stnm: '站点A', sttpName: '类型1' },
- { stcd: '2', stnm: '站点B', sttpName: '类型2' },
- { stcd: '3', stnm: '站点C', sttpName: '类型1' },
- { stcd: '4', stnm: '站点D', sttpName: '类型3' }
-]);
+const stationList = ref([]);
+const childStationList = ref([]);
// 生成唯一ID
let nodeIdCounter = 0;
@@ -369,19 +382,19 @@ const generateNodeId = () => `node_${Date.now()}_${++nodeIdCounter}`;
// 获取节点标题
const getNodeTitle = (dataRef: any) => {
if (!dataRef.parentId) {
- // 一级节点:只显示 stnm
- return dataRef.stnm || '';
+ return dataRef.ennm || '';
} else {
- // 二级节点:显示 stnm + sttpName
- return `${dataRef.stnm || ''} ${dataRef.sttpName || ''}`;
+ return `${dataRef.ennm || ''} ${dataRef.sttpName || ''}`;
}
};
// 搜索过滤
-const filterOption = (input: string, option: any) => {
- return (
- option.children[0].children.toLowerCase().indexOf(input.toLowerCase()) >= 0
- );
+const filterOption = (inputValue: string, option: any) => {
+ const label = option.label || option.name || '';
+ const reachcdName = option.reachcdName || '';
+ const keyword = inputValue || '';
+
+ return label.indexOf(keyword) !== -1 || reachcdName.indexOf(keyword) !== -1;
};
// 判断是否为第一个节点
@@ -426,10 +439,14 @@ const findNodeByKey = (nodes: any[], key: string): any => {
// 新增一级节点
const handleAdd = () => {
+ if (!formData.rvcd) {
+ message.warning('请先选择所在河段');
+ return;
+ }
addingNewNode.value = true;
newNodeData.value = {
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: ''
};
};
@@ -438,7 +455,7 @@ const handleAdd = () => {
const handleNodeSelect = (value: string) => {
const station = stationList.value.find(item => item.stcd === value);
if (station) {
- newNodeData.value.stnm = station.stnm;
+ newNodeData.value.ennm = station.ennm;
newNodeData.value.sttpName = station.sttpName;
}
};
@@ -453,7 +470,7 @@ const handleSaveNewNode = () => {
const newNode = {
key: generateNodeId(),
stcd: newNodeData.value.stcd,
- stnm: newNodeData.value.stnm,
+ ennm: newNodeData.value.ennm,
sttpName: newNodeData.value.sttpName,
parentId: null,
children: []
@@ -469,27 +486,29 @@ const handleCancelAdd = () => {
addingNewNode.value = false;
newNodeData.value = {
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: ''
};
};
// 添加子节点(二级节点)
-const handleAddChild = (parentData: any) => {
+const handleAddChild = async (parentData: any) => {
addingChildNode.value = true;
currentParentKey.value = parentData.key;
childNodeData.value = {
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: ''
};
+ const res = await getAddvcdDropdownByRvcd({ stcd: parentData.stcd });
+ childStationList.value = res.data || [];
};
// 选择子节点
const handleChildNodeSelect = (value: string) => {
- const station = stationList.value.find(item => item.stcd === value);
+ const station = childStationList.value.find(item => item.stcd === value);
if (station) {
- childNodeData.value.stnm = station.stnm;
+ childNodeData.value.ennm = station.stnm;
childNodeData.value.sttpName = station.sttpName;
}
};
@@ -510,7 +529,7 @@ const handleSaveChildNode = () => {
const newChild = {
key: generateNodeId(),
stcd: childNodeData.value.stcd,
- stnm: childNodeData.value.stnm,
+ ennm: childNodeData.value.ennm,
sttpName: childNodeData.value.sttpName,
parentId: parent.key,
children: []
@@ -533,29 +552,38 @@ const handleCancelAddChild = () => {
currentParentKey.value = null;
childNodeData.value = {
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: ''
};
};
// 编辑节点
-const handleEditNode = (dataRef: any) => {
+const handleEditNode = async (dataRef: any) => {
editingNode.value = true;
editingNodeKey.value = dataRef.key;
// 保存原始数据
editNodeData.value = {
stcd: dataRef.stcd,
- stnm: dataRef.stnm,
+ ennm: dataRef.ennm,
sttpName: dataRef.sttpName,
originalData: { ...dataRef }
};
+ if (dataRef.parentId) {
+ const parent = findNodeByKey(treeData.value, dataRef.parentId);
+ if (parent) {
+ const res = await getAddvcdDropdownByRvcd({ stcd: parent.stcd });
+ childStationList.value = res.data || [];
+ }
+ }
};
// 选择编辑节点
-const handleEditNodeSelect = (value: string) => {
- const station = stationList.value.find(item => item.stcd === value);
+const handleEditNodeSelect = (dataRef: any) => {
+ const value = editNodeData.value.stcd;
+ const list = dataRef.parentId ? childStationList.value : stationList.value;
+ const station = list.find(item => item.stcd === value);
if (station) {
- editNodeData.value.stnm = station.stnm;
+ editNodeData.value.ennm = dataRef.parentId ? station.stnm : station.ennm;
editNodeData.value.sttpName = station.sttpName;
editNodeData.value.stcd = station.stcd;
}
@@ -577,7 +605,7 @@ const handleSaveEditNode = () => {
// 更新节点数据
node.stcd = editNodeData.value.stcd;
- node.stnm = editNodeData.value.stnm;
+ node.ennm = editNodeData.value.ennm;
node.sttpName = editNodeData.value.sttpName;
editingNode.value = false;
@@ -591,7 +619,7 @@ const handleCancelEditNode = () => {
editingNodeKey.value = null;
editNodeData.value = {
stcd: undefined,
- stnm: '',
+ ennm: '',
sttpName: '',
originalData: null
};
@@ -631,7 +659,7 @@ const handleMoveDown = (dataRef: any) => {
const handleDeleteNode = (dataRef: any) => {
Modal.confirm({
title: '确认删除',
- content: `确定要删除节点"${dataRef.stnm}"吗?`,
+ content: `确定要删除节点"${dataRef.ennm}"吗?`,
okText: '确定',
cancelText: '取消',
onOk: () => {
@@ -677,7 +705,7 @@ const handleOk = async () => {
}
};
-const initForm = () => {
+const initForm = async () => {
if (props.initialValues) {
const values = props.initialValues;
Object.keys(formData).forEach(key => {
@@ -702,6 +730,12 @@ const initForm = () => {
} else {
treeData.value = [];
}
+
+ // 编辑时调用接口获取一级站点列表
+ if (formData.rvcd) {
+ const res = await getEngInfoDropdown({ rvcd: formData.rvcd });
+ stationList.value = res.data || [];
+ }
} else {
resetForm();
}
diff --git a/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementSearch.vue b/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementSearch.vue
index c10b93c8..91cd9b3b 100644
--- a/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementSearch.vue
+++ b/frontend/src/views/system/map/components/ConfigManagement/ConfigManagementSearch.vue
@@ -10,7 +10,9 @@
>
- 新增沿程配置
+
+ 新增沿程配置
+
@@ -18,46 +20,52 @@
diff --git a/frontend/src/views/system/map/components/ConfigManagement/index.vue b/frontend/src/views/system/map/components/ConfigManagement/index.vue
index 84d71955..af27d7db 100644
--- a/frontend/src/views/system/map/components/ConfigManagement/index.vue
+++ b/frontend/src/views/system/map/components/ConfigManagement/index.vue
@@ -4,6 +4,8 @@
@@ -37,6 +39,8 @@
ref="configManagementForm"
v-model:visible="editModalVisible"
:initial-values="currentRecord"
+ :river-options="riverOptions"
+ :river-options-load="riverOptionsLoad"
@cancel="editModalCancel"
@ok="handleEditSubmit"
/>
@@ -52,8 +56,10 @@ import { message, Modal } from 'ant-design-vue';
import {
getAllConfigTree,
deleteBaseWbsb,
- saveBaseWbsb
+ saveBaseWbsbChild,
+ saveBaseWbsbChildDetail
} from '@/api/system/map/ConfigManagement';
+import { getRvcdDropdown } from '@/api/select';
// 表格实例
const basicTable = ref(null);
@@ -129,9 +135,20 @@ const handleAdd = () => {
editModalVisible.value = true;
};
+// 过滤掉值为 '-' 的字段
+const filterRecord = (record: any) => {
+ const filtered: any = {};
+ Object.keys(record).forEach(key => {
+ if (record[key] !== '-') {
+ filtered[key] = record[key];
+ }
+ });
+ return filtered;
+};
+
// 编辑处理
const handleEdit = (record: any) => {
- currentRecord.value = { ...record };
+ currentRecord.value = filterRecord(record);
editModalVisible.value = true;
};
@@ -144,8 +161,12 @@ const handleDelete = (record: any) => {
onOk: async () => {
try {
let res = await deleteBaseWbsb([record.id]);
- message.success('删除成功');
- basicTable.value.refresh();
+ if (res.code == 0) {
+ message.success('删除成功');
+ basicTable.value.refresh();
+ } else {
+ message.error('删除失败');
+ }
} catch (error) {
message.error('删除失败');
return;
@@ -159,12 +180,12 @@ const onSearchFinish = (values: any) => {
const params = {
logic: 'and',
filters: [
- values.parentId
+ values.rvcd
? {
- field: 'parentId',
+ field: 'rvcd',
operator: 'eq',
dataType: 'string',
- value: values.parentId
+ value: values.rvcd
}
: null,
values.name
@@ -197,23 +218,79 @@ const editModalCancel = () => {
// 表单提交
const handleEditSubmit = async (values: any) => {
try {
- let res = await saveBaseWbsb({
+ const formData = {
...currentRecord.value,
...values
- });
- message.success(`保存成功`);
+ };
+ delete formData.configNodes;
- editModalVisible.value = false;
- basicTable.value.refresh();
+ Object.keys(formData).forEach(key => {
+ if (key.includes('-')) {
+ delete formData[key];
+ }
+ });
+
+ let res = await saveBaseWbsbChild(formData);
+ if (res.code == 0) {
+ const alongId = res.data;
+ const treeData = values.configNodes || [];
+
+ if (treeData.length > 0) {
+ const formatTreeData = (
+ nodes: any[],
+ parentId: string | null = null
+ ) => {
+ return nodes.map(node => ({
+ alongId,
+ stcd: node.stcd,
+ stnm: node.ennm,
+ sttpName: node.sttpName,
+ parentId: parentId ? parentId : null,
+ children:
+ node.children && node.children.length > 0
+ ? formatTreeData(node.children, node.key)
+ : []
+ }));
+ };
+
+ const detailData = formatTreeData(treeData);
+
+ const detailRes = await saveBaseWbsbChildDetail(detailData);
+ if (detailRes.code == 0) {
+ message.success(`保存成功`);
+ editModalVisible.value = false;
+ basicTable.value.refresh();
+ } else {
+ message.error(`保存子节点失败`);
+ }
+ } else {
+ message.success(`保存成功`);
+ editModalVisible.value = false;
+ basicTable.value.refresh();
+ }
+ } else {
+ message.error(`保存失败`);
+ }
} catch (error) {
message.error(`保存失败`);
-
editModalVisible.value = false;
return;
}
};
-
-const initOption = () => {};
+const riverOptions = ref([]);
+const riverOptionsLoad = ref(false);
+const initOption = () => {
+ const params = {};
+ riverOptionsLoad.value = true;
+ getRvcdDropdown(params).then((res: any) => {
+ res.data.forEach((item: any) => {
+ item.value = item.rvcd;
+ item.label = item.rvnm;
+ });
+ riverOptions.value = res.data || [];
+ riverOptionsLoad.value = false;
+ });
+};
onMounted(() => {
initOption();
});
diff --git a/frontend/src/views/system/map/components/LegendData/LegendDataForm.vue b/frontend/src/views/system/map/components/LegendData/LegendDataForm.vue
index bccce97a..c2014599 100644
--- a/frontend/src/views/system/map/components/LegendData/LegendDataForm.vue
+++ b/frontend/src/views/system/map/components/LegendData/LegendDataForm.vue
@@ -2,7 +2,7 @@
emit('update:visible', val)
});
+const confirmLoading = computed(() => {
+ return localLoading.value || props.loading;
+});
+
const emit = defineEmits<{
(e: 'update:visible', value: boolean): void;
(e: 'cancel'): void;
@@ -276,6 +280,7 @@ const handleLayerSelect = (value: any) => {
};
const handleOk = async () => {
+ localLoading.value = true;
try {
await formRef.value.validate();
// 过滤掉 undefined 的字段,不提交空值
@@ -329,6 +334,7 @@ const handleOk = async () => {
} catch (error) {
console.error('Validate Failed:', error);
message.error('请检查表单填写是否正确');
+ localLoading.value = false;
}
};
@@ -350,6 +356,7 @@ const resetForm = () => {
formRef.value.resetFields();
}
Object.assign(formData, defaultFormData);
+ localLoading.value = false;
};
const handleCancel = () => {
@@ -358,11 +365,22 @@ const handleCancel = () => {
resetForm();
};
+watch(
+ () => props.loading,
+ newLoading => {
+ if (newLoading) {
+ localLoading.value = false;
+ }
+ }
+);
+
watch(
() => props.visible,
newVisible => {
if (newVisible) {
initForm();
+ } else {
+ localLoading.value = false;
}
},
{ immediate: false }
diff --git a/frontend/src/views/system/map/components/LegendData/index.vue b/frontend/src/views/system/map/components/LegendData/index.vue
index 59deedd4..9738c1a6 100644
--- a/frontend/src/views/system/map/components/LegendData/index.vue
+++ b/frontend/src/views/system/map/components/LegendData/index.vue
@@ -66,6 +66,7 @@
:LayerOptions="LayerOptions"
v-model:visible="editModalVisible"
:initial-values="currentRecord"
+ :loading="editLoading"
@cancel="editModalCancel"
@ok="handleEditSubmit"
/>
@@ -249,6 +250,7 @@ const LegendOptions = ref([]);
const LayerOptions = ref([]);
const currentRecord = ref(null);
const editModalVisible = ref(false);
+const editLoading = ref(false);
const handleAdd = () => {
currentRecord.value = null;
ensureOptionsLoaded().then(() => {
@@ -401,11 +403,16 @@ const editModalCancel = () => {
// 表单提交
const handleEditSubmit = async (values: any, type: string) => {
+ editLoading.value = true;
try {
let res = await saveMapLegend({
...currentRecord.value,
...values
});
+ if (res.code == 1) {
+ message.error('保存失败');
+ return;
+ }
if (type === 'switch') {
message.success('修改状态成功');
} else {
@@ -421,6 +428,8 @@ const handleEditSubmit = async (values: any, type: string) => {
}
editModalVisible.value = false;
return;
+ } finally {
+ editLoading.value = false;
}
};
const initOption = () => {
diff --git a/frontend/src/views/system/pushManagement/components/ConfigManagement/ConfigManagementForm.vue b/frontend/src/views/system/pushManagement/components/ConfigManagement/ConfigManagementForm.vue
new file mode 100644
index 00000000..4835ade9
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/components/ConfigManagement/ConfigManagementForm.vue
@@ -0,0 +1,784 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.stnm }}
+
+
+
+ 保存
+
+
+
+
+
+
+ 新增一级节点
+
+
+
+
+
+
+
+
+
+ {{ item.stnm }}
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
{{ getNodeTitle(dataRef) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.stnm }}
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/pushManagement/components/ConfigManagement/ConfigManagementSearch.vue b/frontend/src/views/system/pushManagement/components/ConfigManagement/ConfigManagementSearch.vue
new file mode 100644
index 00000000..c10b93c8
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/components/ConfigManagement/ConfigManagementSearch.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
diff --git a/frontend/src/views/system/pushManagement/components/ConfigManagement/index.vue b/frontend/src/views/system/pushManagement/components/ConfigManagement/index.vue
new file mode 100644
index 00000000..64294dbc
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/components/ConfigManagement/index.vue
@@ -0,0 +1,228 @@
+
+
+
+ 推送配置
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/pushManagement/components/HistoryManagement/LayerManagementForm.vue b/frontend/src/views/system/pushManagement/components/HistoryManagement/LayerManagementForm.vue
new file mode 100644
index 00000000..caa405e3
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/components/HistoryManagement/LayerManagementForm.vue
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/pushManagement/components/HistoryManagement/LayerManagementSearch.vue b/frontend/src/views/system/pushManagement/components/HistoryManagement/LayerManagementSearch.vue
new file mode 100644
index 00000000..40cb5033
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/components/HistoryManagement/LayerManagementSearch.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
diff --git a/frontend/src/views/system/pushManagement/components/HistoryManagement/index.vue b/frontend/src/views/system/pushManagement/components/HistoryManagement/index.vue
new file mode 100644
index 00000000..372b78b1
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/components/HistoryManagement/index.vue
@@ -0,0 +1,358 @@
+
+
+
+ 推送历史
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/pushManagement/index.vue b/frontend/src/views/system/pushManagement/index.vue
new file mode 100644
index 00000000..c630490d
--- /dev/null
+++ b/frontend/src/views/system/pushManagement/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
From 80474e9783017ad49dd2b2cabc6765f1cca17c05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E5=87=AF?= <2448379534@qq.com>
Date: Tue, 7 Jul 2026 13:50:21 +0800
Subject: [PATCH 22/27] =?UTF-8?q?=E5=BC=B9=E6=A1=86=E8=87=AA=E5=AE=9A?=
=?UTF-8?q?=E4=B9=89=E7=8B=82=E8=B5=8C=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/docs/问题.md | 5 +++--
.../components/developStatusChart/index.vue | 2 +-
.../components/engEnvironmentData/index.vue | 2 +-
.../modules/dianxingcuoshijieshao/index.vue | 2 +-
.../modules/fishSurvey/FishChangeTu/index.vue | 18 +++++++++++++++---
frontend/src/modules/huanbaoMod/index.vue | 2 +-
.../xieFangFangShi/TwoLayer/STLLXFFS.vue | 5 ++---
.../xieFangFangShi/index.vue | 2 +-
.../TwoLayer/FenBuQingKuangTwoLayer.vue | 2 +-
.../xieFangFenBu/index.vue | 2 +-
.../shuidianhuangjingjieruMod/DataTable.vue | 2 +-
11 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/frontend/docs/问题.md b/frontend/docs/问题.md
index d3f62f2a..dd0c2b0c 100644
--- a/frontend/docs/问题.md
+++ b/frontend/docs/问题.md
@@ -24,8 +24,9 @@
| 2026-06-26 |
| 14 | 地图抽吸 碰撞检测 放大到具体层级锚点抽吸了但是 popup 弹框还在显示 | ⚠ |
|
| 2026-06-26 |
| 15 | 地图比如积石峡 放大到层级被公伯峡隐藏掉了,然后在放大才显示 抽吸的问题 | ⚠ |
|
| 2026-06-26 |
| 16 | 运行情况 计划开始运行时间 接口没接 | ⚠ |
|
-| 2026-07-01 | 王 | 17 | 所有弹框加拖动 |
|
|
-| 2026-07-01 | 王 | 18 | 所有弹框检查宽度有的是固定的 |
|
|
+| 2026-07-01 | 王 | 17 | 所有弹框加拖动 | ✅ |
|
+| 2026-07-01 | 王 | 18 | 所有弹框检查宽度有的是固定的 | ✅ |
|
+| 2026-07-01 | 王 | 18 | 所有导出的添加 |
|
|
| 2026-07-02 | 扈 | 19 | 地图点击基地切换偶发性会全部展示出来所有锚点 |
|
|
---
diff --git a/frontend/src/components/developStatusChart/index.vue b/frontend/src/components/developStatusChart/index.vue
index 1a0c370a..70c329da 100644
--- a/frontend/src/components/developStatusChart/index.vue
+++ b/frontend/src/components/developStatusChart/index.vue
@@ -7,7 +7,7 @@
diff --git a/frontend/src/components/engEnvironmentData/index.vue b/frontend/src/components/engEnvironmentData/index.vue
index cdedab24..f28a244c 100644
--- a/frontend/src/components/engEnvironmentData/index.vue
+++ b/frontend/src/components/engEnvironmentData/index.vue
@@ -42,7 +42,7 @@
diff --git a/frontend/src/modules/dianxingcuoshijieshao/index.vue b/frontend/src/modules/dianxingcuoshijieshao/index.vue
index e08eea2a..5cd9c2b8 100644
--- a/frontend/src/modules/dianxingcuoshijieshao/index.vue
+++ b/frontend/src/modules/dianxingcuoshijieshao/index.vue
@@ -53,7 +53,7 @@
-
+
diff --git a/frontend/src/modules/fishSurvey/FishChangeTu/index.vue b/frontend/src/modules/fishSurvey/FishChangeTu/index.vue
index 2a5cceec..6bff9306 100644
--- a/frontend/src/modules/fishSurvey/FishChangeTu/index.vue
+++ b/frontend/src/modules/fishSurvey/FishChangeTu/index.vue
@@ -4,9 +4,17 @@
:datetimePicker="datetimePicker"
@update-values="handlePanelChange"
>
-
-
-
+
+
+
@@ -296,8 +304,12 @@ onUnmounted(() => {
}
.empty-container {
display: flex;
+ flex-direction: column;
justify-content: center;
align-items: center;
height: 200px;
+ p{
+ text-indent:0px !important;
+ }
}
diff --git a/frontend/src/modules/huanbaoMod/index.vue b/frontend/src/modules/huanbaoMod/index.vue
index 262ef197..32605966 100644
--- a/frontend/src/modules/huanbaoMod/index.vue
+++ b/frontend/src/modules/huanbaoMod/index.vue
@@ -30,7 +30,7 @@
{
width: 35%;
height: 482px;
// position: relative;
- min-width: 521px;
-
+
.pie-chart {
width: 100%;
height: 100%;
diff --git a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue
index 15cf663d..e1566e3c 100644
--- a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue
+++ b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue
@@ -37,7 +37,7 @@
{
.chart-section {
width: 35%;
height: 482px;
- min-width: 521px;
+
.pie-chart {
width: 100%;
diff --git a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue
index 58bf3cdc..502c418d 100644
--- a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue
+++ b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue
@@ -10,7 +10,7 @@
diff --git a/frontend/src/modules/shuidianhuangjingjieruMod/DataTable.vue b/frontend/src/modules/shuidianhuangjingjieruMod/DataTable.vue
index 4de785e7..f0513a14 100644
--- a/frontend/src/modules/shuidianhuangjingjieruMod/DataTable.vue
+++ b/frontend/src/modules/shuidianhuangjingjieruMod/DataTable.vue
@@ -7,7 +7,7 @@
From 6c521d9d847dffcf52713d1bb6f3c4a412ad3dee Mon Sep 17 00:00:00 2001
From: tangwei
Date: Tue, 7 Jul 2026 14:40:04 +0800
Subject: [PATCH 23/27] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=9C=B0?=
=?UTF-8?q?=E5=9B=BE=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fb/service/impl/FbStationServiceImpl.java | 2 +-
.../fh/service/impl/FhHabitatServiceImpl.java | 4 +-
.../service/impl/SdWtMonitorServiceImpl.java | 67 +++++++++++++------
3 files changed, 48 insertions(+), 25 deletions(-)
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/fb/service/impl/FbStationServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_env/fb/service/impl/FbStationServiceImpl.java
index 80cc3408..1712f20c 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_env/fb/service/impl/FbStationServiceImpl.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/fb/service/impl/FbStationServiceImpl.java
@@ -4705,7 +4705,7 @@ public class FbStationServiceImpl implements FbStationService {
case "rstcd" -> "a.RSTCD";
case "stcd" -> "a.STCD";
case "sttp" -> "a.STTP";
- case "bldsttCcode" -> "a.BLDSTT_CODE";
+ case "bldsttccode" -> "a.BLDSTT_CODE";
case "lgtd" -> "a.LGTD";
default -> null;
};
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java
index 0efb414b..aa5bad69 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java
@@ -1977,7 +1977,7 @@ public class FhHabitatServiceImpl implements FhHabitatService {
sql.append("AND ").append(filterSql).append(" ");
}
Page> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
- List vaVpList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), new HashMap<>(), FhHaVapVo.class);
+ List vaVpList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, FhHaVapVo.class);
for (FhHaVapVo vo : vaVpList) {
String bldsttCcode = vo.getBldsttCcode();
@@ -2009,7 +2009,7 @@ public class FhHabitatServiceImpl implements FhHabitatService {
return null;
}
return switch (field.toLowerCase()) {
- case "sttpCode" -> "t.sttp";
+ case "sttpcode" -> "t.STTP_CODE";
case "lgtd" -> "t.lgtd";
default -> null;
};
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/wt/service/impl/SdWtMonitorServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_env/wt/service/impl/SdWtMonitorServiceImpl.java
index b28551d8..127a19cc 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_env/wt/service/impl/SdWtMonitorServiceImpl.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/wt/service/impl/SdWtMonitorServiceImpl.java
@@ -26,6 +26,7 @@ import com.yfd.platform.qgc_env.wt.mapper.SdWtMonitorMapper;
import com.yfd.platform.qgc_env.wt.utils.SiteAvoidanceUtils;
import com.yfd.platform.qgc_env.wt.service.SdWtMonitorService;
import com.yfd.platform.utils.QgcQueryWrapperUtil;
+import com.yfd.platform.utils.SecurityUtils;
import jakarta.annotation.Resource;
import lombok.Data;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -115,7 +116,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
"t.JCDT AS jcdt, " +
"t.WDDT AS wddt, " +
"t.BLDSTT_CODE AS bldsttCode, " +
- "CASE WHEN t.BLDSTT_CODE =2 THEN '已建' WHEN t.BLDSTT_CODE =1 THEN '在建' ELSE '未建/规划' END AS bldsttCcodeName, "+
+ "CASE WHEN t.BLDSTT_CODE =2 THEN '已建' WHEN t.BLDSTT_CODE =1 THEN '在建' ELSE '未建/规划' END AS bldsttCcodeName, " +
"t.INV AS inv, " +
"t.INVINMN AS invinmn, " +
"t.INTRODUCE AS introduce, " +
@@ -127,7 +128,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
"t.DTIN_TYPE AS dtinType, " +
"t.DTIN_TM AS dtinTm, " +
"t.MWAY AS mway, " +
- "CASE NVL(t.MWAY, 0) WHEN 1 THEN '人工' WHEN 2 THEN '自动' ELSE '未知' END AS mwayName , "+
+ "CASE NVL(t.MWAY, 0) WHEN 1 THEN '人工' WHEN 2 THEN '自动' ELSE '未知' END AS mwayName , " +
"t.STINDX AS stindx, " +
"t.ORDER_INDEX AS orderIndex, " +
"t.DMSTCD AS dmstcd, " +
@@ -445,7 +446,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
}
sql.append(buildYearDetailOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getSort()));
- Page> page = QgcQueryWrapperUtil.buildPage(loadOptions,loadOptions.getSkip(), loadOptions.getTake());
+ Page> page = QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
List list = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, SdYearDetailVO.class);
for (SdYearDetailVO vo : list) {
vo.setActualTemp(vo.getWt());
@@ -490,7 +491,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
}
sql.append(buildMonthDetailOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getSort()));
- Page> page = QgcQueryWrapperUtil.buildPage(loadOptions,loadOptions.getSkip(), loadOptions.getTake());
+ Page> page = QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
List list = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, SdMonthDetailVO.class);
DataSourceResult result = new DataSourceResult<>();
result.setData(list);
@@ -518,7 +519,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
Map paramMap = new HashMap<>();
paramMap.put("stcd", stcd);
WtrvVo vo = (WtrvVo) microservicDynamicSQLMapper.getOneBySqlWithResultType(sql, paramMap, WtrvVo.class);
- if (vo == null ) {
+ if (vo == null) {
return buildDefaultWtrvVo(stcd);
}
return vo;
@@ -577,7 +578,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
paramMap.put("baseId", baseId);
}
- Page> page = QgcQueryWrapperUtil.buildPage(loadOptions,loadOptions.getSkip(), loadOptions.getTake());
+ Page> page = QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
List wtFishVoList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, WtFishVo.class);
String hbrvcd = wtFishVoList.isEmpty() ? null : wtFishVoList.get(0).getHbrvcd();
@@ -850,7 +851,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
}
sql.append(buildVmsstbprptOrderBySql(dataSourceRequest.getSort()));
- Page> page = QgcQueryWrapperUtil.buildPage(loadOptions,loadOptions.getSkip(), loadOptions.getTake());
+ Page> page = QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
List list = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, SdWtBaseInfoVO.class);
DataSourceResult result = new DataSourceResult<>();
@@ -1153,7 +1154,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
appendCxDetailOrderBy(sql, dataSourceRequest.getSort());
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
- Page> page = QgcQueryWrapperUtil.buildPage(loadOptions,loadOptions.getSkip(), loadOptions.getTake());
+ Page> page = QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
List rowList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, WtCxDetailRow.class);
List verticalList = getVerticals(rowList, wtDeviceType);
@@ -2954,7 +2955,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
" wt.LTTD AS lttd,\n" +
" wt.WT_DEVICE_TYPE AS deviceType,\n" +
" wt.ELEV AS dtmel,\n" +
- " wt.FHSTNM AS fhstnm,\n" +
+// " wt.FHSTNM AS fhstnm,\n" +
" wt.MWAY AS mway,\n" +
" eng.RVCD AS rvcd,\n" +
" eng.ADDVCD AS addvcd,\n" +
@@ -2971,21 +2972,30 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD AND NVL(eng.IS_DELETED, 0) = 0\n" +
"LEFT JOIN SD_WTENGRLTN_B rel ON rel.STCD = wt.STCD AND NVL(rel.IS_DELETED, 0) = 0\n" +
"WHERE NVL(wt.IS_DELETED, 0) = 0 AND wt.STTP IN ('WTRV', 'WTVT') AND wt.LGTD IS NOT NULL AND wt.LTTD IS NOT NULL ");
-
- if (StrUtil.isNotBlank(sttpCode)) {
- sql.append(" AND wt.STTP = #{map.sttpCode} ");
- }
- if (StrUtil.isNotBlank(dtinType)) {
- sql.append(" AND wt.DTIN_TYPE = #{map.dtinType} ");
- }
-
Map paramMap = new HashMap<>();
- if (StrUtil.isNotBlank(sttpCode)) {
- paramMap.put("sttpCode", sttpCode);
- }
- if (StrUtil.isNotBlank(dtinType)) {
- paramMap.put("dtinType", dtinType);
+ String filterSql = QgcQueryWrapperUtil.buildFilterCondition(
+ dataSourceRequest == null ? null : dataSourceRequest.getFilter(),
+ paramMap,
+ new int[]{0},
+ this::mapWeFvColumn
+ );
+ if (StrUtil.isNotBlank(filterSql)) {
+ sql.append("AND ").append(filterSql).append(" ");
}
+// if (StrUtil.isNotBlank(sttpCode)) {
+// sql.append(" AND wt.STTP = #{map.sttpCode} ");
+// }
+// if (StrUtil.isNotBlank(dtinType)) {
+// sql.append(" AND wt.DTIN_TYPE = #{map.dtinType} ");
+// }
+//
+// Map paramMap = new HashMap<>();
+// if (StrUtil.isNotBlank(sttpCode)) {
+// paramMap.put("sttpCode", sttpCode);
+// }
+// if (StrUtil.isNotBlank(dtinType)) {
+// paramMap.put("dtinType", dtinType);
+// }
List sort = dataSourceRequest.getSort();
if (sort != null && !sort.isEmpty()) {
@@ -3035,4 +3045,17 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
return dataSourceResult;
}
+ private String mapWeFvColumn(String field) {
+ if (StrUtil.isBlank(field)) {
+ return null;
+ }
+ return switch (field.toLowerCase()) {
+ case "sttpcode" -> "wt.STTP";
+ case "dtintype" -> "wt.DTIN_TYPE";
+ case "lgtd" -> "wt.LGTD";
+ case "fhstcd" -> "wt.FHSTCD";
+ default -> null;
+ };
+ }
+
}
From 58fec2e6f19a98c3d173556b6f4bbf404fd72954 Mon Sep 17 00:00:00 2001
From: tangwei
Date: Tue, 7 Jul 2026 15:20:16 +0800
Subject: [PATCH 24/27] =?UTF-8?q?fix:=20=E7=94=B5=E7=AB=99=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1=E7=8A=B6=E6=80=81=E6=9D=A1=E4=BB=B6=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../platform/qgc_eng/eq/service/impl/EngEqDataServiceImpl.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/src/main/java/com/yfd/platform/qgc_eng/eq/service/impl/EngEqDataServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_eng/eq/service/impl/EngEqDataServiceImpl.java
index 81365936..3ffbb034 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_eng/eq/service/impl/EngEqDataServiceImpl.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_eng/eq/service/impl/EngEqDataServiceImpl.java
@@ -5498,6 +5498,7 @@ public class EngEqDataServiceImpl implements EngEqDataService {
case "bldsttCcode" -> "t.bldsttCcode";
case "dtinEnv" -> "t.dtinEnv";
case "DTIN" -> "t.dtin";
+ case "dtin" -> "t.dtin";
case "runState" -> "t.runState";
case "baseStepSort" -> "NVL(t.baseStepSort, 999999)";
case "rvcdStepSort" -> "NVL(t.rvcdStepSort, 999999)";
From d9e15f97365e897c449e084d2272e84944f80beb Mon Sep 17 00:00:00 2001
From: tangwei
Date: Tue, 7 Jul 2026 15:44:55 +0800
Subject: [PATCH 25/27] =?UTF-8?q?feat:=20=E6=A0=96=E6=81=AF=E5=9C=B0?=
=?UTF-8?q?=E5=85=B3=E8=81=94=E7=AB=99=E7=82=B9=E6=8F=8F=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fh/controller/FhHabitatController.java | 6 +
.../qgc_env/fh/entity/vo/FhPointVo.java | 67 +++++++++
.../qgc_env/fh/service/FhHabitatService.java | 3 +
.../fh/service/impl/FhHabitatServiceImpl.java | 138 ++++++++++++++++++
4 files changed, 214 insertions(+)
create mode 100644 backend/src/main/java/com/yfd/platform/qgc_env/fh/entity/vo/FhPointVo.java
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/fh/controller/FhHabitatController.java b/backend/src/main/java/com/yfd/platform/qgc_env/fh/controller/FhHabitatController.java
index 1ab1d44d..8c303c5e 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_env/fh/controller/FhHabitatController.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/fh/controller/FhHabitatController.java
@@ -77,4 +77,10 @@ public class FhHabitatController {
public ResponseResult getFhvapKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
return ResponseResult.successData(fhHabitatService.getFhvapKendoListCust(dataSourceRequest));
}
+
+ @PostMapping("/fhvap/fhPoint/GetKendoListCust")
+ @Operation(summary = "栖息地关联站点描点")
+ public ResponseResult getFhPoint(@RequestBody DataSourceRequest dataSourceRequest) {
+ return ResponseResult.successData(fhHabitatService.getFhPoint(dataSourceRequest));
+ }
}
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/fh/entity/vo/FhPointVo.java b/backend/src/main/java/com/yfd/platform/qgc_env/fh/entity/vo/FhPointVo.java
new file mode 100644
index 00000000..6beebf5f
--- /dev/null
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/fh/entity/vo/FhPointVo.java
@@ -0,0 +1,67 @@
+package com.yfd.platform.qgc_env.fh.entity.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+@Schema(description = "栖息地关联站点描点")
+public class FhPointVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "所属栖息地编码")
+ private String fhstcd;
+
+ @Schema(description = "站码")
+ private String stcd;
+
+ @Schema(description = "站名")
+ private String stnm;
+
+ @Schema(description = "所属电站名称")
+ private String ennm;
+
+ @Schema(description = "经度")
+ private BigDecimal lgtd;
+
+ @Schema(description = "纬度")
+ private BigDecimal lttd;
+
+ @Schema(description = "基地编码")
+ private String baseId;
+
+ @Schema(description = "基地名称")
+ private String baseName;
+
+ @Schema(description = "所属流域编码")
+ private String rvcd;
+
+ @Schema(description = "所属流域名称")
+ private String rvcdName;
+
+ @Schema(description = "所属电站编码")
+ private String rstcd;
+
+ @Schema(description = "所属站类编码")
+ private String sttpCode;
+
+ @Schema(description = "基面高程")
+ private BigDecimal dtmel;
+
+ @Schema(description = "是否接入")
+ private Integer dtin;
+
+ @Schema(description = "建设状态分类")
+ private String bldsttCcode;
+
+ @Schema(description = "描点状态")
+ private String anchoPointState;
+
+ @Schema(description = "出入库标识(1 入库水温, 2 出库水温, 3 非出入库水温)")
+ private Integer ioType;
+}
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/FhHabitatService.java b/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/FhHabitatService.java
index 12e188e6..f279b5a0 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/FhHabitatService.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/FhHabitatService.java
@@ -6,6 +6,7 @@ import com.yfd.platform.qgc_env.fh.entity.ao.FhDefaultAo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhBaseInfoVo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhDefaultVo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhHaVapVo;
+import com.yfd.platform.qgc_env.fh.entity.vo.FhPointVo;
import com.yfd.platform.qgc_env.fh.entity.vo.HabitatVo;
public interface FhHabitatService {
@@ -27,4 +28,6 @@ public interface FhHabitatService {
DataSourceResult getStTbYsBVoKendoListCust(DataSourceRequest dataSourceRequest);
DataSourceResult getFhvapKendoListCust(DataSourceRequest dataSourceRequest);
+
+ DataSourceResult getFhPoint(DataSourceRequest dataSourceRequest);
}
diff --git a/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java
index aa5bad69..9156d14b 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_env/fh/service/impl/FhHabitatServiceImpl.java
@@ -17,6 +17,7 @@ import com.yfd.platform.qgc_env.fh.entity.ao.FhDefaultAo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhBaseInfoVo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhDefaultVo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhHaVapVo;
+import com.yfd.platform.qgc_env.fh.entity.vo.FhPointVo;
import com.yfd.platform.qgc_env.fh.entity.vo.HabitatVo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhMsstbprptVo;
import com.yfd.platform.qgc_env.fh.entity.vo.FhSdriverdayVo;
@@ -2004,6 +2005,120 @@ public class FhHabitatServiceImpl implements FhHabitatService {
return dataSourceResult;
}
+ @Override
+ public DataSourceResult getFhPoint(DataSourceRequest dataSourceRequest) {
+ DataSourceResult result = new DataSourceResult<>();
+ result.setAggregates(new HashMap<>());
+
+ DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
+ Map paramMap = new HashMap<>();
+ StringBuilder sql = new StringBuilder();
+ sql.append("SELECT ")
+ .append("t.fhstcd AS fhstcd, ")
+ .append("t.stcd AS stcd, ")
+ .append("t.stnm AS stnm, ")
+ .append("eng.ENNM AS ennm, ")
+ .append("t.lgtd AS lgtd, ")
+ .append("t.lttd AS lttd, ")
+ .append("t.baseId AS baseId, ")
+ .append("hb.BASENAME AS baseName, ")
+ .append("t.rvcd AS rvcd, ")
+ .append("rv.RVNM AS rvcdName, ")
+ .append("t.rstcd AS rstcd, ")
+ .append("t.sttpCode AS sttpCode, ")
+ .append("t.dtmel AS dtmel, ")
+ .append("t.dtin AS dtin, ")
+ .append("t.bldsttCcode AS bldsttCcode, ")
+ .append("t.ioType AS ioType ")
+ .append("FROM (")
+ .append("SELECT fh.STCD AS fhstcd, wq.STCD AS stcd, wq.STNM AS stnm, ")
+ .append(" wq.LGTD AS lgtd, wq.LTTD AS lttd, fh.BASE_ID AS baseId, ")
+ .append(" null AS rvcd, wq.RSTCD AS rstcd, ")
+ .append(" 'WQ' AS sttpCode, wq.ELEV AS dtmel, wq.DTIN AS dtin, ")
+ .append(" TO_CHAR(wq.BLDSTT_CODE) AS bldsttCcode, CAST(NULL AS NUMBER) AS ioType ")
+ .append("FROM SD_FHBT_B_H fh ")
+ .append("INNER JOIN SD_WQ_B_H wq ON fh.STCD = wq.FHSTCD ")
+ .append("WHERE NVL(fh.IS_DELETED, 0) = 0 ")
+ .append(" AND NVL(wq.IS_DELETED, 0) = 0 ")
+ .append(" AND fh.BASE_ID <> 'other' ")
+ .append(" AND wq.LGTD IS NOT NULL ")
+ .append("UNION ALL ")
+ .append("SELECT fh.STCD AS fhstcd, wt.STCD AS stcd, wt.STNM AS stnm, ")
+ .append(" wt.LGTD AS lgtd, wt.LTTD AS lttd, fh.BASE_ID AS baseId, ")
+ .append(" NVL(fh.RVCD, engWt.RVCD) AS rvcd, wt.RSTCD AS rstcd, ")
+ .append(" 'WTRV' AS sttpCode, wt.ELEV AS dtmel, wt.DTIN AS dtin, ")
+ .append(" TO_CHAR(wt.BLDSTT_CODE) AS bldsttCcode, ")
+ .append(" CASE WHEN wt.WT_TYPE = 'IWT' THEN 1 ")
+ .append(" WHEN wt.WT_TYPE = 'DWT' THEN 2 ")
+ .append(" ELSE 3 END AS ioType ")
+ .append("FROM SD_FHBT_B_H fh ")
+ .append("INNER JOIN SD_WT_B_H wt ON fh.STCD = wt.FHSTCD ")
+ .append("LEFT JOIN SD_ENGINFO_B_H engWt ON engWt.STCD = wt.RSTCD AND NVL(engWt.IS_DELETED, 0) = 0 ")
+ .append("WHERE NVL(fh.IS_DELETED, 0) = 0 ")
+ .append(" AND NVL(wt.IS_DELETED, 0) = 0 ")
+ .append(" AND fh.BASE_ID <> 'other' ")
+ .append(" AND wt.LGTD IS NOT NULL ")
+ .append(" AND wt.STTP = 'WTRV' ")
+ .append("UNION ALL ")
+ .append("SELECT fh.STCD AS fhstcd, rv.STCD AS stcd, rv.STNM AS stnm, ")
+ .append(" rv.LGTD AS lgtd, rv.LTTD AS lttd, fh.BASE_ID AS baseId, ")
+ .append(" NVL(fh.RVCD, engRv.RVCD) AS rvcd, rv.RSTCD AS rstcd, ")
+ .append(" 'ZQ' AS sttpCode, rv.ELEV AS dtmel, rv.DTIN AS dtin, ")
+ .append(" TO_CHAR(rv.BLDSTT_CODE) AS bldsttCcode, CAST(NULL AS NUMBER) AS ioType ")
+ .append("FROM SD_FHBT_B_H fh ")
+ .append("INNER JOIN SD_RIVER_B_H rv ON fh.STCD = rv.FHSTCD ")
+ .append("LEFT JOIN SD_ENGINFO_B_H engRv ON engRv.STCD = rv.RSTCD AND NVL(engRv.IS_DELETED, 0) = 0 ")
+ .append("WHERE NVL(fh.IS_DELETED, 0) = 0 ")
+ .append(" AND NVL(rv.IS_DELETED, 0) = 0 ")
+ .append(" AND fh.BASE_ID <> 'other' ")
+ .append(" AND rv.LGTD IS NOT NULL ")
+ .append(" AND rv.STTP = 'ZQ' ")
+ .append("UNION ALL ")
+ .append("SELECT fh.STCD AS fhstcd, vd.STCD AS stcd, vd.STNM AS stnm, ")
+ .append(" vd.LGTD AS lgtd, vd.LTTD AS lttd, fh.BASE_ID AS baseId, ")
+ .append(" NVL(vd.RVCD, fh.RVCD) AS rvcd, vd.RSTCD AS rstcd, ")
+ .append(" 'VD' AS sttpCode, vd.ELEV AS dtmel, vd.DTIN AS dtin, ")
+ .append(" TO_CHAR(vd.BLDSTT_CODE) AS bldsttCcode, CAST(NULL AS NUMBER) AS ioType ")
+ .append("FROM SD_FHBT_B_H fh ")
+ .append("INNER JOIN SD_VDINFO_B vd ON fh.STCD = vd.FHSTCD ")
+ .append("WHERE NVL(fh.IS_DELETED, 0) = 0 ")
+ .append(" AND fh.BASE_ID <> 'other' ")
+ .append(" AND vd.LGTD IS NOT NULL ")
+ .append(") t ")
+ .append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = t.rstcd AND NVL(eng.IS_DELETED, 0) = 0 ")
+ .append("LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = t.baseId AND NVL(hb.IS_DELETED, 0) = 0 ")
+ .append("LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = t.rvcd ")
+ .append("WHERE 1 = 1 ");
+
+ String filterSql = QgcQueryWrapperUtil.buildFilterCondition(
+ dataSourceRequest == null ? null : dataSourceRequest.getFilter(),
+ paramMap,
+ new int[]{0},
+ this::mapFhPointColumn
+ );
+ if (StrUtil.isNotBlank(filterSql)) {
+ sql.append("AND ").append(filterSql).append(" ");
+ }
+ sql.append("ORDER BY t.fhstcd, t.sttpCode, t.stcd");
+
+ List list = microservicDynamicSQLMapper.getAllListWithResultType(sql.toString(), paramMap, FhPointVo.class);
+ for (FhPointVo vo : list) {
+ String sttpCode = StrUtil.blankToDefault(vo.getSttpCode(), "");
+ if ("WQ".equalsIgnoreCase(sttpCode)) {
+ vo.setAnchoPointState("FH_WQ");
+ } else if ("WTRV".equalsIgnoreCase(sttpCode)) {
+ vo.setAnchoPointState("FH_WTRV");
+ } else if ("ZQ".equalsIgnoreCase(sttpCode)) {
+ vo.setAnchoPointState("FH_ZQ");
+ } else if ("VD".equalsIgnoreCase(sttpCode)) {
+ vo.setAnchoPointState("FH_VD");
+ }
+ }
+ result.setData(list);
+ result.setTotal((long) list.size());
+ return result;
+ }
+
private String mapWeFvColumn(String field) {
if (StrUtil.isBlank(field)) {
return null;
@@ -2014,4 +2129,27 @@ public class FhHabitatServiceImpl implements FhHabitatService {
default -> null;
};
}
+
+ private String mapFhPointColumn(String field) {
+ if (StrUtil.isBlank(field)) {
+ return null;
+ }
+ return switch (field.toLowerCase()) {
+ case "fhstcd" -> "t.fhstcd";
+ case "stcd" -> "t.stcd";
+ case "stnm" -> "t.stnm";
+ case "ennm" -> "eng.ENNM";
+ case "baseid" -> "t.baseId";
+ case "basename" -> "hb.BASENAME";
+ case "rvcd" -> "t.rvcd";
+ case "rvcdname" -> "rv.RVNM";
+ case "rstcd" -> "t.rstcd";
+ case "sttpcode" -> "t.sttpCode";
+ case "dtin" -> "t.dtin";
+ case "bldsttccode" -> "t.bldsttCcode";
+ case "lgtd" -> "t.lgtd";
+ case "lttd" -> "t.lttd";
+ default -> null;
+ };
+ }
}
From 645b97435c748d6b2ee19c9a214d3d5752e6f7e8 Mon Sep 17 00:00:00 2001
From: tangwei
Date: Tue, 7 Jul 2026 16:15:49 +0800
Subject: [PATCH 26/27] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=80=BB?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/FishDraftDataController.java | 51 ++++++-
.../impl/FishDraftDataServiceImpl.java | 140 ++++++++++++++----
2 files changed, 158 insertions(+), 33 deletions(-)
diff --git a/backend/src/main/java/com/yfd/platform/qgc_data/controller/FishDraftDataController.java b/backend/src/main/java/com/yfd/platform/qgc_data/controller/FishDraftDataController.java
index 4399f5e5..3534edde 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_data/controller/FishDraftDataController.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_data/controller/FishDraftDataController.java
@@ -60,6 +60,8 @@ import java.util.*;
@Slf4j
public class FishDraftDataController {
+ private static final int IN_QUERY_BATCH_SIZE = 900;
+
@Resource
private IFishDraftDataService fishDraftDataService;
@@ -368,11 +370,10 @@ public class FishDraftDataController {
@PostMapping("/batchApproveByApprovalId")
@Operation(summary = "根据审批批次全部审批通过")
public ResponseResult batchApproveByApprovalId(@RequestBody BatchApproveRequest request) {
- if (request.getApprovalIds().isEmpty()) {
+ if (request.getApprovalIds() == null || request.getApprovalIds().isEmpty()) {
return ResponseResult.error("请选择审批批次");
}
- List draft = fishDraftDataService.list(new LambdaQueryWrapper().eq(FishDraftData::getDeletedFlag, 0).in(FishDraftData::getApprovalId, request.getApprovalIds()).eq(FishDraftData::getStatus, "PENDING").select(FishDraftData::getId));
- List ids = draft.stream().map(FishDraftData::getId).toList();
+ List ids = listDraftIdsByApprovalIdsAndStatus(request.getApprovalIds(), "PENDING");
boolean result = fishDraftDataService.batchApprove(ids, request.getApproveComment());
return result ? ResponseResult.success("审批通过") : ResponseResult.error("审批失败");
}
@@ -388,8 +389,7 @@ public class FishDraftDataController {
@Operation(summary = "批量驳回")
public ResponseResult batchRejectFull(@RequestBody BatchRejectRequest request) {
if (request.getApprovalIds() != null && !request.getApprovalIds().isEmpty()) {
- List draft = fishDraftDataService.list(new LambdaQueryWrapper().eq(FishDraftData::getDeletedFlag, 0).in(FishDraftData::getApprovalId, request.getApprovalIds()).eq(FishDraftData::getStatus, "PENDING").select(FishDraftData::getId));
- List ids = draft.stream().map(FishDraftData::getId).toList();
+ List ids = listDraftIdsByApprovalIdsAndStatus(request.getApprovalIds(), "PENDING");
boolean result = fishDraftDataService.rejectBatch(ids, request.getRejectReason());
return result ? ResponseResult.success("驳回成功") : ResponseResult.error("驳回失败");
}
@@ -429,6 +429,47 @@ public class FishDraftDataController {
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
}
+ private List listDraftIdsByApprovalIdsAndStatus(List approvalIds, String status) {
+ List normalizedApprovalIds = normalizeBatchValues(approvalIds);
+ if (normalizedApprovalIds.isEmpty()) {
+ return Collections.emptyList();
+ }
+ List ids = new ArrayList<>();
+ for (List batchApprovalIds : splitList(normalizedApprovalIds, IN_QUERY_BATCH_SIZE)) {
+ List draft = fishDraftDataService.list(new LambdaQueryWrapper()
+ .eq(FishDraftData::getDeletedFlag, 0)
+ .in(FishDraftData::getApprovalId, batchApprovalIds)
+ .eq(FishDraftData::getStatus, status)
+ .select(FishDraftData::getId));
+ ids.addAll(draft.stream().map(FishDraftData::getId).filter(StrUtil::isNotBlank).toList());
+ }
+ return ids;
+ }
+
+ private List normalizeBatchValues(List values) {
+ if (values == null || values.isEmpty()) {
+ return Collections.emptyList();
+ }
+ LinkedHashSet normalized = new LinkedHashSet<>();
+ for (String value : values) {
+ if (StrUtil.isNotBlank(value)) {
+ normalized.add(value.trim());
+ }
+ }
+ return new ArrayList<>(normalized);
+ }
+
+ private List> splitList(List source, int batchSize) {
+ if (source == null || source.isEmpty()) {
+ return Collections.emptyList();
+ }
+ List> result = new ArrayList<>();
+ for (int i = 0; i < source.size(); i += batchSize) {
+ result.add(source.subList(i, Math.min(source.size(), i + batchSize)));
+ }
+ return result;
+ }
+
@PostMapping("/delete")
@Operation(summary = "删除过鱼数据")
public ResponseResult delete(@RequestParam String id) {
diff --git a/backend/src/main/java/com/yfd/platform/qgc_data/service/impl/FishDraftDataServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_data/service/impl/FishDraftDataServiceImpl.java
index 5a150f58..92fdd607 100644
--- a/backend/src/main/java/com/yfd/platform/qgc_data/service/impl/FishDraftDataServiceImpl.java
+++ b/backend/src/main/java/com/yfd/platform/qgc_data/service/impl/FishDraftDataServiceImpl.java
@@ -2,7 +2,6 @@ package com.yfd.platform.qgc_data.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yfd.platform.common.DataSourceLoadOptionsBase;
@@ -48,6 +47,8 @@ import java.util.*;
@Slf4j
public class FishDraftDataServiceImpl extends ServiceImpl implements IFishDraftDataService {
+ private static final int IN_QUERY_BATCH_SIZE = 200;
+
@Resource
private FishDraftDataMapper fishDraftDataMapper;
@@ -254,16 +255,15 @@ public class FishDraftDataServiceImpl extends ServiceImpl ids) {
- long count = this.count(new LambdaQueryWrapper().in(FishDraftData::getId, ids).eq(FishDraftData::getLockFlag, 1));
+ long count = countByIdsAndLockFlag(ids, 1);
if(count > 0){
return false;
}
- LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>();
- updateWrapper.in(FishDraftData::getId, ids);
- updateWrapper.set(FishDraftData::getDeletedFlag, 1);
String userId = SecurityUtils.getUserId();
- updateWrapper.set(FishDraftData::getDeletedBy,userId );
- return this.update(updateWrapper);
+ return updateByIdsInBatches(ids, entity -> {
+ entity.setDeletedFlag(1);
+ entity.setDeletedBy(userId);
+ });
}
@Override
@@ -313,13 +313,13 @@ public class FishDraftDataServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper<>();
- updateWrapper.in(FishDraftData::getId, ids);
- updateWrapper.eq(FishDraftData::getLockFlag, 0);
- updateWrapper.set(FishDraftData::getApprovalId, approvalMain.getId());
- updateWrapper.set(FishDraftData::getStatus, "PENDING");
- updateWrapper.set(FishDraftData::getSubmitTime, new Date());
- this.update(updateWrapper);
+ List unlockedIds = listIdsByLockFlag(ids, 0);
+ Date submitTime = new Date();
+ updateByIdsInBatches(unlockedIds, entity -> {
+ entity.setApprovalId(approvalMain.getId());
+ entity.setStatus("PENDING");
+ entity.setSubmitTime(submitTime);
+ });
approvalLogService.logSubmit(approvalMain.getId(), operatorId, "批量提交草稿,共" + ids.size() + "条");
@@ -421,7 +421,7 @@ public class FishDraftDataServiceImpl extends ServiceImpl dataList = this.listByIds(ids);
+ List dataList = listByIdsInBatches(ids);
Set processedApprovalIds = new HashSet<>();
List validIds = new ArrayList<>();
List fpssRList = new ArrayList<>();
@@ -438,12 +438,11 @@ public class FishDraftDataServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper<>();
- updateWrapper.in(FishDraftData::getId, validIds);
- updateWrapper.set(FishDraftData::getStatus, "APPROVED");
- updateWrapper.set(FishDraftData::getApproveTime, now);
- updateWrapper.set(FishDraftData::getUpdatedBy, operatorId);
- this.update(updateWrapper);
+ updateByIdsInBatches(validIds, entity -> {
+ entity.setStatus("APPROVED");
+ entity.setApproveTime(now);
+ entity.setUpdatedBy(operatorId);
+ });
boolean b = sdFpssRService.saveOrUpdateBatch(fpssRList);
log.info("=======================插入数据条数======================="+fpssRList.size());
for (String approvalId : processedApprovalIds) {
@@ -548,7 +547,7 @@ public class FishDraftDataServiceImpl extends ServiceImpl dataList = this.listByIds(ids);
+ List dataList = listByIdsInBatches(ids);
Set processedApprovalIds = new HashSet<>();
List