zqy
2025-09-26 29b0e06f470cd2ee33fe9dabfa732deab796dab9
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveCategoryServiceImpl.java
@@ -16,6 +16,7 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ArchiveCategory;
import com.ruoyi.domain.ArchiveRecords;
@@ -27,10 +28,11 @@
import com.ruoyi.service.IDocumentMaterialsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
/**
 * 【请填写功能名称】Service业务层处理
 * 【案卷类别信息】Service业务层处理
 *
 * @author ruoyi
 * @date 2025-07-26
@@ -46,20 +48,7 @@
        LambdaQueryWrapper<ArchiveCategory> lqw = new LambdaQueryWrapper<>();
        lqw.like(!StringUtils.isEmpty(archiveRecords.getNumb()), ArchiveCategory::getNumb, archiveRecords.getNumb())
                .like(!StringUtils.isEmpty(archiveRecords.getNname()), ArchiveCategory::getNname, archiveRecords.getNname());
//        lqw.like(!StringUtils.isEmpty(archiveRecords.getProjectName()), ArchiveRecords::getProjectName, archiveRecords.getProjectName())
//                .like(!StringUtils.isEmpty(archiveRecords.getFilingNumber()), ArchiveRecords::getFilingNumber, archiveRecords.getFilingNumber())
//                .like(!StringUtils.isEmpty(archiveRecords.getArchiveRoomNumber()), ArchiveRecords::getArchiveRoomNumber, archiveRecords.getArchiveRoomNumber())
//                .like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId());
//        //                .like(!StringUtils.isEmpty(zfProperty.getLocation()), ZfProperty::getLocation, zfProperty.getLocation())
//                .like(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder())
//                .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress())
//                .like(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark())
//                .eq(zfProperty.getFamilyId()!=null,ZfProperty::getFamilyId,zfProperty.getFamilyId())
//                .in(ZfProperty::getFamilyId,familyIdList)
//                .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime())
//                .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime());
//        lqw.orderByDesc(ZfProperty::getCreateTime);
        // lqw.orderByDesc(ArchiveRecords::isOwnData);
        lqw.orderByDesc(ArchiveCategory::getCtime);
        System.out.println("ssssssssssssddd0000000000000000");
        return lqw;
@@ -190,5 +179,25 @@
        return 0;
    }
    @Override
    public AjaxResult importExcel(MultipartFile file) {
        ExcelUtil<ArchiveCategory> util = new ExcelUtil<>(ArchiveCategory.class);
        List<ArchiveCategory> dataList = null;
        try {
            dataList = util.importExcel(file.getInputStream());
        } catch (Exception e) {
            throw new RuntimeException("没有按照规则导入数据");
        }
        assert dataList != null;
        for (ArchiveCategory archiveCategory : dataList) {
            // physcialService.mySave(physcial);
            this.insertArchiveCategory(archiveCategory);
        }
        return AjaxResult.success();
    }
}