1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
extend type Query {
    myActivityPlayer(activityId: ID!): ActivityPlayer
    activityPlayerApplications(name: String, activityId: ID, state: Int, page: Int, size: Int): PlayerApplicationPageResponse
    # 项目评审专用查询,包含所有阶段数据(包括复赛、决赛)
    projectReviewApplications(name: String, activityId: ID, state: Int, page: Int, size: Int): ProjectReviewApplicationPageResponse
    # 获取指定选手的所有评委评分状态
    judgeRatingsForPlayer(activityPlayerId: ID!): [JudgeRatingStatusResponse!]!
    # 获取指定选手的平均分
    averageScoreForPlayer(activityPlayerId: ID!): Float
 
    # 获取当前评委信息
    currentJudgeInfo: CurrentJudgeInfoResponse
    # 检查评委是否在指定比赛阶段的评委列表中
    isJudgeInActivity(stageId: ID!, judgeId: ID!): Boolean
    # 获取指定评委对选手的评分明细
    judgeRatingDetail(activityPlayerId: ID!, judgeId: ID!): CurrentJudgeRatingResponse
    # 获取当前评委对选手的评分
    currentJudgeRating(activityPlayerId: ID!): CurrentJudgeRatingResponse
    activityPlayerDetail(id: ID!): ActivityPlayerDetailResponse
    # 微信端获取选手报名状态
    getPlayerRegistrationState(activityId: ID!): PlayerRegistrationResponse
    # 获取比赛晋级列表
    promotionCompetitions(name: String, page: Int, size: Int): [PromotionCompetitionResponse!]!
    # 获取可晋级参赛者列表
    promotableParticipants(currentStageId: ID!): PromotableParticipantsResponse
}
 
extend type Mutation {
    approveActivityPlayer(activityPlayerId: ID!, feedback: String): Boolean
    rejectActivityPlayer(activityPlayerId: ID!, feedback: String!): Boolean
    updatePlayerFeedback(activityPlayerId: ID!, feedback: String!): Boolean
    # 微信端提交活动报名
    submitActivityRegistration(input: ActivityRegistrationInput!): ActivityRegistrationResponse
    # 保存评委评分
    saveActivityPlayerRating(input: ActivityPlayerRatingInput!): Boolean
    # 执行学员晋级操作
    promoteParticipants(input: PromotionInput!): PromotionResult
}
 
type ActivityPlayer {
    id: ID!
    activityId: ID!
    playerId: ID!
    stageId: ID
    state: Int
    stateName: String
    createTime: String
    player: Player
    activity: Activity
}
 
type Player {
    id: ID!
    name: String
    phone: String
}
 
type PlayerApplicationPageResponse {
    content: [ActivityPlayerApplicationResponse]
    totalElements: Int
    page: Int
    size: Int
}
 
type ProjectReviewApplicationPageResponse {
    content: [ActivityPlayerApplicationResponse]
    totalElements: Int
    page: Int
    size: Int
}
 
# 评委评分状态响应
type JudgeRatingStatusResponse {
    judgeId: ID!
    judgeName: String!
    hasRated: Boolean!
    ratingTime: String
    totalScore: Float
}
 
# 当前评委信息响应
type CurrentJudgeInfoResponse {
    judgeId: ID!
    judgeName: String!
    title: String
    company: String
}
 
# 当前评委评分响应
type CurrentJudgeRatingResponse {
    id: ID!
    totalScore: Float
    status: Int
    remark: String
    items: [CurrentJudgeRatingItemResponse!]!
}
 
# 评分项响应
type CurrentJudgeRatingItemResponse {
    ratingItemId: ID!
    ratingItemName: String!
    score: Float
    weightedScore: Float
}
 
type ActivityPlayerApplicationResponse {
    id: ID
    playerName: String
    activityName: String
    projectName: String
    phone: String
    applyTime: String
    state: Int
    ratingCount: Int
    averageScore: Float
}
 
type ActivityPlayerDetailResponse {
    id: ID
    playerInfo: PlayerInfoResponse
    regionInfo: RegionInfoResponse
    activityName: String
    projectName: String
    description: String
    feedback: String
    state: Int
    stageId: ID
    submissionFiles: [SubmissionMediaResponse]
    ratingForm: RatingFormResponse
}
 
type PlayerInfoResponse {
    id: ID
    name: String
    phone: String
    gender: Int
    birthday: String
    education: String
    introduction: String
    description: String
    avatarUrl: String
    avatar: MediaResponse
}
 
type RegionInfoResponse {
    id: ID
    name: String
    fullPath: String
}
 
type SubmissionMediaResponse {
    id: ID
    name: String
    url: String
    fileExt: String
    fileSize: Int
    mediaType: Int
    thumbUrl: String
}
 
type RatingFormResponse {
    schemeId: ID
    schemeName: String
    items: [RatingItemResponse]
    totalMaxScore: Int
}
 
# 选手报名状态响应类型
type PlayerRegistrationStateResponse {
    activityId: ID!
    playerId: ID
    registrationState: String
    canRegister: Boolean
    registrationTime: String
    projectName: String
}
 
# 选手报名响应类型(用于playerRegistration和getPlayerRegistrationState查询)
type PlayerRegistrationResponse {
    id: ID
    status: Int
    registrationTime: String
    reviewStatus: Int
    reviewComment: String
}
 
# 媒体文件输入类型
input MediaFileInput {
    name: String
    path: String
    fileExt: String
    fileSize: Int
    mediaType: Int
}
 
# 选手报名信息输入类型
input PlayerRegistrationInput {
    name: String!
    phone: String!
    birthDate: String
    gender: Int
    education: String
    introduction: String
    description: String
    avatarMediaId: String
}
 
# 活动报名输入类型
input ActivityRegistrationInput {
    activityId: ID!
    playerInfo: PlayerRegistrationInput!
    regionId: ID
    projectName: String!
    description: String
    mediaFiles: [MediaFileInput]
    attachmentMediaIds: [String]
}
 
# 活动报名响应类型
type ActivityRegistrationResponse {
    success: Boolean!
    message: String
    registrationId: ID
    playerId: ID
    userId: ID
    activityPlayerId: ID
}
 
# 评委评分输入类型
input ActivityPlayerRatingInput {
    activityPlayerId: ID!
    stageId: ID
    ratings: [ActivityPlayerRatingItemInput!]!
    comment: String
}
 
# 评分项输入类型
input ActivityPlayerRatingItemInput {
    itemId: ID!
    score: Float!
}
 
# 比赛晋级列表响应类型
type PromotionCompetitionResponse {
    id: ID!
    competitionId: ID!
    competitionName: String!
    stageName: String!
    maxParticipants: Int
    currentCount: Int!
    status: Int
    startTime: String
    endTime: String
    sortOrder: Int
    state: Int
}
 
# 可晋级参赛者列表响应类型
type PromotableParticipantsResponse {
    participants: [PromotableParticipantResponse!]!
    selectableCount: Int
    totalCount: Int
    previousStageName: String
    currentStageName: String
}
 
# 可晋级参赛者响应类型
type PromotableParticipantResponse {
    id: ID!
    playerName: String
    projectName: String
    phone: String
    averageScore: Float
    ratingCount: Int
    applyTime: String
    state: Int
    playerId: ID
}
 
# 晋级操作输入类型
input PromotionInput {
    competitionId: ID!
    participantIds: [ID!]!
    targetStageId: ID!
}
 
# 晋级操作结果类型
type PromotionResult {
    success: Boolean!
    message: String
    promotedCount: Int
}