UNPKG

evmtools-node

Version:

このライブラリは、プライムブレインズ社で利用している「進捗管理ツール(Excel)」ファイルを読み込み、 プロジェクトの進捗状況や要員別の作業量を可視化するためのライブラリです。

242 lines 7.24 kB
import { TaskNode } from './TaskNode'; /** * タスクを表す基本エンティティ(リーフまたは中間ノード) */ export declare class TaskRow { /** * 表示順や構造上の識別に使われる行番号("#"に対応) */ readonly sharp: number; /** * タスクの一意なID */ readonly id: number; /** * タスクの階層レベル(1=ルート、2=子など) */ readonly level: number; /** * タスクの名称 */ readonly name: string; /** * 担当者名(任意) */ readonly assignee?: string | undefined; /** * 予定工数(日単位など、任意) */ readonly workload?: number | undefined; /** * 予定の開始日(任意) */ readonly startDate?: Date | undefined; /** * 予定の終了日(任意) */ readonly endDate?: Date | undefined; /** * 実際の開始日(任意) */ readonly actualStartDate?: Date | undefined; /** * 実際の終了日(任意) */ readonly actualEndDate?: Date | undefined; /** * 実績ベースの進捗率(任意) */ readonly progressRate?: number | undefined; /** * 予定された稼働日数(任意) */ readonly scheduledWorkDays?: number | undefined; /** * Planned Value:計画された作業価値(任意) */ readonly pv?: number | undefined; /** * Earned Value:実施された作業価値(任意) */ readonly ev?: number | undefined; /** * Schedule Performance Index:スケジュール効率指標(任意) */ readonly spi?: number | undefined; /** * 現在の進捗率に相当する予定日(任意) */ readonly expectedProgressDate?: Date | undefined; /** * 遅延日数(任意、マイナスで前倒し) */ readonly delayDays?: number | undefined; /** * 備考(任意) */ readonly remarks?: string | undefined; /** * 親タスクのID(任意、ツリー構造用) */ parentId?: number | undefined; /** * 子を持たないリーフノードであるかどうか(任意) * (便宜上任意だけど、セットすること) */ readonly isLeaf?: boolean | undefined; readonly plotMap?: Map<number, boolean> | undefined; private logger; constructor( /** * 表示順や構造上の識別に使われる行番号("#"に対応) */ sharp: number, /** * タスクの一意なID */ id: number, /** * タスクの階層レベル(1=ルート、2=子など) */ level: number, /** * タスクの名称 */ name: string, /** * 担当者名(任意) */ assignee?: string | undefined, /** * 予定工数(日単位など、任意) */ workload?: number | undefined, /** * 予定の開始日(任意) */ startDate?: Date | undefined, /** * 予定の終了日(任意) */ endDate?: Date | undefined, /** * 実際の開始日(任意) */ actualStartDate?: Date | undefined, /** * 実際の終了日(任意) */ actualEndDate?: Date | undefined, /** * 実績ベースの進捗率(任意) */ progressRate?: number | undefined, /** * 予定された稼働日数(任意) */ scheduledWorkDays?: number | undefined, /** * Planned Value:計画された作業価値(任意) */ pv?: number | undefined, /** * Earned Value:実施された作業価値(任意) */ ev?: number | undefined, /** * Schedule Performance Index:スケジュール効率指標(任意) */ spi?: number | undefined, /** * 現在の進捗率に相当する予定日(任意) */ expectedProgressDate?: Date | undefined, /** * 遅延日数(任意、マイナスで前倒し) */ delayDays?: number | undefined, /** * 備考(任意) */ remarks?: string | undefined, /** * 親タスクのID(任意、ツリー構造用) */ parentId?: number | undefined, /** * 子を持たないリーフノードであるかどうか(任意) * (便宜上任意だけど、セットすること) */ isLeaf?: boolean | undefined, plotMap?: Map<number, boolean> | undefined); /** * 予定工数 / 稼働予定日数 による一日あたりの工数(任意) * 計算不能な場合は undefined */ get workloadPerDay(): number | undefined; /** * 進捗率が100% ならtrueそれ以外はfalse */ get finished(): boolean; /** * 指定した基準日で、タスクが期限切れかどうかを判定する。 * - 終了日 <= 基準日 かつ 未完了 の場合に true を返す * (あくまで基準日の業務が終わったときの状況を算出する考えなので、等号を入れた) * progressRate はundefinedの場合もある(未完了と見なす) */ isOverdueAt(baseDate: Date): boolean; /** * 基準日(その日のみの)のPVを計算する。 * 基本、稼働予定の日数 / 予定工数 の値。 * その日に タスクがなければ0。 * なんらかの理由で、稼働予定日数がNaN/undefined/ゼロの場合、undefinedを返す。 * なんらかの理由で、予定工数がNaN/undefinedの場合、undefinedを返す。 * * @param baseDate 基準日 * @return */ calculatePV: (baseDate: Date) => number | undefined; /** * 基準日終了時点の累積PVを返す。タスクが始まっていなかったら0. * plotMapからカウントしている。(Excelから読む際は稼働予定日数より□のプロット優先となるってこと) * plotMapが取れなかったらゼロ * 開始日終了日が取れなかったらゼロ * * @param baseDate * @return */ calculatePVs: (baseDate: Date) => number; /** * Schedule Performance Index (SPI = EV/PV) * baseDateを元に導出した累積PVを用いて計算した、SPI * @param baseDate * @returns */ calculateSPI: (baseDate: Date) => number | undefined; /** * Schedule Variance (SV = EV-PV)を返す * baseDateを元に導出した累積PVを用いて計算した、EV-PV * @param baseDate * @returns */ calculateSV: (baseDate: Date) => number | undefined; /** * startDate, endDate ,plotMap がundefinedだったらfalse * @returns */ checkStartEndDateAndPlotMap: () => this is NonNullDateAndPlotMap; /** * TaskNode から、TaskRowを作る * @param node * @param level * @param parentId * @returns */ static fromNode(node: TaskNode, level: number, parentId?: number): TaskRow; } type NonNullDateAndPlotMap = { startDate: Date; endDate: Date; plotMap: Map<number, boolean>; }; export {}; //# sourceMappingURL=TaskRow.d.ts.map