Merge branch 'wwq' into dev

This commit is contained in:
bx1834938347-prog 2026-01-06 10:35:59 +08:00
commit b6de8e0ee9

View File

@ -118,6 +118,17 @@ func ExportExcelExecutionResult(c *gin.Context) {
service.Error(c, errors.New("网络超时,请重试")) service.Error(c, errors.New("网络超时,请重试"))
return return
} }
userListRes, err := service.AccountFieeProvider.UserList(context.Background(), &account.UserListRequest{
Domain: "app",
})
if err != nil {
service.Error(c, errors.New("用户查询失败"))
return
}
idFindSubName := make(map[uint64]string)
for _, v := range userListRes.UserList {
idFindSubName[v.Id] = v.SubNum
}
titleList := []string{ titleList := []string{
"任务标题", "艺人编号", "艺人姓名", "内容类型", "内容标题", "执行结果", "原因", "任务标题", "艺人编号", "艺人姓名", "内容类型", "内容标题", "执行结果", "原因",
@ -126,7 +137,7 @@ func ExportExcelExecutionResult(c *gin.Context) {
for _, task := range res.Data { for _, task := range res.Data {
data := []interface{}{ data := []interface{}{
task.TaskTitle, task.TaskTitle,
task.ArtistId, idFindSubName[uint64(task.ArtistId)],
task.ArtistName, task.ArtistName,
task.ContentTypeDescription, task.ContentTypeDescription,
task.WorkTitle, task.WorkTitle,
@ -347,7 +358,7 @@ func readExcel(excelPath string) ([]excelData, error) {
subName := getCellValue(f, sheetName, i, 0) subName := getCellValue(f, sheetName, i, 0)
name := getCellValue(f, sheetName, i, 1) name := getCellValue(f, sheetName, i, 1)
data := excelData{ data := excelData{
Line: uint(i), Line: uint(i - 1),
SubName: subName, SubName: subName,
Name: name, Name: name,
} }