Files
hyapi-server/internal/infrastructure/http/routes/qygl_report_routes.go
2026-06-12 14:20:55 +08:00

41 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package routes
import (
"hyapi-server/internal/infrastructure/http/handlers"
sharedhttp "hyapi-server/internal/shared/http"
)
// QYGLReportRoutes 企业报告页面路由注册器
type QYGLReportRoutes struct {
handler *handlers.QYGLReportHandler
}
// NewQYGLReportRoutes 创建企业报告页面路由注册器
func NewQYGLReportRoutes(
handler *handlers.QYGLReportHandler,
) *QYGLReportRoutes {
return &QYGLReportRoutes{
handler: handler,
}
}
// Register 注册企业报告页面路由
func (r *QYGLReportRoutes) Register(router *sharedhttp.GinRouter) {
engine := router.GetEngine()
// 报告头图/页脚qiye.html 样式引用)
engine.Static("/reports/qygl/media", "resources/qygl-media")
// 企业全景报告页面(实时生成)
engine.GET("/reports/qygl", r.handler.GetQYGLReportPage)
// 企业全景报告页面(通过编号查看)
engine.GET("/reports/qygl/:id", r.handler.GetQYGLReportPageByID)
// 企业全景报告 PDF 预生成状态(通过编号,供前端轮询)
engine.GET("/reports/qygl/:id/pdf/status", r.handler.GetQYGLReportPDFStatusByID)
// 企业全景报告 PDF 导出(通过编号)
engine.GET("/reports/qygl/:id/pdf", r.handler.GetQYGLReportPDFByID)
}