291 lines
8.8 KiB
TypeScript
291 lines
8.8 KiB
TypeScript
declare namespace Api {
|
|
namespace WorkReport {
|
|
namespace Common {
|
|
interface PageParams {
|
|
pageNo: number;
|
|
pageSize: number;
|
|
}
|
|
|
|
type ReportType = 'weekly' | 'monthly' | 'project';
|
|
type WorkReportStatusCode = 'draft' | 'pending_approval' | 'approved' | 'rejected';
|
|
|
|
interface WorkReportStatusDict {
|
|
statusCode: WorkReportStatusCode | string;
|
|
statusName: string;
|
|
sort: number;
|
|
initialFlag: boolean;
|
|
terminalFlag: boolean;
|
|
allowEdit: boolean;
|
|
}
|
|
|
|
interface WorkReportApprovalRecord {
|
|
id: string;
|
|
statusLogId: string;
|
|
approvalRound: number;
|
|
conclusion: string;
|
|
opinion?: string | null;
|
|
auditorUserId: string;
|
|
auditorName: string;
|
|
createTime: string;
|
|
}
|
|
|
|
interface PersonalReportReviewItem {
|
|
id?: string;
|
|
itemNumber?: number | null;
|
|
itemTitle: string;
|
|
workHours?: number | null;
|
|
contentText?: string | null;
|
|
contentJson?: unknown;
|
|
reflectionText?: string | null;
|
|
}
|
|
|
|
interface PersonalReportPlanItem {
|
|
id?: string;
|
|
itemNumber?: number | null;
|
|
itemTitle: string;
|
|
targetText?: string | null;
|
|
targetJson?: unknown;
|
|
supportNeed?: string | null;
|
|
}
|
|
|
|
type WorkReportBaseSearchParams = CommonType.RecordNullable<
|
|
Pick<PageParams, 'pageNo' | 'pageSize'> & {
|
|
keyword: string;
|
|
statusCode: WorkReportStatusCode | string;
|
|
periodStartDate: string[];
|
|
submitTime: string[];
|
|
supervisorName: string;
|
|
}
|
|
>;
|
|
|
|
type ContentExportParams<TSearch> = Partial<TSearch> & {
|
|
exportAll?: boolean;
|
|
ids?: string[];
|
|
};
|
|
|
|
interface StatusActionParams {
|
|
reason?: string | null;
|
|
}
|
|
|
|
interface PageResult<T> {
|
|
total: number;
|
|
list: T[];
|
|
}
|
|
}
|
|
|
|
namespace Weekly {
|
|
interface WeeklyReportTravelSegment {
|
|
id?: string;
|
|
sort?: number | null;
|
|
startDate?: string | null;
|
|
endDate?: string | null;
|
|
travelDays?: number | null;
|
|
location?: string | null;
|
|
}
|
|
|
|
interface WeeklyReport {
|
|
id: string;
|
|
reporterId: string;
|
|
reporterName: string;
|
|
reporterDeptName?: string | null;
|
|
reporterPostName?: string | null;
|
|
supervisorUserId: string;
|
|
supervisorName: string;
|
|
periodKey: string;
|
|
periodLabel: string;
|
|
periodStartDate: string;
|
|
periodEndDate: string;
|
|
statusCode: Common.WorkReportStatusCode | string;
|
|
statusName: string;
|
|
allowEdit: boolean;
|
|
terminal: boolean;
|
|
isBusinessTrip: boolean;
|
|
totalTravelDays?: number | string | null;
|
|
totalWorkHours?: number | string | null;
|
|
approvalComment?: string | null;
|
|
lastStatusReason?: string | null;
|
|
submitTime?: string | null;
|
|
approvalTime?: string | null;
|
|
createTime?: string | null;
|
|
updateTime?: string | null;
|
|
reviewItems: Common.PersonalReportReviewItem[];
|
|
planItems: Common.PersonalReportPlanItem[];
|
|
travelSegments: WeeklyReportTravelSegment[];
|
|
}
|
|
|
|
type WeeklyReportSearchParams = Common.WorkReportBaseSearchParams & {
|
|
isBusinessTrip?: boolean | string | null;
|
|
};
|
|
|
|
interface WeeklyReportSaveParams {
|
|
periodKey: string;
|
|
periodLabel: string;
|
|
periodStartDate: string;
|
|
periodEndDate: string;
|
|
isBusinessTrip: boolean;
|
|
reviewItems: Common.PersonalReportReviewItem[];
|
|
planItems: Common.PersonalReportPlanItem[];
|
|
travelSegments: WeeklyReportTravelSegment[];
|
|
}
|
|
|
|
type WeeklyReportDefaultDraftParams = Pick<
|
|
WeeklyReportSaveParams,
|
|
'periodKey' | 'periodLabel' | 'periodStartDate' | 'periodEndDate'
|
|
>;
|
|
}
|
|
|
|
namespace Monthly {
|
|
interface MonthlyReport {
|
|
id: string;
|
|
reporterId: string;
|
|
reporterName: string;
|
|
reporterDeptName?: string | null;
|
|
reporterPostName?: string | null;
|
|
supervisorUserId: string;
|
|
supervisorName: string;
|
|
periodKey: string;
|
|
periodLabel: string;
|
|
periodStartDate: string;
|
|
periodEndDate: string;
|
|
statusCode: Common.WorkReportStatusCode | string;
|
|
statusName: string;
|
|
allowEdit: boolean;
|
|
terminal: boolean;
|
|
totalWorkHours?: number | string | null;
|
|
approvalComment?: string | null;
|
|
lastStatusReason?: string | null;
|
|
submitTime?: string | null;
|
|
approvalTime?: string | null;
|
|
createTime?: string | null;
|
|
updateTime?: string | null;
|
|
reviewItems: Common.PersonalReportReviewItem[];
|
|
planItems: Common.PersonalReportPlanItem[];
|
|
}
|
|
|
|
type MonthlyReportSearchParams = Common.WorkReportBaseSearchParams;
|
|
|
|
interface MonthlyReportSaveParams {
|
|
periodKey: string;
|
|
periodLabel: string;
|
|
periodStartDate: string;
|
|
periodEndDate: string;
|
|
reviewItems: Common.PersonalReportReviewItem[];
|
|
planItems: Common.PersonalReportPlanItem[];
|
|
}
|
|
|
|
type MonthlyReportDefaultDraftParams = Pick<
|
|
MonthlyReportSaveParams,
|
|
'periodKey' | 'periodLabel' | 'periodStartDate' | 'periodEndDate'
|
|
>;
|
|
|
|
interface MonthlyReportApproveParams extends Common.StatusActionParams {
|
|
meetingDate?: string | null;
|
|
strengthDesc?: string | null;
|
|
strengthExample?: string | null;
|
|
weaknessDesc?: string | null;
|
|
weaknessExample?: string | null;
|
|
improvementSuggestion?: string | null;
|
|
performanceResult?: string | null;
|
|
employeeSignName?: string | null;
|
|
employeeSignedDate?: string | null;
|
|
supervisorSignName?: string | null;
|
|
supervisorSignedDate?: string | null;
|
|
}
|
|
|
|
interface MonthlyReportApprovalRecord extends Common.WorkReportApprovalRecord {
|
|
meetingDate?: string | null;
|
|
strengthDesc?: string | null;
|
|
strengthExample?: string | null;
|
|
weaknessDesc?: string | null;
|
|
weaknessExample?: string | null;
|
|
improvementSuggestion?: string | null;
|
|
performanceResult?: string | null;
|
|
employeeSignName?: string | null;
|
|
employeeSignedDate?: string | null;
|
|
supervisorSignName?: string | null;
|
|
supervisorSignedDate?: string | null;
|
|
}
|
|
}
|
|
|
|
namespace Project {
|
|
interface WorkReportMemberSnapshot {
|
|
userId: string;
|
|
userName: string;
|
|
}
|
|
|
|
interface ProjectReportItem {
|
|
id?: string;
|
|
itemTitle: string;
|
|
workHours?: number | null;
|
|
priorityCode?: string | null;
|
|
progressRate?: number | null;
|
|
}
|
|
|
|
interface ProjectReportOwnerProjectOption {
|
|
id: string;
|
|
projectCode: string;
|
|
projectName: string;
|
|
}
|
|
|
|
interface ProjectReport {
|
|
id: string;
|
|
projectId: string;
|
|
projectName: string;
|
|
projectOwnerId: string;
|
|
projectOwnerName: string;
|
|
technicalOwnerName?: string | null;
|
|
projectMemberSnapshot: WorkReportMemberSnapshot[];
|
|
supervisorUserId: string;
|
|
supervisorName: string;
|
|
periodKey: string;
|
|
periodLabel: string;
|
|
periodStartDate: string;
|
|
periodEndDate: string;
|
|
flag: number;
|
|
statusCode: Common.WorkReportStatusCode | string;
|
|
statusName: string;
|
|
allowEdit: boolean;
|
|
terminal: boolean;
|
|
projectStatusDesc?: string | null;
|
|
projectProgressPlan?: string | null;
|
|
projectKeyPoints?: string | null;
|
|
projectProblems?: string | null;
|
|
totalWorkHours?: number | string | null;
|
|
approvalComment?: string | null;
|
|
lastStatusReason?: string | null;
|
|
submitTime?: string | null;
|
|
approvalTime?: string | null;
|
|
createTime?: string | null;
|
|
updateTime?: string | null;
|
|
currentItems: ProjectReportItem[];
|
|
nextItems: ProjectReportItem[];
|
|
}
|
|
|
|
type ProjectReportSearchParams = Common.WorkReportBaseSearchParams & {
|
|
projectId?: string | null;
|
|
flag?: number | null;
|
|
};
|
|
|
|
interface ProjectReportSaveParams {
|
|
projectId: string;
|
|
periodKey: string;
|
|
periodLabel: string;
|
|
periodStartDate: string;
|
|
periodEndDate: string;
|
|
flag: number;
|
|
projectStatusDesc?: string | null;
|
|
projectProgressPlan?: string | null;
|
|
projectKeyPoints?: string | null;
|
|
projectProblems?: string | null;
|
|
currentItems: ProjectReportItem[];
|
|
nextItems: ProjectReportItem[];
|
|
}
|
|
|
|
type ProjectReportDefaultDraftParams = Pick<
|
|
ProjectReportSaveParams,
|
|
'periodKey' | 'periodLabel' | 'periodStartDate' | 'periodEndDate' | 'flag'
|
|
>;
|
|
}
|
|
}
|
|
}
|