fix(工作报告、我的绩效、产品/项目、消息通知): 修复已知的一些问题。

This commit is contained in:
dk
2026-06-28 14:04:28 +08:00
parent a4884035cd
commit 499f2115b2
10 changed files with 189 additions and 58 deletions

View File

@@ -67,20 +67,20 @@ type MonthlyResultResponse = Omit<Api.Performance.Sheet.MonthlyResult, 'sheetId'
type TeamSummaryResponse = Omit<
Api.Performance.Team.Summary,
| 'totalSheetCount'
| 'expectedSheetCount'
| 'pendingSendCount'
| 'pendingConfirmCount'
| 'pendingSendUsers'
| 'pendingConfirmUsers'
| 'deptOrgAverages'
> & {
totalSheetCount?: number | string | null;
expectedSheetCount?: number | string | null;
pendingSendCount?: number | string | null;
pendingConfirmCount?: number | string | null;
pendingSendUsers?: Array<
Omit<Api.Performance.Team.PendingSendUser, 'userId' | 'managerUserId' | 'sheetId'> & {
userId: StringIdResponse;
managerUserId: StringIdResponse;
managerUserId?: StringIdResponse | null;
sheetId?: StringIdResponse | null;
}
> | null;
@@ -188,13 +188,13 @@ function normalizeMonthlyResult(response: MonthlyResultResponse): Api.Performanc
function normalizeTeamSummary(response: TeamSummaryResponse): Api.Performance.Team.Summary {
return {
...response,
totalSheetCount: normalizeTotal(response.totalSheetCount),
expectedSheetCount: normalizeTotal(response.expectedSheetCount),
pendingSendCount: normalizeTotal(response.pendingSendCount),
pendingConfirmCount: normalizeTotal(response.pendingConfirmCount),
pendingSendUsers: (response.pendingSendUsers || []).map(item => ({
...item,
userId: normalizeStringId(item.userId),
managerUserId: normalizeStringId(item.managerUserId),
managerUserId: normalizeNullableStringId(item.managerUserId),
sheetId: normalizeNullableStringId(item.sheetId),
statusCode: item.statusCode ?? null
})),