| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SampleTypeDto> selectStandardTreeList2() { |
| | | List<SampleTypeDto> sampleTypeDtos= new ArrayList<>(); |
| | | List<FactoryDto> factoryDtos = standardTreeMapper.selectStandardTreeList(); |
| | | for (FactoryDto factoryDto : factoryDtos) { |
| | | for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) { |
| | | for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) { |
| | | if (sampleTypeDto.getChildren().size() == 0) { |
| | | sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); |
| | | } |
| | | sampleTypeDtos.add(sampleTypeDto); |
| | | } |
| | | } |
| | | } |
| | | return sampleTypeDtos; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardTree(StandardTree standardTree) { |
| | | StandardTree tree = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery() |