diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go
index 644398d48..edfe73939 100644
--- a/models/user_business_analysis.go
+++ b/models/user_business_analysis.go
@@ -668,7 +668,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time,
dateRecord.NpuTrainJob = getMapKeyStringValue(fmt.Sprint(dateRecord.ID)+"_NpuTrainJob", CloudBrainTaskItemMap)
dateRecord.NpuInferenceJob = getMapKeyStringValue(fmt.Sprint(dateRecord.ID)+"_NpuInferenceJob", CloudBrainTaskItemMap)
dateRecord.GpuBenchMarkJob = getMapKeyStringValue(fmt.Sprint(dateRecord.ID)+"_GpuBenchMarkJob", CloudBrainTaskItemMap)
-
+ dateRecord.CloudBrainRunTime = getMapKeyStringValue(fmt.Sprint(dateRecord.ID)+"_CloudBrainRunTime", CloudBrainTaskItemMap)
dateRecord.CommitModelCount = getMapValue(dateRecord.ID, AiModelManageMap)
dateRecord.UserIndex = getUserIndex(dateRecord, ParaWeight)
setUserMetrics(userMetrics, userRecord, start_unix, end_unix, dateRecord)
@@ -1375,7 +1375,7 @@ func queryCloudBrainTask(start_unix int64, end_unix int64) (map[int64]int, map[s
} else {
resultMap[cloudTaskRecord.UserID] += 1
}
- setMapKey("time", cloudTaskRecord.UserID, int(cloudTaskRecord.Duration), resultItemMap)
+ setMapKey("CloudBrainRunTime", cloudTaskRecord.UserID, int(cloudTaskRecord.Duration), resultItemMap)
if cloudTaskRecord.Type == 1 { //npu
if cloudTaskRecord.JobType == "TRAIN" {
setMapKey("NpuTrainJob", cloudTaskRecord.UserID, 1, resultItemMap)
diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go
index 8574e240b..96503e5c9 100755
--- a/routers/repo/user_data_analysis.go
+++ b/routers/repo/user_data_analysis.go
@@ -95,7 +95,7 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac
xlsx.SetCellValue(sheetName, "P"+rows, formatTime[0:len(formatTime)-3])
xlsx.SetCellValue(sheetName, "Q"+rows, userRecord.CloudBrainTaskNum)
- xlsx.SetCellValue(sheetName, "R"+rows, userRecord.CloudBrainRunTime)
+ xlsx.SetCellValue(sheetName, "R"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
xlsx.SetCellValue(sheetName, "S"+rows, userRecord.CommitDatasetNum)
xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitModelCount)
xlsx.SetCellValue(sheetName, "U"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
@@ -232,7 +232,12 @@ func QueryUserStaticDataPage(ctx *context.Context) {
"N1": ctx.Tr("user.static.createrepocount"),
"O1": ctx.Tr("user.static.openiindex"),
"P1": ctx.Tr("user.static.registdate"),
- "Q1": ctx.Tr("user.static.countdate"),
+ "Q1": ctx.Tr("user.static.CloudBrainTaskNum"),
+ "R1": ctx.Tr("user.static.CloudBrainRunTime"),
+ "S1": ctx.Tr("user.static.CommitDatasetNum"),
+ "T1": ctx.Tr("user.static.CommitModelCount"),
+ "U1": ctx.Tr("user.static.UserIndex"),
+ "V1": ctx.Tr("user.static.countdate"),
}
for k, v := range dataHeader {
//设置单元格的值
@@ -260,9 +265,13 @@ func QueryUserStaticDataPage(ctx *context.Context) {
formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05")
xlsx.SetCellValue(sheetName, "P"+rows, formatTime[0:len(formatTime)-3])
-
+ xlsx.SetCellValue(sheetName, "Q"+rows, userRecord.CloudBrainTaskNum)
+ xlsx.SetCellValue(sheetName, "R"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600))
+ xlsx.SetCellValue(sheetName, "S"+rows, userRecord.CommitDatasetNum)
+ xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitModelCount)
+ xlsx.SetCellValue(sheetName, "U"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex))
formatTime = userRecord.DataDate
- xlsx.SetCellValue(sheetName, "Q"+rows, formatTime+" 00:01")
+ xlsx.SetCellValue(sheetName, "V"+rows, formatTime)
}
//设置默认打开的表单
diff --git a/web_src/js/components/UserAnalysis.vue b/web_src/js/components/UserAnalysis.vue
index a9381a383..241768c15 100755
--- a/web_src/js/components/UserAnalysis.vue
+++ b/web_src/js/components/UserAnalysis.vue
@@ -145,6 +145,9 @@
label="云脑运行时间(小时)"
width="120px"
align="center">
+
+ {{scope.row.CloudBrainRunTime | roundingToHour}}
+