|
|
@@ -28,6 +28,7 @@ import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; |
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
|
import com.ningdatech.pmapi.projectlib.handle.ProcessExecuteChainHandle; |
|
|
|
import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.dto.ProjectApplicationDTO; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; |
|
|
@@ -312,20 +313,19 @@ public class ProjectLibManage { |
|
|
|
.eq(Project::getProjectCode,project.getProjectCode())); |
|
|
|
|
|
|
|
//继承它的app |
|
|
|
List<ProjectApplication> apps = projectApplicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectId, oldProject.getId())); |
|
|
|
if(CollUtil.isNotEmpty(apps)){ |
|
|
|
List<ProjectApplication> newApps = apps.stream() |
|
|
|
List<ProjectApplicationDTO> applicationList = projecDto.getApplicationList(); |
|
|
|
if(CollUtil.isNotEmpty(applicationList)){ |
|
|
|
List<ProjectApplication> apps = applicationList.stream() |
|
|
|
.map(a -> { |
|
|
|
a.setProjectId(project.getId()); |
|
|
|
return a; |
|
|
|
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); |
|
|
|
app.setProjectId(project.getId()); |
|
|
|
return app; |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
projectApplicationService.saveBatch(newApps); |
|
|
|
projectApplicationService.saveBatch(apps); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return project; |
|
|
|
} |
|
|
|
|
|
|
|