chenrui
2025-04-08 9f8f73240c885488fdffc1062826520cf7abb86b
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardTreeServiceImpl.java
@@ -600,9 +600,11 @@
        List<StructureTestObject> testObjects = new ArrayList<>();
        for (FactoryDto factoryDto : list) {
            for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) {
                List<SampleTypeDto> children = laboratoryDto.getChildren();
                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);
@@ -612,6 +614,8 @@
                }
            }
        }
            }
        }
        structureTestObjectService.updateBatchById(testObjects);
        return true;