fei
18 小时以前 cb703ae5b5afdd4a7d614a948ee4d4c457b77185
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveAnnotationServiceImpl.java
@@ -7,12 +7,16 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ArchiveAnnotation;
import com.ruoyi.domain.ArchivePlaceName;
import com.ruoyi.domain.ArchiveRecords;
import com.ruoyi.domain.ArchiveSignature;
import com.ruoyi.mapper.ArchiveAnnotationMapper;
import com.ruoyi.service.IArchiveAnnotationService;
import com.ruoyi.util.ErrorcodeExceptionextends;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDateTime;
import java.time.ZoneId;
@@ -41,6 +45,44 @@
    }
    @Override
    public List<ArchiveAnnotation> selectArchiveRecordsByIds(Long[] ids) {
        // 创建查询条件
        LambdaQueryWrapper<ArchiveAnnotation> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        // 根据ids查询
        lambdaQueryWrapper.in(ArchiveAnnotation::getId, Arrays.asList(ids));
        // 如果不是管理员,需要考虑权限过滤(可根据实际权限需求调整)
//        if (userid != 1) {
//            // 这里可以添加权限相关的过滤条件
//        }
        List<ArchiveAnnotation> beanRecords = list(lambdaQueryWrapper);
        return beanRecords;
    }
    @Override
    public AjaxResult importExcel(MultipartFile file) {
        ExcelUtil<ArchiveAnnotation> util = new ExcelUtil<>(ArchiveAnnotation.class);
        List<ArchiveAnnotation> dataList = null;
        try {
            dataList = util.importExcel(file.getInputStream());
        } catch (Exception e) {
            throw new RuntimeException("没有按照规则导入数据");
        }
        assert dataList != null;
        for (ArchiveAnnotation archiveAnnotation : dataList) {
            // physcialService.mySave(physcial);
            this.insertArchiveAnnotation(archiveAnnotation);
        }
        return AjaxResult.success();
    }
    @Override
    public AjaxResult selectArchiveAnnotationList(ArchiveAnnotation archiveAnnotation, Integer pageNum, Integer pageSize) {
        LambdaQueryWrapper<ArchiveAnnotation> lqw = buildCondition(archiveAnnotation);
@@ -63,7 +105,10 @@
    @Override
    public List<ArchiveAnnotation> selectArchiveAnnoList(ArchiveAnnotation archiveAnnotation) {
        return Collections.emptyList();
        LambdaQueryWrapper<ArchiveAnnotation> lqw = new LambdaQueryWrapper<>();
        LambdaQueryWrapper<ArchiveAnnotation> lambdaQueryWrapper = buildCondition(archiveAnnotation);
        List<ArchiveAnnotation> beanRecords = list(lambdaQueryWrapper);
        return beanRecords;
    }
    @Override