feat: IMS导出功能增加呼叫结果和原因字段
This commit is contained in:
@@ -480,9 +480,9 @@ func (s BackupExportTableProcessor) exportIMS(hour int, columns []string, filePa
|
||||
}
|
||||
|
||||
// 呼叫类型
|
||||
callType := "sms"
|
||||
if col == "callType" || col == "call_type" {
|
||||
if v, ok := cdrJSON["callType"]; ok && v != nil {
|
||||
callType := "sms"
|
||||
callTypeLable := "SMS"
|
||||
if v, ok := cdrJSON["callType"]; ok && v != nil {
|
||||
callType = v.(string)
|
||||
@@ -517,16 +517,21 @@ func (s BackupExportTableProcessor) exportIMS(hour int, columns []string, filePa
|
||||
}
|
||||
// 呼叫结果 非短信都有code作为结果 sms短信都ok
|
||||
if col == "cause" {
|
||||
if v, ok := cdrJSON["cause"]; ok && v != nil {
|
||||
cause := fmt.Sprint(v)
|
||||
callResult := "Success"
|
||||
for _, v := range dictCDRSipCode {
|
||||
if cause == v.DataValue {
|
||||
callResult = i18n.TKey(language, v.DataLabel)
|
||||
break
|
||||
if callType == "sms" {
|
||||
arr[i] = "Success"
|
||||
continue
|
||||
} else {
|
||||
if v, ok := cdrJSON["cause"]; ok && v != nil {
|
||||
callResult := "Other"
|
||||
cause := fmt.Sprint(v)
|
||||
for _, v := range dictCDRSipCode {
|
||||
if cause == v.DataValue {
|
||||
callResult = i18n.TKey(language, v.DataLabel)
|
||||
break
|
||||
}
|
||||
}
|
||||
arr[i] = callResult
|
||||
}
|
||||
arr[i] = fmt.Sprintf("%v", callResult)
|
||||
}
|
||||
}
|
||||
// 呼叫时间
|
||||
|
||||
Reference in New Issue
Block a user