| | |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getCompanyName() { |
| | | return companyName; |
| | | } |
| | | |
| | | public void setCompanyName(String companyName) { |
| | | this.companyName = companyName; |
| | | } |
| | | |
| | | public String getCreatePerson() { |
| | | return createPerson; |
| | | } |
| | | |
| | | public void setCreatePerson(String createPerson) { |
| | | this.createPerson = createPerson; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | |
| | | package com.ruoyi.domain.vo; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AnalysisResult { |
| | | |
| | | @Excel(name = "项目名称") |
| | | private String everyProjectName; |
| | | @Excel(name = "项目内案卷总数") |
| | | |
| | | private Long cnt ; |
| | | @Excel(name = "未完成案卷数") |
| | | |
| | | private Long unfinished; |
| | | @Excel(name = "完成案卷数") |
| | | |
| | | private Long finished; |
| | | } |
New file |
| | |
| | | package com.ruoyi.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.annotation.NumberFormatHandler; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | public class DocumentMaterialFileSmallVo { |
| | | |
| | | |
| | | |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "编任者") |
| | | private String creator; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "文件题名") |
| | | private String title; |
| | | |
| | | /** $column.columnComment */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date date; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "页号", handler = NumberFormatHandler.class) |
| | | private Long pageNumber; |
| | | |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "所处阶段") |
| | | private String stage; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "公开属性") |
| | | private String publicity; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否为附件附图") |
| | | private String isAttachment; |
| | | |
| | | /** $column.columnComment */ |
| | | // @Excel(name = "是否为附图") |
| | | private String isDiagram; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "保管期限") |
| | | private String retentionPeriod; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "密级") |
| | | private String securityLevel; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否涉密及敏感信息") |
| | | private String isSensitive; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否注销") |
| | | private String isCanceled; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.domain.vo; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class RecordToUserCount { |
| | | private Long userId; |
| | | @Excel(name = "用户名称") |
| | | private String userName; |
| | | @Excel(name = "被分配案卷总数") |
| | | private Long cnt; |
| | | |
| | | @Excel(name = "完成案卷数") |
| | | private Long swlr; |
| | | |
| | | @Excel(name = "未完成案卷数") |
| | | private Long ylr; |
| | | } |
| | |
| | | |
| | | @Select({ |
| | | "<script>", |
| | | "SELECT distinct c.*,a.archive_records_id, if(a.user_id=#{userId}, TRUE, FALSE) as tst FROM archiverecordstouser a inner join sys_user b ON a.user_id = b.user_id right join archive_records c on c.record_id=a.archive_records_id ${ew.customSqlSegment} ", |
| | | "SELECT distinct c.*,a.archive_records_id, if(a.user_id=#{userId}, TRUE, FALSE) as tst,b.user_id FROM archiverecordstouser a inner join sys_user b ON a.user_id = b.user_id right join archive_records c on c.record_id=a.archive_records_id ${ew.customSqlSegment} ", |
| | | "<if test= \"userId !=1 \">", |
| | | "order by tst desc", |
| | | "</if>", |
| | |
| | | Page<RecordToUserCount> selectRecordToUserPage(Page<RecordToUserCount> page, @Param("ew") LambdaQueryWrapper<RecordToUserCount> queryWrapper); |
| | | |
| | | |
| | | @Select("select ad.user_id, user_name, count(*) as cnt, (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.record_id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" + |
| | | " record_status='未录入') as swlr,(select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.record_id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" + |
| | | " record_status='录入完成') as ylr from archiverecordstouser as ad, sys_user as sy,archive_records as ard where ad.user_id=sy.user_id and ard.record_id=ad.archive_records_id group by user_id, user_name\n" + |
| | | " ") |
| | | List<RecordToUserCount> selectRecordToUserAll(); |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArchiveCategoryById(Long id); |
| | | |
| | | public AjaxResult importExcel(MultipartFile file); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchivePlaceName; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArchivePlaceNameById(Long id); |
| | | |
| | | public AjaxResult importExcel(MultipartFile file); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ArchivePlaceName; |
| | | import com.ruoyi.domain.ArchiveProjectName; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArchiveProjectNameById(Long id); |
| | | public AjaxResult importExcel(MultipartFile file); |
| | | } |
| | |
| | | |
| | | |
| | | public AjaxResult countStatistic(String username, int pageNum, int pageSize); |
| | | |
| | | |
| | | public List<RecordToUserCount> findAllRecordToUserCont(); |
| | | } |
| | |
| | | import com.ruoyi.domain.vo.DocumentMaterialsVo; |
| | | import com.ruoyi.domain.vo.DocumentMaterialsVoLarge; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | |
| | | public List<DocumentMaterialFileStyle> findFileStyleInfo(@Param("recordId") int recordId); |
| | | |
| | | public AjaxResult importExcel(MultipartFile file, String recordId); |
| | | } |
| | |
| | | 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; |
| | |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | |
| | | /** |
| | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchivePlaceName; |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.ruoyi.mapper.ArchivePlaceNameMapper; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | @Service |
| | | public class ArchivePlaceNameServiceImpl extends ServiceImpl<ArchivePlaceNameMapper, ArchivePlaceName> implements IArchivePlaceNameService { |
| | | private LambdaQueryWrapper<ArchivePlaceName> buildCondition(ArchivePlaceName archivePlaceName){ |
| | |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | | ExcelUtil<ArchivePlaceName> util = new ExcelUtil<>(ArchivePlaceName.class); |
| | | List<ArchivePlaceName> dataList = null; |
| | | try { |
| | | dataList = util.importExcel(file.getInputStream()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("没有按照规则导入数据"); |
| | | } |
| | | |
| | | assert dataList != null; |
| | | |
| | | for (ArchivePlaceName archiveCategory : dataList) { |
| | | // physcialService.mySave(physcial); |
| | | this.insertArchivePlaceName(archiveCategory); |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | |
| | | 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.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchivePlaceName; |
| | | import com.ruoyi.domain.ArchiveProjectName; |
| | |
| | | import com.ruoyi.mapper.ArchiveProjectNameMapper; |
| | | import com.ruoyi.service.IArchiveProjectNameService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | |
| | | // return markOwnData(familyId, fatherFaId, motherFaId, beanRecords); |
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords); |
| | | |
| | | |
| | | System.out.println(data); |
| | | return AjaxResult.success(data); |
| | | } |
| | | |
| | |
| | | public int deleteArchiveProjectNameById(Long id) { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | | ExcelUtil<ArchiveProjectName> util = new ExcelUtil<>(ArchiveProjectName.class); |
| | | List<ArchiveProjectName> dataList = null; |
| | | try { |
| | | dataList = util.importExcel(file.getInputStream()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("没有按照规则导入数据"); |
| | | } |
| | | |
| | | assert dataList != null; |
| | | |
| | | for (ArchiveProjectName archiveCategory : dataList) { |
| | | // physcialService.mySave(physcial); |
| | | this.insertArchiveProjectName(archiveCategory); |
| | | } |
| | | |
| | | return AjaxResult.success(); } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<Archiverecordstouser> selectArchiverecordstouserList(Archiverecordstouser archiverecordstouser) { |
| | | return null; |
| | | return this.list(); |
| | | } |
| | | |
| | | /** |
| | |
| | | return AjaxResult.success(data); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<RecordToUserCount> findAllRecordToUserCont() { |
| | | return this.baseMapper.selectRecordToUserAll(); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import com.ruoyi.domain.vo.DocumentMaterialFileSmallVo; |
| | | import com.ruoyi.domain.vo.DocumentMaterialFileStyle; |
| | | import com.ruoyi.domain.vo.DocumentMaterialsVo; |
| | | import com.ruoyi.domain.vo.DocumentMaterialsVoLarge; |
| | |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import com.ruoyi.util.ErrorcodeExceptionextends; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | |
| | | public List<DocumentMaterialFileStyle> findFileStyleInfo(int recordId) { |
| | | return this.baseMapper.getFileStyleInfo(recordId); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult importExcel(MultipartFile file, String recordId) { |
| | | ExcelUtil<DocumentMaterialFileSmallVo> util = new ExcelUtil<>(DocumentMaterialFileSmallVo.class); |
| | | List<DocumentMaterialFileSmallVo> dataList = null; |
| | | try { |
| | | dataList = util.importExcel(file.getInputStream()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("没有按照规则导入数据"); |
| | | } |
| | | |
| | | assert dataList != null; |
| | | |
| | | for (DocumentMaterialFileSmallVo archiveCategory : dataList) { |
| | | // physcialService.mySave(physcial); |
| | | DocumentMaterials documentMaterials = new DocumentMaterials(); |
| | | BeanUtils.copyProperties(archiveCategory, documentMaterials); |
| | | documentMaterials.setRecordId(Long.parseLong(recordId)); |
| | | this.insertDocumentMaterials(documentMaterials); |
| | | } |
| | | |
| | | return AjaxResult.success(); } |
| | | } |
| | |
| | | |
| | | // 创建PDF文档 |
| | | List<DocumentMaterialFileStyle> dmfs = documentMaterialsService.findFileStyleInfo(Math.toIntExact(id)); |
| | | if(dmfs.isEmpty()) |
| | | return; |
| | | |
| | | |
| | | System.out.println(dmfs); |
| | | PdfWriter.getInstance(document, new FileOutputStream("09-备考表"+".pdf")); |
| | | document.open(); |
| | | // 设置中文字体 |
| | |
| | | Paragraph recordInfo = new Paragraph("卷号:" + volumeNumber, chineseFont); |
| | | recordInfo.setAlignment(Element.ALIGN_RIGHT); |
| | | document.add(recordInfo); |
| | | int allCnt = dmfs.get(0).getCnt() + dmfs.get(1).getCnt() + dmfs.get(2).getCnt(); |
| | | int pcc = dmfs.size()<=1?0: dmfs.get(1).getCnt(); |
| | | int oth = dmfs.size()<=2?0: dmfs.get(2).getCnt(); |
| | | int allCnt = dmfs.get(0).getCnt() + pcc + oth; |
| | | document.add(new Paragraph(" 本 案 卷 共 有 文 件 材 料 " + allCnt + " 页"+",其中:文字材料 " + |
| | | dmfs.get(1).getCnt() + " 页"+",图样材料 " + dmfs.get(2).getCnt() + " 页"+",照片 " + dmfs.get(0).getCnt() + " 张", chineseFont)); |
| | | pcc + " 页"+",图样材料 " + oth + " 页"+",照片 " + dmfs.get(0).getCnt() + " 张", chineseFont)); |
| | | |
| | | |
| | | document.add(new Paragraph("说明: ", chineseFont)); |
| | |
| | | package com.ruoyi.web.controller.archive; |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | import com.ruoyi.service.IArchiveCategoryService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | |
| | | { |
| | | return toAjax(archiveCategoryService.deleteArchiveCategoryByIds(ids)); |
| | | } |
| | | |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('system:records:edit')") |
| | | @Log(title = "档案类别记录导入", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(@RequestParam("file") MultipartFile file) throws Exception |
| | | { |
| | | System.out.println(file); |
| | | return archiveCategoryService.importExcel(file); |
| | | } |
| | | |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ArchiveCategory> list = Collections.singletonList(new ArchiveCategory()); |
| | | ExcelUtil<ArchiveCategory> util = new ExcelUtil<>(ArchiveCategory.class); |
| | | util.exportExcel(response,list,"档案类别导入模板"); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchivePlaceName; |
| | | import com.ruoyi.service.IArchivePlaceNameService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | |
| | | { |
| | | return toAjax(archivePlaceNameService.deleteArchivePlaceNameByIds(ids)); |
| | | } |
| | | |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ArchivePlaceName> list = Collections.singletonList(new ArchivePlaceName()); |
| | | ExcelUtil<ArchivePlaceName> util = new ExcelUtil<>(ArchivePlaceName.class); |
| | | util.exportExcel(response,list,"地区信息导入模板"); |
| | | } |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('system:records:edit')") |
| | | @Log(title = "档案类别记录导入", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(@RequestParam("file") MultipartFile file) throws Exception |
| | | { |
| | | System.out.println(file); |
| | | return archivePlaceNameService.importExcel(file); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | import com.ruoyi.service.IArchiveProjectNameService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | |
| | | { |
| | | return toAjax(archiveProjectNameService.deleteArchiveProjectNameByIds(ids)); |
| | | } |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ArchiveProjectName> list = Collections.singletonList(new ArchiveProjectName()); |
| | | ExcelUtil<ArchiveProjectName> util = new ExcelUtil<>(ArchiveProjectName.class); |
| | | util.exportExcel(response,list,"案卷项目导入模板"); |
| | | } |
| | | |
| | | @Log(title = "档案类别记录导入", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(@RequestParam("file") MultipartFile file) throws Exception |
| | | { |
| | | System.out.println(file); |
| | | return archiveProjectNameService.importExcel(file); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.utils.file.FileUploadUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.vo.AnalysisResult; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | return new AjaxResult(200, "查询成功", archiveRecordsService.statisticAya()); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:records:export')") |
| | | @Log(title = "档案分析结果导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportAllStatis") |
| | | public void exportAllStatis(HttpServletResponse response) |
| | | { |
| | | List<AnalysisResult> list = archiveRecordsService.statisticAya(); |
| | | ExcelUtil<AnalysisResult> util = new ExcelUtil<AnalysisResult>(AnalysisResult.class); |
| | | util.exportExcel(response, list, "档案分析结果"); |
| | | } |
| | | |
| | | /** |
| | | * 查询档案记录列表 |
| | |
| | | import com.ruoyi.common.utils.file.FileUploadUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.domain.vo.RecordToUserCount; |
| | | import com.ruoyi.service.IArchiverecordstouserService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return archiverecordstouserService.countStatistic(userName,pageNum, pageSize); |
| | | |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:list')") |
| | | @PostMapping("/exportArToUser") |
| | | public void exportArToUser(HttpServletResponse response) |
| | | { |
| | | // archiverecordstouserService.countStatistic() |
| | | List<RecordToUserCount> list = archiverecordstouserService.findAllRecordToUserCont(); |
| | | ExcelUtil<RecordToUserCount> util = new ExcelUtil<RecordToUserCount>(RecordToUserCount.class); |
| | | util.exportExcel(response, list, "导出统计信息"); |
| | | } |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | */ |
| | |
| | | |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.file.FileUploadUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import com.ruoyi.domain.vo.DocumentMaterialFileSmallVo; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; |
| | |
| | | import org.apache.commons.imaging.Imaging; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | return AjaxResult.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Log(title = "档案详细信息记录导入", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(@RequestParam("file") MultipartFile file, @RequestParam("recordId")String recordId) throws Exception |
| | | { |
| | | System.out.println(file); |
| | | return documentMaterialsService.importExcel(file, recordId); |
| | | } |
| | | |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<DocumentMaterialFileSmallVo> list = Collections.singletonList(new DocumentMaterialFileSmallVo()); |
| | | ExcelUtil<DocumentMaterialFileSmallVo> util = new ExcelUtil<>(DocumentMaterialFileSmallVo.class); |
| | | util.exportExcel(response,list,"档案详细信息导入模板"); |
| | | } |
| | | } |
| | |
| | | zos.write(buffer, 0, len); |
| | | } |
| | | } |
| | | |
| | | //08-卷内卷内目录的pdf |
| | | String pdf08Path= "08-卷内目录.pdf"; |
| | | List<DocumentMaterialsVo> list3 = dsvs; |
| | | if(list3.size()>0) { |
| | | pdfGenerateService.generateFileDirectoryPdf(pdf08Path, list3); |
| | | ZipEntry zipEntry3 = new ZipEntry(fna + adir +"/"+pdf08Path); |
| | | zos.putNextEntry(zipEntry3); |
| | | |
| | | // 读取PDF文件内容并写入ZIP |
| | | try (FileInputStream fis = new FileInputStream(pdf08Path)) { |
| | | byte[] buffer = new byte[1024]; |
| | | int len; |
| | | while ((len = fis.read(buffer)) > 0) { |
| | | zos.write(buffer, 0, len); |
| | | } |
| | | } |
| | | } |
| | | //09-备考表.pdf |
| | | String pdf09Path = "09-备考表.pdf"; |
| | | pdfGenerateService.generateFileStyleInfo(pdf09Path, aIV.getRecordId(), ids[i]); |
| | | // 2. 压缩PDF到ZIP文件 |
| | | // 添加PDF文件到ZIP |
| | | ZipEntry zipEntry4 = new ZipEntry(fna + adir +"/"+pdf09Path); |
| | | zos.putNextEntry(zipEntry4); |
| | | |
| | | // 读取PDF文件内容并写入ZIP |
| | | try (FileInputStream fis = new FileInputStream(pdf09Path)) { |
| | | byte[] buffer = new byte[1024]; |
| | | int len; |
| | | while ((len = fis.read(buffer)) > 0) { |
| | | zos.write(buffer, 0, len); |
| | | } |
| | | } |
| | | |
| | | //excel 卷内封面导出zip |
| | | ZipEntry entryiv = new ZipEntry(fna + adir +"/"+"卷内封面" + ".xls"); |
| | | |
| | | List<ArchiveInfoVo> arsi = new ArrayList<>(); |
| | | arsi.add(aIV); |
| | | |
| | | String recordId1 = aIV.getRecordId(); |
| | | byte[] imgr1 = barcodeService.generateBarcodeImage(recordId1); |
| | | byte[] sedcode = pdfGenerateService.createQrCodeN(recordId1, 30, 30); |
| | | ExcelExp e3 = new ExcelExp("案卷封面数据",arsi, ArchiveInfoVo.class); |
| | | ExcelExp e4 = new ExcelExp("案卷封面", arsi, recordId1, imgr1,sedcode, ArchiveInfoVo.class); |
| | | List<ExcelExp> mysheet1 = new ArrayList<ExcelExp>(); |
| | | mysheet1.add(e3); |
| | | mysheet1.add(e4); |
| | | ByteOutputStream bos2 = new ByteOutputStream(); |
| | | ExcelUtilManySheetSecond<List<ExcelExp>> util3 = new ExcelUtilManySheetSecond<List<ExcelExp>>(mysheet1); |
| | | |
| | | util3.exportExcelManySheet(bos2, mysheet1); |
| | | |
| | | // System.out.println(bos2); |
| | | zos.putNextEntry(entryiv); |
| | | |
| | | // ExcelUtil<ArchiveInfoVo> utilsv = new ExcelUtil<ArchiveInfoVo>(ArchiveInfoVo.class); |
| | | // |
| | | // |
| | | // ByteOutputStream boss = new ByteOutputStream(); |
| | | // List<ArchiveInfoVo> aivs = new ArrayList<>(); |
| | | // aivs.add(aIV); |
| | | // utilsv.byteOutputStreamExcel(boss, aivs,"Date List", ""); |
| | | bos2.writeTo(zos); |
| | | |
| | | |
| | | |
| | | //写入电子目录 xsxl |
| | | |
| | | ZipEntry entry5 = new ZipEntry(fna + adir +"/"+"电子文件目录" + ".xls"); |
| | | ExcelUtil<DocumentMaterialsVoLarge> util5 = new ExcelUtil<DocumentMaterialsVoLarge>(DocumentMaterialsVoLarge.class); |
| | | |
| | | zos.putNextEntry(entry5); |
| | | ByteOutputStream bos5 = new ByteOutputStream(); |
| | | util5.byteOutputStreamExcel(bos5, docs,"电子文件目录", ""); |
| | | bos.writeTo(zos); |
| | | |
| | | //拿到卷内目录的excel |
| | | List<DocumentMaterialsVoSmall> list2 = dsvs.stream().map(res1 -> new DocumentMaterialsVoSmall(res1.getNum(), res1.getDocumentNumber(),res1.getCreator(), |
| | | res1.getTitle(), res1.getDate(), res1.getPageNumber(), res1.getRemarks())).collect(Collectors.toList()); |
| | | if(!dsvs.isEmpty()) { |
| | | String recordId = dsvs.get(0).getRecordId(); |
| | | byte[] imgr = barcodeService.generateBarcodeImage(recordId); |
| | | ExcelExp e1 = new ExcelExp("卷内目录数据", dsvs, DocumentMaterialsVo.class); |
| | | ExcelExp e2 = new ExcelExp("卷内数据", list2, recordId, imgr, DocumentMaterialsVoSmall.class); |
| | | List<ExcelExp> mysheet = new ArrayList<ExcelExp>(); |
| | | mysheet.add(e1); |
| | | mysheet.add(e2); |
| | | ExcelUtilManySheet<List<ExcelExp>> util2 = new ExcelUtilManySheet<List<ExcelExp>>(mysheet); |
| | | ZipEntry entr = new ZipEntry(fna + adir + "/" + "卷内目录" + ".xls"); |
| | | // ExcelUtil<DocumentMaterialsVo> util1 = new ExcelUtil<DocumentMaterialsVo>(DocumentMaterialsVo.class); |
| | | System.out.println(dsvs); |
| | | zos.putNextEntry(entr); |
| | | ByteOutputStream bos6 = new ByteOutputStream(); |
| | | |
| | | util2.exportExcelManySheet(bos6, mysheet); |
| | | |
| | | // util1.byteOutputStreamExcel(bos1, dsvs,"Date List", ""); |
| | | bos6.writeTo(zos); |
| | | } |
| | | //把excel转为pdf |
| | | |
| | | |
| | | |
| | | byte[] buf = new byte[1024]; |
| | | for (DocumentMaterialsVoLarge dc : docs) { |
| | | String filePath = dc.getUrl(); |
| | |
| | | capStr = code = captchaProducer.createText(); |
| | | image = captchaProducer.createImage(capStr); |
| | | } |
| | | |
| | | System.out.println(code); |
| | | redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); |
| | | // 转换流信息写出 |
| | | FastByteArrayOutputStream os = new FastByteArrayOutputStream(); |
| | |
| | | private Date pwdUpdateDate; |
| | | |
| | | /** 部门对象 */ |
| | | @Excels({ |
| | | @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), |
| | | @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) |
| | | }) |
| | | // @Excels({ |
| | | // @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), |
| | | // @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) |
| | | // }) |
| | | private SysDept dept; |
| | | |
| | | /** 角色对象 */ |