feat(ai-report): 新增委托单位管理和报告审批功能

- 新增委托单位管理模块,支持增删改查、导入导出功能
- 实现委托单位 Excel 模板下载和数据导入功能
- 添加报告审批抽象处理器,支持审批流程日志记录
- 统一文件存储路径配置,将各模块独立路径改为统一根目录
- 新增 PQDIF 文件名存储字段,完善文件管理功能
- 修复代码中的乱码问题和错误提示信息
- 优化系统常量定义和字典配置管理
This commit is contained in:
2026-07-01 13:15:57 +08:00
parent 0ea686d3cb
commit c1ad7feec2
99 changed files with 6511 additions and 24 deletions

View File

@@ -1051,7 +1051,7 @@ public class SteadyChecksquareServiceImpl implements SteadyChecksquareService {
Map<String, AddLedgerLinePathVO> linePathMap = addLedgerService.listLinePathByLineIds(lineIds);
for (String lineId : lineIds) {
if (linePathMap == null || linePathMap.get(lineId) == null) {
throw fail("鐩戞祴鐐逛笉瀛樺湪鎴栦笉鍙敤");
throw fail("监测点不存在或不可用");
}
}
return linePathMap;

View File

@@ -61,7 +61,8 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
/**
* 鏁版嵁鏍¢獙鏈嶅姟娴嬭瘯<EFBFBD>? */
* 数据校验服务测试。
*/
class SteadyChecksquareServiceImplTest {
@BeforeAll
@@ -326,7 +327,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
linePath.setLineName("杩涚嚎涓<EFBFBD>?);
linePath.setLineName("进线一");
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -414,7 +415,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
linePath.setLineName("杩涚嚎涓<EFBFBD>?);
linePath.setLineName("进线一");
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -453,7 +454,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
linePath.setLineName("杩涚嚎涓<EFBFBD>?);
linePath.setLineName("进线一");
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -490,7 +491,7 @@ class SteadyChecksquareServiceImplTest {
Assertions.assertEquals(Integer.valueOf(1), items.get(0).getAbnormalPointCount());
Assertions.assertEquals(1, items.get(0).getAbnormalDetails().size());
Assertions.assertEquals(Integer.valueOf(2), items.get(0).getAbnormalDetails().get(0).getHarmonicOrder());
Assertions.assertEquals(Integer.valueOf(8), items.get(0).getExpectedPointCount());
Assertions.assertEquals(Integer.valueOf(4), items.get(0).getExpectedPointCount());
Assertions.assertEquals(Integer.valueOf(4), items.get(0).getActualPointCount());
}
@@ -507,7 +508,7 @@ class SteadyChecksquareServiceImplTest {
mock(SteadyChecksquareDetailService.class), new ObjectMapper());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
linePath.setLineName("杩涚嚎涓<EFBFBD>?);
linePath.setLineName("进线一");
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -556,7 +557,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyHarmonicParityRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
linePath.setLineName("杩涚嚎涓<EFBFBD>?);
linePath.setLineName("进线一");
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -603,7 +604,7 @@ class SteadyChecksquareServiceImplTest {
.thenReturn(emptyRuleResult());
AddLedgerLinePathVO linePath = new AddLedgerLinePathVO();
linePath.setLineId("line-001");
linePath.setLineName("杩涚嚎涓<EFBFBD>?);
linePath.setLineName("进线一");
linePath.setLineInterval(1);
when(addLedgerService.listLinePathByLineIds(eq(Collections.singletonList("line-001"))))
.thenReturn(Collections.singletonMap("line-001", linePath));
@@ -665,7 +666,7 @@ class SteadyChecksquareServiceImplTest {
task.setId("task-001");
task.setState(1);
task.setLineId("line-001");
task.setLineName("杩涚嚎涓<EFBFBD>?);
task.setLineName("进线一");
task.setTimeStart(LocalDateTime.of(2026, 5, 1, 0, 0));
task.setTimeEnd(LocalDateTime.of(2026, 5, 1, 0, 1));
task.setIntervalMinutes(1);
@@ -851,7 +852,7 @@ class SteadyChecksquareServiceImplTest {
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
result.setLineIds(Collections.singletonList("line-001"));
result.setLineName("杩涚嚎涓<EFBFBD>?);
result.setLineName("进线一");
result.setTimeStart("2026-05-01 00:00:00");
result.setTimeEnd("2026-05-01 00:01:00");
result.setIntervalMinutes(1);
@@ -860,7 +861,7 @@ class SteadyChecksquareServiceImplTest {
item.setLineId("line-001");
item.setLineName("line-001-name");
item.setIndicatorCode("V_RMS");
item.setIndicatorName("鐩哥數鍘嬫湁鏁堝<EFBFBD>?");
item.setIndicatorName("相电压有效值");
item.setIntervalMinutes(1);
item.setHasData(true);
item.setExpectedPointCount(2);
@@ -943,7 +944,7 @@ class SteadyChecksquareServiceImplTest {
param.setIndicatorCodes(Collections.singletonList("V_RMS"));
SteadyChecksquareQueryVO result = new SteadyChecksquareQueryVO();
result.setLineIds(Collections.singletonList("line-001"));
result.setLineName("杩涚嚎涓<EFBFBD>?);
result.setLineName("进线一");
result.setTimeStart("2026-05-01 00:00:00");
result.setTimeEnd("2026-05-01 00:01:00");
result.setIntervalMinutes(1);