fei
2025-09-22 0fdd6b6113fe6e120ca5731fbab562f56eca8ae5
新增了代码
10个文件已修改
83 ■■■■ 已修改文件
archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/IArchiveRecordsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/IDocumentMaterialsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchivePlaceNameController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveProjectNameController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/archiveAllExportController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
@@ -14,8 +14,8 @@
@Mapper
public interface DocumentMaterialsMapper extends BaseMapper<DocumentMaterials> {
    @Select("update document_materials SET url = #{url},size_type=#{sizeType}, file_number=#{fileNumber},page_order=#{pageOrder},width=#{width},height=#{height},horizontal_resolution=#{horizontalResolution},vertical_resolution=#{verticalResolution},file_size=#{fileSize}, format=#{format} where page_number = #{pageNumber}")
    Long updateInfoByPageNumber(@Param("pageNumber") Long pageNumber,@Param("sizeType") String sizeType, @Param("fileNumber") Long fileNumber,@Param("pageOrder") Long pageOrder,@Param("width") int width, @Param("height") int height,  @Param("horizontalResolution") int horizontalResolution, @Param("verticalResolution") int verticalResolution, @Param("fileSize") Double fileSize,@Param("url")  String url,@Param("format")  String format);
    @Select("update document_materials SET url = #{url},size_type=#{sizeType}, file_number=#{fileNumber},page_order=#{pageOrder},width=#{width},height=#{height},horizontal_resolution=#{horizontalResolution},vertical_resolution=#{verticalResolution},file_size=#{fileSize}, format=#{format} where page_number = #{pageNumber} and record_id=#{recordId}")
    Long updateInfoByPageNumber(@Param("pageNumber") Long pageNumber,@Param("sizeType") String sizeType, @Param("fileNumber") Long fileNumber,@Param("pageOrder") Long pageOrder,@Param("width") int width, @Param("height") int height,  @Param("horizontalResolution") int horizontalResolution, @Param("verticalResolution") int verticalResolution, @Param("fileSize") Double fileSize,@Param("url")  String url,@Param("format")  String format, @Param("recordId") Long recordId);
    //根据题名拿到最大的pageOrder
archiveManager/src/main/java/com/ruoyi/service/IArchiveRecordsService.java
@@ -86,6 +86,6 @@
    public int updateArchiveById(Long id);
    public int updateStatusByIds(Long [] ids);
    public List<ArchiveRecordSmall> findByIds(ArchiveRecords archiveRecords);
}
archiveManager/src/main/java/com/ruoyi/service/IDocumentMaterialsService.java
@@ -65,7 +65,7 @@
     */
    public int deleteDocumentMaterialsByMaterialId(String materialId);
    public Long getFiNum(Long pageNumber);
    public int updateByPageNumber(Long pageNumber,String sizeType, Long fileNumber, int wid, int hei, int wdpi, int hdpi, double sz,String url,String format);
    public int updateByPageNumber(Long pageNumber,String sizeType, Long fileNumber, int wid, int hei, int wdpi, int hdpi, double sz,String url,String format, Long recordId);
    public List<DocumentMaterialsVo> findArchMInfo(String recordId);
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -179,11 +179,21 @@
        Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
        archiveRecords.setCreateTime(date);
        System.out.println(archiveRecords.getRecordId());
        //根据档号查询,是否已经有档号,有的话,就不让插入
        LambdaQueryWrapper<ArchiveRecords> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId,
                archiveRecords.getRecordId());
        List<ArchiveRecords> lis = list(lambdaQueryWrapper);
        if(!lis.isEmpty())
        {
            return 0;
        }
        archiveRecords.setRecordStatus("未录入");
      //  archiveRecords
        boolean res = this.save(archiveRecords);
        //0表示失败,1表示成功
        if(res)
            return 1;
        else
