fix: 兼容3G的SGWC字段

This commit is contained in:
TsMask
2025-02-21 15:49:24 +08:00
parent a908b462e1
commit 8627a7e66e

View File

@@ -58,7 +58,7 @@ func (r CDREventSGWC) ExportXlsx(rows []model.CDREventSGWC, fileName string) (st
"H1": "GPRS Downlink",
"I1": "Duration",
"J1": "Invocation Time",
"K1": "PGW Address Used",
"K1": "PGW Address",
"L1": "SGW Address",
"M1": "RAT Type",
"N1": "PDPPDN Type",
@@ -102,17 +102,21 @@ func (r CDREventSGWC) ExportXlsx(rows []model.CDREventSGWC, fileName string) (st
pGWAddressUsed := ""
if v, ok := cdrJSON["pGWAddressUsed"]; ok && v != nil {
pGWAddressUsed = fmt.Sprint(v)
headerCells["K1"] = "PGW Address"
}
if v, ok := cdrJSON["GGSNAddress"]; ok && v != nil {
pGWAddressUsed = fmt.Sprint(v)
headerCells["K1"] = "GGSN Address"
}
// sGWAddress
sGWAddress := ""
if v, ok := cdrJSON["sGWAddress"]; ok && v != nil {
sGWAddress = fmt.Sprint(v)
headerCells["L1"] = "SGW Address"
}
if v, ok := cdrJSON["SGSNAddress"]; ok && v != nil {
sGWAddress = fmt.Sprint(v)
headerCells["L1"] = "SGSN Address"
}
// recordType
recordType := ""