|
@@ -105,6 +105,12 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
private ApplicationTypeDao applicationTypeDao;
|
|
|
|
|
|
@Autowired
|
|
|
+ private ResourceDao resourceDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ResourceTypeDao resourceTypeDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private FieldDao fieldDao;
|
|
|
|
|
|
@Value("${agency}")
|
|
@@ -996,6 +1002,20 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
return technicalArticlesDTO;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ResourceVO> getTestResource() {
|
|
|
+ List<ResourceVO> resourceVOList = new ArrayList<>();
|
|
|
+ resourceDao.findAll().forEach(resourcePO -> {
|
|
|
+ ResourceVO resourceVO = new ResourceVO();
|
|
|
+ resourceVO.setCode(resourcePO.getCode());
|
|
|
+ Optional<ResourceTypePO> type = resourceTypeDao.findByCode(resourcePO.getType());
|
|
|
+ resourceVO.setType(type.get().getName());
|
|
|
+ resourceVOList.add(resourceVO);
|
|
|
+ });
|
|
|
+ List<ResourceVO> results = resourceVOList.stream().distinct().collect(Collectors.toList());
|
|
|
+ return results;
|
|
|
+ }
|
|
|
+
|
|
|
private ProjectOperationControl initProjectPermission(CrowdTestProject project, User user) {
|
|
|
ProjectOperationControl operationControl = new ProjectOperationControl();
|
|
|
if (user == null)
|