更新处理器

This commit is contained in:
2026-06-10 20:32:24 +08:00
parent a29265f901
commit 45ae6cf36e
293 changed files with 2028 additions and 23462 deletions

View File

@@ -17,7 +17,7 @@ import (
api_repositories "hyapi-server/internal/domains/api/repositories"
api_services "hyapi-server/internal/domains/api/services"
"hyapi-server/internal/domains/api/services/processors"
"hyapi-server/internal/domains/api/services/processors/qygl"
"hyapi-server/internal/domains/api/services/processors/qygl/reportstore"
"hyapi-server/internal/shared/pdf"
)
@@ -55,13 +55,11 @@ func (h *QYGLReportHandler) GetQYGLReportPage(c *gin.Context) {
// 读取查询参数
entCode := c.Query("ent_code")
entName := c.Query("ent_name")
entRegNo := c.Query("ent_reg_no")
// 组装 QYGLUY3S 入参
req := dto.QYGLUY3SReq{
EntName: entName,
EntRegno: entRegNo,
EntCode: entCode,
// 组装企业全景QYGL7HBN入参
req := dto.QYGL7HBNReq{
EntName: entName,
EntCode: entCode,
}
params, err := json.Marshal(req)
@@ -71,12 +69,12 @@ func (h *QYGLReportHandler) GetQYGLReportPage(c *gin.Context) {
return
}
// 通过 ApiRequestService 调用 QYGLJ1U9 聚合处理器
// 通过 ApiRequestService 调用 QYGL7HBN 聚合处理器
options := &commands.ApiCallOptions{}
callCtx := &processors.CallContext{}
ctx := c.Request.Context()
respBytes, err := h.apiRequestService.PreprocessRequestApi(ctx, "QYGLJ1U9", params, options, callCtx)
respBytes, err := h.apiRequestService.PreprocessRequestApi(ctx, "QYGL7HBN", params, options, callCtx)
if err != nil {
h.logger.Error("调用企业全景报告处理器失败", zap.Error(err))
c.String(http.StatusInternalServerError, "生成企业报告失败,请稍后重试")
@@ -127,7 +125,7 @@ func (h *QYGLReportHandler) GetQYGLReportPageByID(c *gin.Context) {
}
// 回退到进程内存缓存(兼容老的访问方式)
report, ok := qygl.GetQYGLReport(id)
report, ok := reportstore.GetQYGLReport(id)
if !ok {
c.String(http.StatusNotFound, "报告不存在或已过期")
return
@@ -156,7 +154,7 @@ func (h *QYGLReportHandler) qyglReportExists(ctx context.Context, id string) boo
return true
}
}
_, ok := qygl.GetQYGLReport(id)
_, ok := reportstore.GetQYGLReport(id)
return ok
}