feat(phase3): 备案对接/全国统计/号段管理/BFF安全化/链合约源码

- A.1 备案对接: BindFiling/QueryFiling 关联网标号+备案号
- A.2 监管上报: DailyRegulatoryReport 日报
- B.1 号段管理: ListSegments + /admin/segments
- C.1/C.2 全国统计按省聚合 + 跨省协同(单一可信源天然联动)
- F.2 全国监管大屏: NationalStats(按省/类目/状态)
- B(遗留) 监管大屏BFF: internal/bff + cmd/console-bff, 密钥仅存后端浏览器只用会话令牌
- G 真实链合约源码: contracts/tcs_registry/registry.go (ChainMaker Go)
- 新增9个API+BFF服务; 5项新测试; 端到端BFF验证
- D/E(压测/等保/HSM)/F.1(标准)/真实链部署 标注需外部环境
This commit is contained in:
selfrelease
2026-06-14 17:53:12 +08:00
parent f34c82241e
commit 8db9d33694
11 changed files with 743 additions and 74 deletions
+24
View File
@@ -142,6 +142,30 @@ func (g *Generator) Allocate(category string) (Issued, error) {
}, nil
}
// SegmentInfo 号段使用情况摘要。
type SegmentInfo struct {
Category string `json:"category"`
IndustryNode string `json:"industry_node"`
OrgNode string `json:"org_node"`
Start uint64 `json:"start"`
End uint64 `json:"end"`
Capacity uint64 `json:"capacity"`
}
// Segments 返回已登记号段列表(号段管理后台用,B.1)。
func (g *Generator) Segments() []SegmentInfo {
g.mu.RLock()
defer g.mu.RUnlock()
out := make([]SegmentInfo, 0, len(g.segments))
for _, seg := range g.segments {
out = append(out, SegmentInfo{
Category: seg.Category, IndustryNode: seg.IndustryNode, OrgNode: seg.OrgNode,
Start: seg.Start, End: seg.End, Capacity: seg.End - seg.Start + 1,
})
}
return out
}
// Format 按备案规则拼装 MA 码。
func Format(seg Segment, year int, seq uint64) string {
w := seg.SeqWidth