| | |
| | | List<StructureTestObject> testObjects = new ArrayList<>(); |
| | | for (FactoryDto factoryDto : list) { |
| | | for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) { |
| | | List<SampleTypeDto> children = laboratoryDto.getChildren(); |
| | | int sort = 0; |
| | | // 循环第三层 |
| | | for (SampleTypeDto child : children) { |
| | | StructureTestObject structureTestObject = new StructureTestObject(); |
| | | structureTestObject.setSort(sort); |
| | | structureTestObject.setId(child.getSampleTypeId()); |
| | | testObjects.add(structureTestObject); |
| | | sort++; |
| | | for (ObjectTypeDto objectTypeDto : laboratoryDto.getChildren()) { |
| | | for (WorkShopNameDto workShopNameDto:objectTypeDto.getChildren()) { |
| | | List<SampleTypeDto> children = workShopNameDto.getChildren(); |
| | | int sort = 0; |
| | | |
| | | for (SampleTypeDto child : children) { |
| | | StructureTestObject structureTestObject = new StructureTestObject(); |
| | | structureTestObject.setSort(sort); |
| | | structureTestObject.setId(child.getSampleTypeId()); |
| | | testObjects.add(structureTestObject); |
| | | sort++; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |