public override void Finish(TaskWorkStatus status, TaskWork task) { using (var scope = new TransactionScope()) { switch (status) { case TaskWorkStatus.K2ProcessApproved: ProjectInfo.FinishNode(this.ProjectId, FlowCode.Closure_WOCheckList, NodeCode.Closure_WOCheckList_Approve, ProjectStatus.Finished); //ProjectInfo.UpdateProjectStatus(this.ProjectId, FlowCode.Closure_WOCheckList, ProjectStatus.Finished); //如果是从ClosurePackage Edit之后撤回Task的,添加ClosurePackage的Task if (TaskWork.Count(i => i.RefID == task.RefID && i.TypeCode == FlowCode.Closure_ClosurePackage && i.Status == TaskWorkStatus.Cancel) > 0) { if (ProjectInfo.Any(e => e.ProjectId == task.RefID && e.Status == ProjectStatus.Finished && e.FlowCode == FlowCode.Closure_LegalReview)) { var package = new ClosurePackage(); package.GeneratePackageTask(task.RefID); } } //如果是从ExecutiveSummary Edit之后撤回Task的,添加ExecutiveSummary的Task else if (TaskWork.Count(i => i.RefID == task.RefID && i.TypeCode == FlowCode.Closure_ExecutiveSummary && i.Status == TaskWorkStatus.Cancel) > 0) { var executiveSummary = new ClosureExecutiveSummary(); executiveSummary.GenerateExecutiveSummaryTask(task.RefID); } break; } scope.Complete(); } }
public override void Finish(TaskWorkStatus status, TaskWork task) { switch (status) { case TaskWorkStatus.K2ProcessApproved: ProjectInfo.FinishNode(this.ProjectId, FlowCode.Closure_LegalReview, NodeCode.Closure_LegalReview_LegalConfirm, ProjectStatus.Finished); //ProjectInfo.UpdateProjectStatus(this.ProjectId, FlowCode.Closure_LegalReview, ProjectStatus.Finished); if (ProjectInfo.Any(e => e.ProjectId == ProjectId && e.Status == ProjectStatus.Finished && e.FlowCode == FlowCode.Closure_ExecutiveSummary)) { var package = new ClosurePackage(); package.GeneratePackageTask(ProjectId); package.GeneratePackage(ProjectId); } break; } }
public override void Finish(TaskWorkStatus status, TaskWork task) { using (var scope = new TransactionScope()) { switch (status) { case TaskWorkStatus.K2ProcessApproved: ProjectInfo.FinishNode(this.ProjectId, FlowCode.Closure_ExecutiveSummary, NodeCode.Closure_ExecutiveSummary_Generate, ProjectStatus.Finished); if (ProjectInfo.Any(e => e.ProjectId == ProjectId && e.Status == ProjectStatus.Finished && e.FlowCode == FlowCode.Closure_LegalReview)) { var package = new ClosurePackage(); package.GeneratePackageTask(ProjectId); package.GeneratePackage(ProjectId); } break; } scope.Complete(); } }