新增 MCP 工具 district.paper.statistics.query(客户用纸统计)并引入 ES 7.17 客户端

- 复刻老 MonthlyStatisticsController.getMonthlyStatisticsMap:m0 monthly_statistics 按 gender/按日聚合(用纸长度米、人次、台日),district_strategy.rfid_use_flag 分口径统计 ES paperuselog 换纸卷数
- ES 双集群(云/本地,Dictionary.LocalEsDate 分界)+ 冷热索引(90 天),terms 聚合统计 rfid 去重数替代老 scroll 拉全量
- 引入 co.elastic.clients:elasticsearch-java 7.17.29(显式钉版本,覆盖 Boot BOM 8.x),EsClientConfig 双集群客户端
- 字典缺失/ES 异常 fail fast 抛 IllegalStateException(老系统静默为 0);district_strategy 缺失按未使用 rfid 口径(老系统 NPE)
- 新增单测 16 个(工具 13 + planner 3),全套 303 个单测通过
This commit is contained in:
my_local_kimi_dev2
2026-09-20 18:48:30 +08:00
parent 68fd71edbb
commit 8d8e71e45c
18 changed files with 1335 additions and 0 deletions
+8
View File
@@ -79,6 +79,14 @@
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Elasticsearch 客户端:老集群为 7.x,必须显式钉 7.17(Boot BOM 管理的是 8.x)。
elasticsearch-java 传递引入 elasticsearch-rest-client(低阶 RestClient)与 jakarta json -->
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>7.17.29</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>