From 0ea686d3cb48d7784090a07975a7eb983e3d7819 Mon Sep 17 00:00:00 2001
From: yexb <553699424@qq.com>
Date: Thu, 25 Jun 2026 07:59:08 +0800
Subject: [PATCH] =?UTF-8?q?feat(icd):=20=E5=AE=9E=E7=8E=B0=E6=A0=87?=
=?UTF-8?q?=E5=87=86ICD=E6=96=B0=E5=A2=9E=E6=97=B6=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=87=AA=E8=BA=AB=E4=B8=BA=E5=8F=82=E7=85=A7?=
=?UTF-8?q?=E6=BA=90=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在添加标准ICD路径时自动填充referenceIcdId字段为自身ID
- 添加fillSelfReferenceForStandardIcd方法处理标准类型ICD的自参照逻辑
- 增加isStandardType方法判断ICD类型是否为标准类型
- 添加单元测试验证手动录入标准ICD和上游解析标准ICD的自参照功能
- 修改应用配置文件中的文件存储路径
- 新增ai-report模块及其子模块的Maven配置
- 移除数据校验服务中已废弃的单个监测点ID字段,统一使用监测点ID列表
- 更新相关实体类、参数类和返回类的数据结构定义
- 修正测试代码中的字段引用和字符编码问题
---
ai-report/client-unit/pom.xml | 34 +++++++++++++
.../aireport/clientunit/controller/.gitkeep | 1 +
.../aireport/clientunit/mapper/.gitkeep | 1 +
.../aireport/clientunit/pojo/param/.gitkeep | 1 +
.../aireport/clientunit/pojo/po/.gitkeep | 1 +
.../aireport/clientunit/pojo/vo/.gitkeep | 1 +
.../aireport/clientunit/service/.gitkeep | 1 +
.../aireport/clientunit/service/impl/.gitkeep | 1 +
ai-report/pom.xml | 25 ++++++++++
ai-report/report-model/pom.xml | 34 +++++++++++++
.../aireport/reportmodel/controller/.gitkeep | 1 +
.../aireport/reportmodel/mapper/.gitkeep | 1 +
.../aireport/reportmodel/pojo/param/.gitkeep | 1 +
.../aireport/reportmodel/pojo/po/.gitkeep | 1 +
.../aireport/reportmodel/pojo/vo/.gitkeep | 1 +
.../aireport/reportmodel/service/.gitkeep | 1 +
.../reportmodel/service/impl/.gitkeep | 1 +
ai-report/test-device/pom.xml | 34 +++++++++++++
.../aireport/testdevice/controller/.gitkeep | 1 +
.../aireport/testdevice/mapper/.gitkeep | 1 +
.../aireport/testdevice/pojo/param/.gitkeep | 1 +
.../aireport/testdevice/pojo/po/.gitkeep | 1 +
.../aireport/testdevice/pojo/vo/.gitkeep | 1 +
.../aireport/testdevice/service/.gitkeep | 1 +
.../aireport/testdevice/service/impl/.gitkeep | 1 +
ai-report/test-report/pom.xml | 34 +++++++++++++
.../aireport/testreport/controller/.gitkeep | 1 +
.../aireport/testreport/mapper/.gitkeep | 1 +
.../aireport/testreport/pojo/param/.gitkeep | 1 +
.../aireport/testreport/pojo/po/.gitkeep | 1 +
.../aireport/testreport/pojo/vo/.gitkeep | 1 +
.../aireport/testreport/service/.gitkeep | 1 +
.../aireport/testreport/service/impl/.gitkeep | 1 +
entrance/src/main/resources/application.yml | 2 +-
pom.xml | 1 +
.../param/SteadyChecksquareQueryParam.java | 3 --
.../pojo/vo/SteadyChecksquareQueryVO.java | 3 --
.../pojo/vo/SteadyChecksquareTaskVO.java | 3 --
.../impl/SteadyChecksquareServiceImpl.java | 21 ++------
.../SteadyChecksquareControllerTest.java | 2 +
.../SteadyChecksquareQueryParamTest.java | 3 +-
.../SteadyChecksquareServiceImplTest.java | 50 +++++++++----------
.../service/impl/CsIcdPathServiceImpl.java | 16 ++++++
.../impl/CsIcdPathServiceImplTest.java | 30 +++++++++++
44 files changed, 270 insertions(+), 53 deletions(-)
create mode 100644 ai-report/client-unit/pom.xml
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/controller/.gitkeep
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/mapper/.gitkeep
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/param/.gitkeep
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/po/.gitkeep
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/vo/.gitkeep
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/.gitkeep
create mode 100644 ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/impl/.gitkeep
create mode 100644 ai-report/pom.xml
create mode 100644 ai-report/report-model/pom.xml
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/controller/.gitkeep
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/mapper/.gitkeep
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/param/.gitkeep
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/po/.gitkeep
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/vo/.gitkeep
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/.gitkeep
create mode 100644 ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/impl/.gitkeep
create mode 100644 ai-report/test-device/pom.xml
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/controller/.gitkeep
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/mapper/.gitkeep
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/param/.gitkeep
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/po/.gitkeep
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/vo/.gitkeep
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/.gitkeep
create mode 100644 ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/impl/.gitkeep
create mode 100644 ai-report/test-report/pom.xml
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/controller/.gitkeep
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/mapper/.gitkeep
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/param/.gitkeep
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/po/.gitkeep
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/vo/.gitkeep
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/.gitkeep
create mode 100644 ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/impl/.gitkeep
diff --git a/ai-report/client-unit/pom.xml b/ai-report/client-unit/pom.xml
new file mode 100644
index 0000000..1cb9a1e
--- /dev/null
+++ b/ai-report/client-unit/pom.xml
@@ -0,0 +1,34 @@
+
+
+ 4.0.0
+
+
+ com.njcn.gather
+ ai-report
+ 1.0.0
+
+
+ client-unit
+
+
+
+ com.njcn
+ njcn-common
+ 0.0.1
+
+
+
+ com.njcn
+ mybatis-plus
+ 0.0.1
+
+
+
+ com.njcn
+ spingboot2.3.12
+ 2.3.12
+
+
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/controller/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/controller/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/controller/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/mapper/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/mapper/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/mapper/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/param/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/param/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/param/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/po/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/po/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/po/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/vo/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/vo/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/pojo/vo/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/impl/.gitkeep b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/impl/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/client-unit/src/main/java/com/njcn/gather/aireport/clientunit/service/impl/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/pom.xml b/ai-report/pom.xml
new file mode 100644
index 0000000..44c49b0
--- /dev/null
+++ b/ai-report/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+
+ com.njcn.gather
+ CN_Tool
+ 1.0.0
+
+
+ ai-report
+ pom
+ ai-report
+ AI report capability aggregator.
+
+
+ report-model
+ client-unit
+ test-device
+ test-report
+
+
+
diff --git a/ai-report/report-model/pom.xml b/ai-report/report-model/pom.xml
new file mode 100644
index 0000000..4da2f27
--- /dev/null
+++ b/ai-report/report-model/pom.xml
@@ -0,0 +1,34 @@
+
+
+ 4.0.0
+
+
+ com.njcn.gather
+ ai-report
+ 1.0.0
+
+
+ report-model
+
+
+
+ com.njcn
+ njcn-common
+ 0.0.1
+
+
+
+ com.njcn
+ mybatis-plus
+ 0.0.1
+
+
+
+ com.njcn
+ spingboot2.3.12
+ 2.3.12
+
+
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/controller/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/controller/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/controller/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/mapper/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/mapper/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/mapper/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/param/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/param/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/param/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/po/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/po/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/po/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/vo/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/vo/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/pojo/vo/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/impl/.gitkeep b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/impl/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/report-model/src/main/java/com/njcn/gather/aireport/reportmodel/service/impl/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/pom.xml b/ai-report/test-device/pom.xml
new file mode 100644
index 0000000..1d2d4ed
--- /dev/null
+++ b/ai-report/test-device/pom.xml
@@ -0,0 +1,34 @@
+
+
+ 4.0.0
+
+
+ com.njcn.gather
+ ai-report
+ 1.0.0
+
+
+ test-device
+
+
+
+ com.njcn
+ njcn-common
+ 0.0.1
+
+
+
+ com.njcn
+ mybatis-plus
+ 0.0.1
+
+
+
+ com.njcn
+ spingboot2.3.12
+ 2.3.12
+
+
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/controller/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/controller/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/controller/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/mapper/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/mapper/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/mapper/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/param/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/param/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/param/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/po/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/po/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/po/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/vo/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/vo/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/pojo/vo/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/impl/.gitkeep b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/impl/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-device/src/main/java/com/njcn/gather/aireport/testdevice/service/impl/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/pom.xml b/ai-report/test-report/pom.xml
new file mode 100644
index 0000000..95a21da
--- /dev/null
+++ b/ai-report/test-report/pom.xml
@@ -0,0 +1,34 @@
+
+
+ 4.0.0
+
+
+ com.njcn.gather
+ ai-report
+ 1.0.0
+
+
+ test-report
+
+
+
+ com.njcn
+ njcn-common
+ 0.0.1
+
+
+
+ com.njcn
+ mybatis-plus
+ 0.0.1
+
+
+
+ com.njcn
+ spingboot2.3.12
+ 2.3.12
+
+
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/controller/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/controller/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/controller/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/mapper/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/mapper/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/mapper/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/param/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/param/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/param/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/po/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/po/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/po/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/vo/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/vo/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/pojo/vo/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/impl/.gitkeep b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/impl/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/ai-report/test-report/src/main/java/com/njcn/gather/aireport/testreport/service/impl/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/entrance/src/main/resources/application.yml b/entrance/src/main/resources/application.yml
index 6cf55cb..562ec42 100644
--- a/entrance/src/main/resources/application.yml
+++ b/entrance/src/main/resources/application.yml
@@ -64,7 +64,7 @@ log:
parse-pqdif:
storage:
- path: D:\pqdif-files
+ path: D:\file\pqdif-files
activate:
private-key: "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCcUyYhVqczGxblL+o/xZzF/8nf+LjrfUE/dS1aRHM7uMDD0cgCArhjtfneFePrMxt+Z7W8yNBzSarub8qsfhaVNikV7Es7oaeTygfjQXTi2n4AFkir3fM07J08RpWhl5M8f8uWTCuvFUYAw00gq55typqmnbkmJa2VIUy/iQf+cMCP7abz4/jNhUzUR3qA7TV4oMRgTdIEDUp63YF8dOC+JH8XxYrCVeHXV6fLCwmesdMzl0lB2VTEKMfLbXhOmF5g7P9y/16VCcN8UBuZlbyYfn+GAxJOSbeHi5HshOKfoSuD7Jz+3WQZpNavOWjIFExKIU38/CvnJCOP7XBCqpSTAgMBAAECggEAYeWokWRE3TpvwiOZnUpR/aVMdVi75a3ROL5XIpqPV61B+t/bU3cEpl0GF9C5pUeiRi0IoStZb3mI9D1KPW/REKyUWkhabQO1gFYbTnRlkNOn6MILzKX4cwJjDaZeeo4EBPU7N+qHyOOXrU6hdH5FfxhMdV983ajm5eeuupxER1C2kAcIklTeVpTX6EKOgZb5LBp5ssOVm2P42pOauvcRozRcvZmqnErXmukv0H4l3EVNt4rHpTn9riHUC63e8JfiYzVaF6zuNUxv6nHEft0/SRMw11XSTnNfDzcKqgjz6ksFBS/6eQQYKESk+ONC53HUuYHFAknkwsPupDCT2W8FIQKBgQDLHT/xCU3nxGr4vFKBDNaO2D5oK20ECbBO4oDvLWWmQG7f+6TsMy8PgVdMnoL4RfqGlwFAKEpS6KVFHnBVqnNEhcdy9uCI7x7Xx8UnyUtxj1EDTm76uta9Ki9OrlqB6tImDM9+Ya3vGktW37ht4WOx2OsJRhG1dbf6RLwFlH7DWwKBgQDFBxvi5I1BR6hg6Tj7xd2SqOT2Y+BED3xuSYENhWbmMhLJDResaB7mjztbxlYaY2mOE0holWm2uDmVFFhMh4jYXik4hYH8nmDzq9mDpZCZ9pyjYqnAP8THoAa8EbgrUWB8A6BPH4iL3KbMnBfBKY0pIr2xrvnjQjNBAgta7KDRKQKBgCe6oe4wxrdF2TKsC2tIqpMoQxS3Icy/ZGgZr+SYuaBKTCWtoDW/UT40K3JGMxIDBhzbXphBCUCsVt9tM8Xd4EwP6tJW7dZ7B0pnve2pVwNwaAVAiz6p2yUHIle+jN+Koe5lZRSwYIg7WW81tWpwwsJfzqFyvjYDP6hJV4mz4ROvAoGAaRcdnKvjXApomShMqJ4lTPChD3q+SA8qg3jZSOj6tZXHx00gb2kp8jg7pPvpOTIFPy6x1Ha9aCRjMk0ju84fA6lVuzwa1S907wOehUVuF3Eeo1cgy9Y3k3KbpPyeixxgpkUY4JslLdSHc2NemD0dee951qhJyRmqVOZOQDUuoeECgYEAqBw2cAFk3vM97WY06TSldGA8ajVHx3BYRjj+zl62NTQthy8fw3tqxb3c5e8toOmZWKjZvDhg2TRLhsDDQWEYg3LZG87REqVIjgEPcpjNLidjygGX8n3JF2o0O5I/EMvl0s/+LVQONfduOBvhwDqr8QNisbLsyneiAq7umewMolo="
diff --git a/pom.xml b/pom.xml
index 3da870e..81d9b9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,6 +19,7 @@
tools
event
steady
+ ai-report
diff --git a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParam.java b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParam.java
index 7fc6b4e..3f1afaa 100644
--- a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParam.java
+++ b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParam.java
@@ -16,9 +16,6 @@ public class SteadyChecksquareQueryParam implements Serializable {
private static final long serialVersionUID = 1L;
- @ApiModelProperty("监测点 ID")
- private String lineId;
-
@ApiModelProperty("监测点 ID 列表")
private List lineIds;
diff --git a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareQueryVO.java b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareQueryVO.java
index b325863..45539b6 100644
--- a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareQueryVO.java
+++ b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareQueryVO.java
@@ -23,9 +23,6 @@ public class SteadyChecksquareQueryVO implements Serializable {
@ApiModelProperty("任务编号")
private String taskNo;
- @ApiModelProperty("监测点 ID")
- private String lineId;
-
@ApiModelProperty("监测点 ID 列表")
private List lineIds = new ArrayList();
diff --git a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareTaskVO.java b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareTaskVO.java
index 8506d95..c4b4f74 100644
--- a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareTaskVO.java
+++ b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/pojo/vo/SteadyChecksquareTaskVO.java
@@ -23,9 +23,6 @@ public class SteadyChecksquareTaskVO implements Serializable {
@ApiModelProperty("任务编号")
private String taskNo;
- @ApiModelProperty("监测点 ID")
- private String lineId;
-
@ApiModelProperty("监测点 ID 列表")
private List lineIds;
diff --git a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImpl.java b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImpl.java
index 9dd1b8d..d6e559c 100644
--- a/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImpl.java
+++ b/steady/check-square/src/main/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImpl.java
@@ -195,7 +195,6 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
result.setTaskId(task.getId());
result.setTaskNo(task.getTaskNo());
- result.setLineId(task.getLineId());
result.setLineIds(readTaskLineIds(task));
result.setLineName(task.getLineName());
result.setTimeStart(formatTime(task.getTimeStart()));
@@ -328,7 +327,6 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
indicatorCodes = parseTextListSearchValue(task.getIndicatorCodesText());
}
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId(lineIds.isEmpty() ? task.getLineId() : lineIds.get(0));
param.setLineIds(lineIds);
param.setIndicatorCodes(indicatorCodes);
param.setTimeStart(formatTime(task.getTimeStart()));
@@ -392,7 +390,6 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
Map linePathMap = requireLinePaths(lineIds);
int intervalMinutes = resolveIntervalMinutes(linePathMap.get(lineIds.get(0)));
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
- result.setLineId(lineIds.get(0));
result.setLineIds(new ArrayList(lineIds));
result.setLineName(buildLineNames(lineIds, linePathMap));
result.setTimeStart(param.getTimeStart());
@@ -506,9 +503,9 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
if (trimToNull(taskId) == null) {
task.setTaskNo(SteadyChecksquareIdUtil.taskNo());
}
- task.setLineId(result.getLineId());
- task.setLineName(result.getLineName());
List lineIds = resolveResultLineIds(result);
+ task.setLineId(lineIds.isEmpty() ? null : lineIds.get(0));
+ task.setLineName(result.getLineName());
task.setLineIdsJson(writeJson(lineIds));
task.setLineIdsText(buildTextListSearchValue(lineIds));
task.setTimeStart(parseRequiredTime(result.getTimeStart(), "开始时间不能为空"));
@@ -1202,7 +1199,6 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
SteadyChecksquareTaskVO vo = new SteadyChecksquareTaskVO();
vo.setTaskId(task.getId());
vo.setTaskNo(task.getTaskNo());
- vo.setLineId(task.getLineId());
vo.setLineIds(readTaskLineIds(task));
vo.setLineName(task.getLineName());
vo.setTimeStart(formatTime(task.getTimeStart()));
@@ -1431,11 +1427,7 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
}
private List resolveLineIds(SteadyChecksquareQueryParam param) {
- List lineIds = normalizeTextList(param == null ? null : param.getLineIds());
- if (lineIds.isEmpty() && param != null && trimToNull(param.getLineId()) != null) {
- lineIds.add(trimToNull(param.getLineId()));
- }
- return lineIds;
+ return normalizeTextList(param == null ? null : param.getLineIds());
}
private List resolveIndicatorCodes(SteadyChecksquareQueryParam param) {
@@ -1451,11 +1443,7 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
}
private List resolveResultLineIds(SteadyChecksquareQueryVO result) {
- List lineIds = normalizeTextList(result == null ? null : result.getLineIds());
- if (lineIds.isEmpty() && result != null && trimToNull(result.getLineId()) != null) {
- lineIds.add(trimToNull(result.getLineId()));
- }
- return lineIds;
+ return normalizeTextList(result == null ? null : result.getLineIds());
}
private List readTaskLineIds(SteadyChecksquareTaskPO task) {
@@ -1469,7 +1457,6 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
private SteadyChecksquareQueryParam copyCreateParam(SteadyChecksquareQueryParam param, List indicatorCodes) {
SteadyChecksquareQueryParam result = new SteadyChecksquareQueryParam();
List lineIds = resolveLineIds(param);
- result.setLineId(lineIds.isEmpty() ? null : lineIds.get(0));
result.setLineIds(new ArrayList(lineIds));
result.setIndicatorCodes(new ArrayList(indicatorCodes));
result.setTimeStart(param.getTimeStart());
diff --git a/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/controller/SteadyChecksquareControllerTest.java b/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/controller/SteadyChecksquareControllerTest.java
index 26b7041..6d4afd3 100644
--- a/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/controller/SteadyChecksquareControllerTest.java
+++ b/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/controller/SteadyChecksquareControllerTest.java
@@ -56,5 +56,7 @@ class SteadyChecksquareControllerTest {
resultType.getActualTypeArguments()[0]);
Assertions.assertThrows(NoSuchFieldException.class,
() -> com.njcn.gather.steady.checksquare.pojo.vo.SteadyChecksquareTaskVO.class.getDeclaredField("items"));
+ Assertions.assertThrows(NoSuchFieldException.class,
+ () -> com.njcn.gather.steady.checksquare.pojo.vo.SteadyChecksquareTaskVO.class.getDeclaredField("lineId"));
}
}
diff --git a/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParamTest.java b/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParamTest.java
index eae9492..a45254a 100644
--- a/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParamTest.java
+++ b/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/pojo/param/SteadyChecksquareQueryParamTest.java
@@ -12,7 +12,8 @@ class SteadyChecksquareQueryParamTest {
@Test
void shouldOnlyExposeChecksquareQueryFields() {
- Assertions.assertNotNull(field("lineId"));
+ Assertions.assertNull(field("lineId"));
+ Assertions.assertNotNull(field("lineIds"));
Assertions.assertNotNull(field("indicatorCodes"));
Assertions.assertNotNull(field("timeStart"));
Assertions.assertNotNull(field("timeEnd"));
diff --git a/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImplTest.java b/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImplTest.java
index bf5990b..7359cf9 100644
--- a/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImplTest.java
+++ b/steady/check-square/src/test/java/com/njcn/gather/steady/checksquare/service/impl/SteadyChecksquareServiceImplTest.java
@@ -61,7 +61,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
/**
- * 鏁版嵁鏍¢獙鏈嶅姟娴嬭瘯銆? */
+ * 鏁版嵁鏍¢獙鏈嶅姟娴嬭瘯�? */
class SteadyChecksquareServiceImplTest {
@BeforeAll
@@ -102,7 +102,7 @@ class SteadyChecksquareServiceImplTest {
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-08 00:01:00");
@@ -147,7 +147,7 @@ class SteadyChecksquareServiceImplTest {
ArgumentCaptor taskCaptor = ArgumentCaptor.forClass(SteadyChecksquareTaskPO.class);
when(taskService.save(taskCaptor.capture())).thenReturn(true);
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Arrays.asList("V_RMS", "V_LINE_RMS", "FREQ", "I_RMS", "I_THD"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-03 23:59:00");
@@ -190,7 +190,7 @@ class SteadyChecksquareServiceImplTest {
mock(SteadyChecksquareItemService.class), mock(SteadyChecksquareStatSummaryService.class),
mock(SteadyChecksquareDetailService.class), new ObjectMapper());
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("I_RMS"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -238,7 +238,7 @@ class SteadyChecksquareServiceImplTest {
ArgumentCaptor taskCaptor = ArgumentCaptor.forClass(SteadyChecksquareTaskPO.class);
when(taskService.save(taskCaptor.capture())).thenReturn(true);
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -326,7 +326,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
- linePath.setLineName("杩涚嚎涓€");
+ linePath.setLineName("杩涚嚎涓�?);
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -339,7 +339,7 @@ class SteadyChecksquareServiceImplTest {
LocalDateTime.of(2026, 5, 1, 0, 0))));
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Arrays.asList("FLUC", "PST", "PLT"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 02:00:00");
@@ -379,7 +379,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(new HashSet());
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.emptyList());
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -414,7 +414,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
- linePath.setLineName("杩涚嚎涓€");
+ linePath.setLineName("杩涚嚎涓�?);
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -423,7 +423,7 @@ class SteadyChecksquareServiceImplTest {
LocalDateTime.of(2026, 5, 1, 0, 0))));
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("V_HARMONIC"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -453,7 +453,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
- linePath.setLineName("杩涚嚎涓€");
+ linePath.setLineName("杩涚嚎涓�?);
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -477,7 +477,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(normalRuleResult);
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("V_HARMONIC"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -507,7 +507,7 @@ class SteadyChecksquareServiceImplTest {
mock(SteadyChecksquareDetailService.class), new ObjectMapper());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
- linePath.setLineName("杩涚嚎涓€");
+ linePath.setLineName("杩涚嚎涓�?);
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -525,7 +525,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(ruleResult);
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -556,7 +556,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
- linePath.setLineName("杩涚嚎涓€");
+ linePath.setLineName("杩涚嚎涓�?);
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -565,7 +565,7 @@ class SteadyChecksquareServiceImplTest {
LocalDateTime.of(2026, 5, 1, 0, 0))));
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Arrays.asList("V_RMS", "V_LINE_RMS"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -603,7 +603,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
- linePath.setLineName("杩涚嚎涓€");
+ linePath.setLineName("杩涚嚎涓�?);
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -623,7 +623,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(ruleResult);
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
- param.setLineId("line-001");
+ param.setLineIds(Collections.singletonList("line-001"));
param.setIndicatorCodes(Collections.singletonList("V_HARMONIC"));
param.setTimeStart("2026-05-01 00:00:00");
param.setTimeEnd("2026-05-01 00:01:00");
@@ -665,7 +665,7 @@ class SteadyChecksquareServiceImplTest {
task.setId("task-001");
task.setState(1);
task.setLineId("line-001");
- task.setLineName("杩涚嚎涓€");
+ task.setLineName("杩涚嚎涓�?);
task.setTimeStart(LocalDateTime.of(2026, 5, 1, 0, 0));
task.setTimeEnd(LocalDateTime.of(2026, 5, 1, 0, 1));
task.setIntervalMinutes(1);
@@ -850,8 +850,8 @@ class SteadyChecksquareServiceImplTest {
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
- result.setLineId("line-001");
- result.setLineName("杩涚嚎涓€");
+ result.setLineIds(Collections.singletonList("line-001"));
+ result.setLineName("杩涚嚎涓�?);
result.setTimeStart("2026-05-01 00:00:00");
result.setTimeEnd("2026-05-01 00:01:00");
result.setIntervalMinutes(1);
@@ -860,7 +860,7 @@ class SteadyChecksquareServiceImplTest {
item.setLineId("line-001");
item.setLineName("line-001-name");
item.setIndicatorCode("V_RMS");
- item.setIndicatorName("鐩哥數鍘嬫湁鏁堝€?");
+ item.setIndicatorName("鐩哥數鍘嬫湁鏁堝�?");
item.setIntervalMinutes(1);
item.setHasData(true);
item.setExpectedPointCount(2);
@@ -909,7 +909,7 @@ class SteadyChecksquareServiceImplTest {
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
- result.setLineId("line-001");
+ result.setLineIds(Collections.singletonList("line-001"));
result.setLineName("line-001");
result.setTimeStart("2026-05-01 00:00:00");
result.setTimeEnd("2026-05-01 00:01:00");
@@ -942,8 +942,8 @@ class SteadyChecksquareServiceImplTest {
SteadyChecksquareQueryParam param = new SteadyChecksquareQueryParam();
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
- result.setLineId("line-001");
- result.setLineName("杩涚嚎涓€");
+ result.setLineIds(Collections.singletonList("line-001"));
+ result.setLineName("杩涚嚎涓�?);
result.setTimeStart("2026-05-01 00:00:00");
result.setTimeEnd("2026-05-01 00:01:00");
result.setIntervalMinutes(1);
diff --git a/tools/mms-mapping/src/main/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImpl.java b/tools/mms-mapping/src/main/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImpl.java
index d012638..fd3badd 100644
--- a/tools/mms-mapping/src/main/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImpl.java
+++ b/tools/mms-mapping/src/main/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImpl.java
@@ -86,6 +86,7 @@ public class CsIcdPathServiceImpl implements CsIcdPathService {
LocalDateTime now = LocalDateTime.now();
CsIcdPathPO icdPath = buildIcdPath(checkedParam, true);
icdPath.setId(UUID.randomUUID().toString().replace("-", ""));
+ fillSelfReferenceForStandardIcd(icdPath);
icdPath.setState(STATE_NORMAL);
icdPath.setCreateBy(currentUserId());
icdPath.setCreateTime(now);
@@ -200,6 +201,21 @@ public class CsIcdPathServiceImpl implements CsIcdPathService {
return type == null ? ICD_TYPE_MANUAL_NON_STANDARD : type;
}
+ /**
+ * 标准 ICD 新增时如果未传参照 ICD,则默认以自身作为参照来源。
+ */
+ private void fillSelfReferenceForStandardIcd(CsIcdPathPO icdPath) {
+ if (icdPath == null || !isStandardType(icdPath.getType()) || !isBlank(icdPath.getReferenceIcdId())) {
+ return;
+ }
+ icdPath.setReferenceIcdId(icdPath.getId());
+ }
+
+ private boolean isStandardType(Integer type) {
+ return Integer.valueOf(ICD_TYPE_MANUAL_STANDARD).equals(type)
+ || Integer.valueOf(ICD_TYPE_UPSTREAM_STANDARD).equals(type);
+ }
+
/**
* 激活标准 ICD 时保留记录来源:手动录入升为 1,上游解析传递升为 3。
*/
diff --git a/tools/mms-mapping/src/test/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImplTest.java b/tools/mms-mapping/src/test/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImplTest.java
index bb45920..c4a7ccd 100644
--- a/tools/mms-mapping/src/test/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImplTest.java
+++ b/tools/mms-mapping/src/test/java/com/njcn/gather/icd/mapping/service/impl/CsIcdPathServiceImplTest.java
@@ -128,6 +128,36 @@ class CsIcdPathServiceImplTest {
Assertions.assertEquals(2, captor.getValue().getType());
}
+ @Test
+ void addManualStandardIcdPathShouldDefaultReferenceIcdIdToSelf() {
+ CsIcdPathParam param = buildParam("标准ICD");
+ param.setType(1);
+ param.setReferenceIcdId(null);
+ when(csIcdPathMapper.insert(any(CsIcdPathPO.class))).thenReturn(1);
+
+ boolean result = service.addIcdPath(param);
+
+ ArgumentCaptor captor = ArgumentCaptor.forClass(CsIcdPathPO.class);
+ verify(csIcdPathMapper).insert(captor.capture());
+ Assertions.assertTrue(result);
+ Assertions.assertEquals(captor.getValue().getId(), captor.getValue().getReferenceIcdId());
+ }
+
+ @Test
+ void addUpstreamStandardIcdPathShouldDefaultReferenceIcdIdToSelf() {
+ CsIcdPathParam param = buildParam("上游标准ICD");
+ param.setType(3);
+ param.setReferenceIcdId(" ");
+ when(csIcdPathMapper.insert(any(CsIcdPathPO.class))).thenReturn(1);
+
+ boolean result = service.addIcdPath(param);
+
+ ArgumentCaptor captor = ArgumentCaptor.forClass(CsIcdPathPO.class);
+ verify(csIcdPathMapper).insert(captor.capture());
+ Assertions.assertTrue(result);
+ Assertions.assertEquals(captor.getValue().getId(), captor.getValue().getReferenceIcdId());
+ }
+
@Test
void updateIcdPathShouldRejectDeletedRecord() {
CsIcdPathParam.UpdateParam param = new CsIcdPathParam.UpdateParam();