|
|
|
@@ -41,24 +41,24 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac |
|
|
|
"A1": ctx.Tr("user.static.id"), |
|
|
|
"B1": ctx.Tr("user.static.name"), |
|
|
|
"C1": ctx.Tr("user.static.codemergecount"), |
|
|
|
"D1": ctx.Tr("user.static.commitcount"), |
|
|
|
"E1": ctx.Tr("user.static.issuecount"), |
|
|
|
"F1": ctx.Tr("user.static.commentcount"), |
|
|
|
"G1": ctx.Tr("user.static.focusrepocount"), |
|
|
|
"H1": ctx.Tr("user.static.starrepocount"), |
|
|
|
"I1": ctx.Tr("user.static.logincount"), |
|
|
|
"J1": ctx.Tr("user.static.watchedcount"), |
|
|
|
"K1": ctx.Tr("user.static.commitcodesize"), |
|
|
|
"L1": ctx.Tr("user.static.solveissuecount"), |
|
|
|
"M1": ctx.Tr("user.static.encyclopediascount"), |
|
|
|
"N1": ctx.Tr("user.static.createrepocount"), |
|
|
|
"O1": ctx.Tr("user.static.openiindex"), |
|
|
|
"P1": ctx.Tr("user.static.registdate"), |
|
|
|
"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"), |
|
|
|
"D1": ctx.Tr("user.static.UserIndex"), |
|
|
|
"E1": ctx.Tr("user.static.commitcount"), |
|
|
|
"F1": ctx.Tr("user.static.issuecount"), |
|
|
|
"G1": ctx.Tr("user.static.commentcount"), |
|
|
|
"H1": ctx.Tr("user.static.focusrepocount"), |
|
|
|
"I1": ctx.Tr("user.static.starrepocount"), |
|
|
|
"J1": ctx.Tr("user.static.logincount"), |
|
|
|
"K1": ctx.Tr("user.static.watchedcount"), |
|
|
|
"L1": ctx.Tr("user.static.commitcodesize"), |
|
|
|
"M1": ctx.Tr("user.static.solveissuecount"), |
|
|
|
"N1": ctx.Tr("user.static.encyclopediascount"), |
|
|
|
"O1": ctx.Tr("user.static.createrepocount"), |
|
|
|
"P1": ctx.Tr("user.static.openiindex"), |
|
|
|
"Q1": ctx.Tr("user.static.registdate"), |
|
|
|
"R1": ctx.Tr("user.static.CloudBrainTaskNum"), |
|
|
|
"S1": ctx.Tr("user.static.CloudBrainRunTime"), |
|
|
|
"T1": ctx.Tr("user.static.CommitDatasetNum"), |
|
|
|
"U1": ctx.Tr("user.static.CommitModelCount"), |
|
|
|
"V1": ctx.Tr("user.static.countdate"), |
|
|
|
} |
|
|
|
for k, v := range dataHeader { |
|
|
|
@@ -78,28 +78,27 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac |
|
|
|
xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID) |
|
|
|
xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name) |
|
|
|
xlsx.SetCellValue(sheetName, "C"+rows, userRecord.CodeMergeCount) |
|
|
|
xlsx.SetCellValue(sheetName, "D"+rows, userRecord.CommitCount) |
|
|
|
xlsx.SetCellValue(sheetName, "E"+rows, userRecord.IssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "F"+rows, userRecord.CommentCount) |
|
|
|
xlsx.SetCellValue(sheetName, "G"+rows, userRecord.FocusRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "H"+rows, userRecord.StarRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "I"+rows, userRecord.LoginCount) |
|
|
|
xlsx.SetCellValue(sheetName, "J"+rows, userRecord.WatchedCount) |
|
|
|
xlsx.SetCellValue(sheetName, "K"+rows, userRecord.CommitCodeSize) |
|
|
|
xlsx.SetCellValue(sheetName, "L"+rows, userRecord.SolveIssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "M"+rows, userRecord.EncyclopediasCount) |
|
|
|
xlsx.SetCellValue(sheetName, "N"+rows, userRecord.CreateRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "O"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex)) |
|
|
|
xlsx.SetCellValue(sheetName, "D"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex)) |
|
|
|
xlsx.SetCellValue(sheetName, "E"+rows, userRecord.CommitCount) |
|
|
|
xlsx.SetCellValue(sheetName, "F"+rows, userRecord.IssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "G"+rows, userRecord.CommentCount) |
|
|
|
xlsx.SetCellValue(sheetName, "H"+rows, userRecord.FocusRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "I"+rows, userRecord.StarRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "J"+rows, userRecord.LoginCount) |
|
|
|
xlsx.SetCellValue(sheetName, "K"+rows, userRecord.WatchedCount) |
|
|
|
xlsx.SetCellValue(sheetName, "L"+rows, userRecord.CommitCodeSize) |
|
|
|
xlsx.SetCellValue(sheetName, "M"+rows, userRecord.SolveIssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "N"+rows, userRecord.EncyclopediasCount) |
|
|
|
xlsx.SetCellValue(sheetName, "O"+rows, userRecord.CreateRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "P"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex)) |
|
|
|
|
|
|
|
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)) |
|
|
|
xlsx.SetCellValue(sheetName, "Q"+rows, formatTime[0:len(formatTime)-3]) |
|
|
|
|
|
|
|
xlsx.SetCellValue(sheetName, "R"+rows, userRecord.CloudBrainTaskNum) |
|
|
|
xlsx.SetCellValue(sheetName, "S"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600)) |
|
|
|
xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitDatasetNum) |
|
|
|
xlsx.SetCellValue(sheetName, "U"+rows, userRecord.CommitModelCount) |
|
|
|
formatTime = userRecord.DataDate |
|
|
|
xlsx.SetCellValue(sheetName, "V"+rows, formatTime) |
|
|
|
} |
|
|
|
@@ -243,24 +242,24 @@ func QueryUserStaticDataPage(ctx *context.Context) { |
|
|
|
"A1": ctx.Tr("user.static.id"), |
|
|
|
"B1": ctx.Tr("user.static.name"), |
|
|
|
"C1": ctx.Tr("user.static.codemergecount"), |
|
|
|
"D1": ctx.Tr("user.static.commitcount"), |
|
|
|
"E1": ctx.Tr("user.static.issuecount"), |
|
|
|
"F1": ctx.Tr("user.static.commentcount"), |
|
|
|
"G1": ctx.Tr("user.static.focusrepocount"), |
|
|
|
"H1": ctx.Tr("user.static.starrepocount"), |
|
|
|
"I1": ctx.Tr("user.static.logincount"), |
|
|
|
"J1": ctx.Tr("user.static.watchedcount"), |
|
|
|
"K1": ctx.Tr("user.static.commitcodesize"), |
|
|
|
"L1": ctx.Tr("user.static.solveissuecount"), |
|
|
|
"M1": ctx.Tr("user.static.encyclopediascount"), |
|
|
|
"N1": ctx.Tr("user.static.createrepocount"), |
|
|
|
"O1": ctx.Tr("user.static.openiindex"), |
|
|
|
"P1": ctx.Tr("user.static.registdate"), |
|
|
|
"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"), |
|
|
|
"D1": ctx.Tr("user.static.UserIndex"), |
|
|
|
"E1": ctx.Tr("user.static.commitcount"), |
|
|
|
"F1": ctx.Tr("user.static.issuecount"), |
|
|
|
"G1": ctx.Tr("user.static.commentcount"), |
|
|
|
"H1": ctx.Tr("user.static.focusrepocount"), |
|
|
|
"I1": ctx.Tr("user.static.starrepocount"), |
|
|
|
"J1": ctx.Tr("user.static.logincount"), |
|
|
|
"K1": ctx.Tr("user.static.watchedcount"), |
|
|
|
"L1": ctx.Tr("user.static.commitcodesize"), |
|
|
|
"M1": ctx.Tr("user.static.solveissuecount"), |
|
|
|
"N1": ctx.Tr("user.static.encyclopediascount"), |
|
|
|
"O1": ctx.Tr("user.static.createrepocount"), |
|
|
|
"P1": ctx.Tr("user.static.openiindex"), |
|
|
|
"Q1": ctx.Tr("user.static.registdate"), |
|
|
|
"R1": ctx.Tr("user.static.CloudBrainTaskNum"), |
|
|
|
"S1": ctx.Tr("user.static.CloudBrainRunTime"), |
|
|
|
"T1": ctx.Tr("user.static.CommitDatasetNum"), |
|
|
|
"U1": ctx.Tr("user.static.CommitModelCount"), |
|
|
|
"V1": ctx.Tr("user.static.countdate"), |
|
|
|
} |
|
|
|
for k, v := range dataHeader { |
|
|
|
@@ -274,26 +273,26 @@ func QueryUserStaticDataPage(ctx *context.Context) { |
|
|
|
xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID) |
|
|
|
xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name) |
|
|
|
xlsx.SetCellValue(sheetName, "C"+rows, userRecord.CodeMergeCount) |
|
|
|
xlsx.SetCellValue(sheetName, "D"+rows, userRecord.CommitCount) |
|
|
|
xlsx.SetCellValue(sheetName, "E"+rows, userRecord.IssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "F"+rows, userRecord.CommentCount) |
|
|
|
xlsx.SetCellValue(sheetName, "G"+rows, userRecord.FocusRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "H"+rows, userRecord.StarRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "I"+rows, userRecord.LoginCount) |
|
|
|
xlsx.SetCellValue(sheetName, "J"+rows, userRecord.WatchedCount) |
|
|
|
xlsx.SetCellValue(sheetName, "K"+rows, userRecord.CommitCodeSize) |
|
|
|
xlsx.SetCellValue(sheetName, "L"+rows, userRecord.SolveIssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "M"+rows, userRecord.EncyclopediasCount) |
|
|
|
xlsx.SetCellValue(sheetName, "N"+rows, userRecord.CreateRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "O"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex)) |
|
|
|
xlsx.SetCellValue(sheetName, "D"+rows, fmt.Sprintf("%.2f", userRecord.UserIndex)) |
|
|
|
xlsx.SetCellValue(sheetName, "E"+rows, userRecord.CommitCount) |
|
|
|
xlsx.SetCellValue(sheetName, "F"+rows, userRecord.IssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "G"+rows, userRecord.CommentCount) |
|
|
|
xlsx.SetCellValue(sheetName, "H"+rows, userRecord.FocusRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "I"+rows, userRecord.StarRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "J"+rows, userRecord.LoginCount) |
|
|
|
xlsx.SetCellValue(sheetName, "K"+rows, userRecord.WatchedCount) |
|
|
|
xlsx.SetCellValue(sheetName, "L"+rows, userRecord.CommitCodeSize) |
|
|
|
xlsx.SetCellValue(sheetName, "M"+rows, userRecord.SolveIssueCount) |
|
|
|
xlsx.SetCellValue(sheetName, "N"+rows, userRecord.EncyclopediasCount) |
|
|
|
xlsx.SetCellValue(sheetName, "O"+rows, userRecord.CreateRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "P"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex)) |
|
|
|
|
|
|
|
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)) |
|
|
|
xlsx.SetCellValue(sheetName, "Q"+rows, formatTime[0:len(formatTime)-3]) |
|
|
|
xlsx.SetCellValue(sheetName, "R"+rows, userRecord.CloudBrainTaskNum) |
|
|
|
xlsx.SetCellValue(sheetName, "S"+rows, fmt.Sprintf("%.2f", float64(userRecord.CloudBrainRunTime)/3600)) |
|
|
|
xlsx.SetCellValue(sheetName, "T"+rows, userRecord.CommitDatasetNum) |
|
|
|
xlsx.SetCellValue(sheetName, "U"+rows, userRecord.CommitModelCount) |
|
|
|
formatTime = userRecord.DataDate |
|
|
|
xlsx.SetCellValue(sheetName, "V"+rows, formatTime) |
|
|
|
} |
|
|
|
|