...
|
...
|
@@ -365,7 +365,7 @@ func (rs *EvaluationProjectService) Remove(in *command.DeleteProjectCommand) (in |
|
|
projectRepository := factory.CreateEvaluationProjectRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
taskRepository := factory.CreateNodeTaskRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
staffRepository := factory.CreateStaffAssessTaskRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
|
|
|
summaryRepository := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
project, err := projectRepository.FindOne(map[string]interface{}{"id": in.Id})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
...
|
...
|
@@ -378,7 +378,10 @@ func (rs *EvaluationProjectService) Remove(in *command.DeleteProjectCommand) (in |
|
|
if err := staffRepository.RemoveByProjectId(int(project.Id)); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 删除项目已生成的周期评估数据
|
|
|
if err := summaryRepository.RemoveByProjectId(int(project.Id)); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
// 移除项目关联的所有定时任务
|
|
|
tasks, err := taskRepository.Find(map[string]interface{}{"projectId": project.Id})
|
|
|
if err != nil {
|
...
|
...
|
|