@@ -273,6 +283,13 @@
    }
    @Override
    public int updateStatusByIds(Long[] ids) {
        for(Long id : ids)
            this.baseMapper.updateStatusById(id);
        return 0;
    }
    @Override
    public List<ArchiveRecordSmall> findByIds(ArchiveRecords archiveRecords) {
        LambdaQueryWrapper<ArchiveRecords> lqw = new LambdaQueryWrapper<>();
archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java
@@ -168,7 +168,7 @@
    }
    @Override
    public int updateByPageNumber(Long pageNumber, String sizeType, Long fileNumber, int width, int height, int horizontalResolution, int verticalResolution, double fileSize, String url, String format) {
    public int updateByPageNumber(Long pageNumber, String sizeType, Long fileNumber, int width, int height, int horizontalResolution, int verticalResolution, double fileSize, String url, String format, Long recordId) {
        //根据pageNumber拿到title,然后计算pageOrder
        LambdaQueryWrapper<DocumentMaterials> lqw = new LambdaQueryWrapper<>();
        lqw.eq(pageNumber!=null, DocumentMaterials::getPageNumber, pageNumber);
@@ -183,7 +183,7 @@
                pageOrder = maxPOrder + 1;
        }
        this.baseMapper.updateInfoByPageNumber(pageNumber, sizeType,fileNumber,pageOrder, width, height, horizontalResolution, verticalResolution, fileSize, url,format);
        this.baseMapper.updateInfoByPageNumber(pageNumber, sizeType,fileNumber,pageOrder, width, height, horizontalResolution, verticalResolution, fileSize, url,format, recordId);
        return 0;
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchivePlaceNameController.java
@@ -51,7 +51,13 @@
        return archivePlaceNameService.selectDataList(archivePlaceName, pageNum, pageSize);
    }
    @PreAuthorize("@ss.hasPermi('system:placeName:list')")
    @GetMapping("/listAll")
    public AjaxResult getAllPlaceName()
    {
        ArchivePlaceName archivePlaceName = new ArchivePlaceName();
        return success(archivePlaceNameService.selectArchivePlaceNameList(archivePlaceName));
    }
    /**
     * 导出【请填写功能名称】列表
     */
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveProjectNameController.java
@@ -51,7 +51,13 @@
        return archiveProjectNameService.selectDataList(archiveProjectName, pageNum, pageSize);
    }
    @PreAuthorize("@ss.hasPermi('system:projectName:list')")
    @GetMapping("/listAll")
    public AjaxResult getAllProjectName()
    {
        ArchiveProjectName archivePlaceName = new ArchiveProjectName();
        return success(archiveProjectNameService.selectArchiveProjectNameList(archivePlaceName));
    }
    /**
     * 导出【请填写功能名称】列表
     */
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
@@ -121,7 +121,17 @@
    @PostMapping
    public AjaxResult add(@RequestBody ArchiveRecords archiveRecords)
    {
        return toAjax(archiveRecordsService.insertArchiveRecords(archiveRecords));
        int res = archiveRecordsService.insertArchiveRecords(archiveRecords);
        System.out.println(res);
        if(res==0) {
            System.out.println(res);
            return new AjaxResult(0, "档案号已经存在了!");
        }
        else
            return new AjaxResult(200, "添加成功了!");
    }
    /**
@@ -134,7 +144,15 @@
    {
        return toAjax(archiveRecordsService.updateArchiveRecords(archiveRecords));
    }
    @PreAuthorize("@ss.hasPermi('system:records:edit')")
    @Log(title = "档案记录", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/updateSByIds")
    public AjaxResult updateStatusByIds(@RequestBody Long[] ids)
    {
        System.out.println(ids);
        System.out.println("090sdfsdf");
        return new AjaxResult(0, archiveRecordsService.updateStatusByIds(ids)+"");
    }
    /**
     * 删除档案记录
     */
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java
@@ -144,7 +144,7 @@
    }
    @PostMapping("/upload")
    public AjaxResult uploadFile(MultipartFile file) throws Exception
    public AjaxResult uploadFile(MultipartFile file, Long recordId) throws Exception
    {
        // System.out.println("sdfd9999999999999999999999999999999");
        try
@@ -185,7 +185,7 @@
            //计算sizeType
            String sizeType = getPageSize(wid*hei);
            //插入数据库对应的url当中
            documentMaterialsService.updateByPageNumber(nam, sizeType, fileNumber,wid, hei,wdpi, hdpi,  sz, fileName, pname);
            documentMaterialsService.updateByPageNumber(nam, sizeType, fileNumber,wid, hei,wdpi, hdpi,  sz, fileName, pname, recordId);
//            System.out.println(url);
//            System.out.println(fileName);
            ajax.put("fileName", fileName);
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/archiveAllExportController.java
@@ -206,7 +206,7 @@
                }
                //添加07  的pdf
                //pdf目录封面
                String pdfPathF = "07-卷面封面.pdf";
                String pdfPathF = "07-案卷封面.pdf";
                pdfGenerateService.generatePdf(pdfPathF, ids[i]);
                // 2. 压缩PDF到ZIP文件
                // 添加PDF文件到ZIP
@@ -257,7 +257,7 @@
                }
                //excel 卷内封面导出zip
                ZipEntry entryiv = new ZipEntry(fna + adir +"/"+"卷内封面" + ".xls");
                ZipEntry entryiv = new ZipEntry(fna + adir +"/"+"案卷封面" + ".xls");
                List<ArchiveInfoVo> arsi = new ArrayList<>();
                arsi.add(aIV);
@@ -525,7 +525,7 @@
            zos = new ZipOutputStream(os);
            //pdf目录封面
            String pdfPathF = "07-卷面封面.pdf";
            String pdfPathF = "07-案卷封面.pdf";
            pdfGenerateService.generatePdf(pdfPathF, 55L);
            // 2. 压缩PDF到ZIP文件
                // 添加PDF文件到ZIP
@@ -576,7 +576,7 @@
                //excel 卷内封面导出zip
            ZipEntry entryiv = new ZipEntry("卷内封面" + ".xls");
            ZipEntry entryiv = new ZipEntry("案卷封面" + ".xls");
            List<ArchiveInfoVo> arsi = new ArrayList<>();
            arsi.add(aIV);