Merge remote-tracking branch 'origin/main' into multi-tenant
This commit is contained in:
@@ -3,6 +3,7 @@ package kpi_c_report
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"be.ems/lib/dborm"
|
"be.ems/lib/dborm"
|
||||||
@@ -157,7 +158,12 @@ func (k *KpiCReport) GetReport2FE(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, k := range r.KpiValues {
|
for _, k := range r.KpiValues {
|
||||||
report[k.KPIID] = k.Value
|
formatted := fmt.Sprintf("%.3f", k.Value)
|
||||||
|
formattedFloat, err := strconv.ParseFloat(formatted, 64)
|
||||||
|
if err != nil {
|
||||||
|
formattedFloat = 0
|
||||||
|
}
|
||||||
|
report[k.KPIID] = formattedFloat
|
||||||
}
|
}
|
||||||
reports = append(reports, report)
|
reports = append(reports, report)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ func (s *Commont) SystemConfigInfo() map[string]string {
|
|||||||
}
|
}
|
||||||
// 用户登录认证
|
// 用户登录认证
|
||||||
infoMap["loginAuth"] = fmt.Sprint(config.Get("user.loginAuth"))
|
infoMap["loginAuth"] = fmt.Sprint(config.Get("user.loginAuth"))
|
||||||
|
// 用户接口加密
|
||||||
|
infoMap["cryptoApi"] = fmt.Sprint(config.Get("user.cryptoApi"))
|
||||||
// 序列号
|
// 序列号
|
||||||
infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn"))
|
infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn"))
|
||||||
// 获取LOGO类型
|
// 获取LOGO类型
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ type CDREventSMFQuery struct {
|
|||||||
RmUID string `json:"rmUID" form:"rmUID"`
|
RmUID string `json:"rmUID" form:"rmUID"`
|
||||||
RecordType string `json:"recordType" form:"recordType"` // 暂时没用到
|
RecordType string `json:"recordType" form:"recordType"` // 暂时没用到
|
||||||
SubscriberID string `json:"subscriberID" form:"subscriberID"`
|
SubscriberID string `json:"subscriberID" form:"subscriberID"`
|
||||||
|
DNN string `json:"dnn" form:"dnn"`
|
||||||
StartTime string `json:"startTime" form:"startTime"`
|
StartTime string `json:"startTime" form:"startTime"`
|
||||||
EndTime string `json:"endTime" form:"endTime"`
|
EndTime string `json:"endTime" form:"endTime"`
|
||||||
TenantName string `json:"tenantName" form:"tenantName"`
|
TenantName string `json:"tenantName" form:"tenantName"`
|
||||||
|
|||||||
@@ -206,6 +206,9 @@ func (r CDREventSMF) SelectByPage(querys model.CDREventSMFQuery) ([]model.CDREve
|
|||||||
if querys.SubscriberID != "" {
|
if querys.SubscriberID != "" {
|
||||||
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.subscriberIdentifier.subscriptionIDData') = ?", querys.SubscriberID)
|
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.subscriberIdentifier.subscriptionIDData') = ?", querys.SubscriberID)
|
||||||
}
|
}
|
||||||
|
if querys.DNN != "" {
|
||||||
|
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.pDUSessionChargingInformation.dNNID') = ?", querys.DNN)
|
||||||
|
}
|
||||||
|
|
||||||
// 查询结果
|
// 查询结果
|
||||||
var total int64 = 0
|
var total int64 = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user