maven
4 天以前 8504878c6fd0f8639a38ef72d8b750fd6f5ebf70
src/main/java/com/ruoyi/inspectiontask/service/impl/InspectionTaskServiceImpl.java
@@ -25,6 +25,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -70,9 +71,9 @@
            return new Page<>(entityPage.getCurrent(), entityPage.getSize(), entityPage.getTotal());
        }
        // 获取id集合
        List<Long> ids = entityPage.getRecords().stream().map(InspectionTask::getId).toList();
        List<Long> ids = entityPage.getRecords().stream().map(InspectionTask::getId).collect(Collectors.toList());
        //登记人ids
        List<Long> registrantIds = entityPage.getRecords().stream().map(InspectionTask::getRegistrantId).toList();
        List<Long> registrantIds = entityPage.getRecords().stream().map(InspectionTask::getRegistrantId).collect(Collectors.toList());
        // 批量查询登记人
        Map<Long, SysUser> sysUserMap;
        if (!registrantIds.isEmpty()) {
@@ -82,7 +83,7 @@
            sysUserMap = new HashMap<>();
        }
        //巡检人ids
        List<String> inspectorIds = entityPage.getRecords().stream().map(InspectionTask::getInspectorId).toList();
        List<String> inspectorIds = entityPage.getRecords().stream().map(InspectionTask::getInspectorId).collect(Collectors.toList());
        //获取所有不重复的用户ID
        Set<Long> allUserIds = entityPage.getRecords().stream()
@@ -151,6 +152,8 @@
                dto.setInspector(inspectorNames);
            }
            dto.setDateStr(inspectionTask.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
            // 初始化三个附件列表
            dto.setBeforeProduction(new ArrayList<>());
            dto.setAfterProduction(new ArrayList<>());