fix: 兼容3G的SGWC字段

This commit is contained in:
TsMask
2025-02-21 15:42:43 +08:00
parent f61f546d55
commit 1c1c564691

View File

@@ -58,8 +58,8 @@ func (r CDREventSGWC) ExportXlsx(rows []model.CDREventSGWC, fileName string) (st
"H1": "GPRS Downlink",
"I1": "Duration",
"J1": "Invocation Time",
"K1": "GGSN Address",
"L1": "SGSN Address",
"K1": "PGW Address",
"L1": "SGW Address",
"M1": "RAT Type",
"N1": "PDPPDN Type",
"O1": "PDPPDN Address",
@@ -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 := ""