| | |
| | | @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 |
| | |
| | | |
| | | public int updateArchiveById(Long id); |
| | | |
| | | |
| | | public int updateStatusByIds(Long [] ids); |
| | | public List<ArchiveRecordSmall> findByIds(ArchiveRecords archiveRecords); |
| | | } |
| | |
| | | */ |
| | | 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); |
| | | |
| | | |
| | |
| | | |
| | | 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 |
| | |
| | | } |
| | | |
| | | @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<>(); |
| | |
| | | } |
| | | |
| | | @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); |
| | |
| | | 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; |
| | | } |
| | |
| | | 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)); |
| | | } |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | */ |
| | |
| | | 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)); |
| | | } |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | */ |
| | |
| | | @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, "添加成功了!"); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | 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)+""); |
| | | } |
| | | /** |
| | | * 删除档案记录 |
| | | */ |
| | |
| | | } |
| | | |
| | | @PostMapping("/upload") |
| | | public AjaxResult uploadFile(MultipartFile file) throws Exception |
| | | public AjaxResult uploadFile(MultipartFile file, Long recordId) throws Exception |
| | | { |
| | | // System.out.println("sdfd9999999999999999999999999999999"); |
| | | try |
| | |
| | | //计算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); |
| | |
| | | } |
| | | //添加07 的pdf |
| | | //pdf目录封面 |
| | | String pdfPathF = "07-卷面封面.pdf"; |
| | | String pdfPathF = "07-案卷封面.pdf"; |
| | | pdfGenerateService.generatePdf(pdfPathF, ids[i]); |
| | | // 2. 压缩PDF到ZIP文件 |
| | | // 添加PDF文件到ZIP |
| | |
| | | } |
| | | |
| | | //excel 卷内封面导出zip |
| | | ZipEntry entryiv = new ZipEntry(fna + adir +"/"+"卷内封面" + ".xls"); |
| | | ZipEntry entryiv = new ZipEntry(fna + adir +"/"+"案卷封面" + ".xls"); |
| | | |
| | | List<ArchiveInfoVo> arsi = new ArrayList<>(); |
| | | arsi.add(aIV); |
| | |
| | | zos = new ZipOutputStream(os); |
| | | |
| | | //pdf目录封面 |
| | | String pdfPathF = "07-卷面封面.pdf"; |
| | | String pdfPathF = "07-案卷封面.pdf"; |
| | | pdfGenerateService.generatePdf(pdfPathF, 55L); |
| | | // 2. 压缩PDF到ZIP文件 |
| | | // 添加PDF文件到ZIP |
| | |
| | | |
| | | |
| | | //excel 卷内封面导出zip |
| | | ZipEntry entryiv = new ZipEntry("卷内封面" + ".xls"); |
| | | ZipEntry entryiv = new ZipEntry("案卷封面" + ".xls"); |
| | | |
| | | List<ArchiveInfoVo> arsi = new ArrayList<>(); |
| | | arsi.add(aIV); |