Files
starRiverProperty/backend/cw-elevator-application/cw-elevator-application-service/docs/06-export-download-storage.md
T
hpd840321 7b2bd307f1 Initial commit: reorganized source tree
- backend/: 13 Maven modules (cw-elevator-application, cloudwalk-cloud, intelligent-cwoscomponent, ninca-crk, etc.)
- frontend/: 4 Vue projects (elevator-front, cwos-portal, alarm-front, front_acs) + decompiled + scripts
- scripts/: build, test-env, tools (Docker Compose, service templates, API parity)
- docs/: AGENTS.md, superpowers specs, architecture docs
- .gitignore: standard Java/Maven exclusions

Moved from legacy maven-*/ root layout to backend/ organized structure.
2026-05-09 09:56:45 +08:00

1.7 KiB
Raw Blame History

06 导出、下载与存储(export / downloadcenter / storage

6.1 异步导出 export

  • 抽象基类:AcsAbstractExportAsyncService —— 泛型封装 分页拉取 → 转 Excel 行 DTO → 与下载中心协作。
  • 实现示例ElevatorDeviceExportService
    • 注入 AcsElevatorDeviceService#get 取设备分页。
    • queryPage 中将 DTO 转为 ElevatorDeviceRecordExcelResult,并翻译 在线/禁用 等展示中文。

典型时序(概念):

sequenceDiagram
  participant User as 用户/任务
  participant E as ElevatorDeviceExportService
  participant D as AcsElevatorDeviceService
  participant DC as 下载中心
  User->>E: 触发导出任务
  loop 分页
    E->>D: get(查询+分页)
    D-->>E: 行数据
  end
  E->>DC: 完成文件/回写状态

6.2 下载中心 AcsDownloadCenterService

方法 概要
createDownload 创建下载任务/令牌
finishDownload 任务完成回执
queryDownloadStatus 轮询或查询状态

实现类downloadcenter/impl/AcsDownloadCenterServiceImpl.java(以源码为准)。

6.3 分片文件 AcsFileStorageServicestorage

方法 概要
filePartInit / filePartAppend / filePartFinish DaVinci/门户 分片上传 生命周期
getFileBase64 按 id 回读为 Base64

6.4 ER/依赖(导出子域)

flowchart LR
  Export[导出任务] --> Abs[AcsAbstractExportAsyncService]
  Abs --> Svc[具体领域 Service 如 设备]
  Abs --> Download[AcsDownloadCenterService]
  Storage[AcsFileStorageService] -.大文件.-> 门户