| | |
| | | public SoftwareTestOrderDto getDto(Long environId, Long projectId) { |
| | | SoftwareTestOrderDto data = new SoftwareTestOrderDto(); |
| | | if (environId != null) { |
| | | data.setId(environId); |
| | | Environ environ = this.get(environId); |
| | | data.setEnviron(environ); |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(environId)); |
| | | |
| | | projectId = environ.getProjectId(); |
| | | List<EnvironSoftwareResources> softwareResourcesList = environSoftwareResourcesService.getList(environId); |
| | |
| | | List<EnvironAnalysis> environAnalysesList = environAnalysisService.getList(environId); |
| | | data.setEnvironAnalysisList(environAnalysesList); |
| | | } else { |
| | | Project project = projectService.get(projectId); |
| | | Environ environ = new Environ(); |
| | | data.setEnviron(environ); |
| | | data.getEnviron().setSoftwareName(project.getSoftwareName()); |
| | | data.getEnviron().setSoftwareIdentity(project.getSoftwareIdentity()); |
| | | data.getEnviron().setProjectId(projectId); |
| | | } |
| | | if (projectId != null) { |
| | | data.setProjectId(projectId); |
| | | data.setProject(projectService.get(projectId)); |
| | | } |
| | | if (data.getTestAgencyInfo() == null) |
| | | data.getEnviron().setAgencyName(testAgencyInfoService.get(10000L).getAgencyName()); |
| | | data.getEnviron().setSite(testAgencyInfoService.get(10000L).getSite()); |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(10000L)); |
| | | |
| | | return data; |
| | | } |
| | |
| | | environAnalysisService.insert(environAnalysis); |
| | | } |
| | | } |
| | | |
| | | if (softwareTestOrderDto.getTestAgencyInfo().getId() == 10000) { |
| | | softwareTestOrderDto.getTestAgencyInfo().setId(environId); |
| | | testAgencyInfoService.insert(softwareTestOrderDto.getTestAgencyInfo()); |
| | | } else { |
| | | testAgencyInfoService.update(softwareTestOrderDto.getTestAgencyInfo()); |
| | | } |
| | | sysOssConfigService.updateOss(softwareTestOrderDto.getId(), softwareTestOrderDto.getFiles());// 保存附件 |
| | | return true; |
| | | } |