| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtilManySheetFour; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import com.ruoyi.domain.dto.searSigAnn; |
| | | import com.ruoyi.domain.vo.*; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import com.ruoyi.service.impl.BarcodeService; |
| | | import com.ruoyi.service.impl.pdfGenerateService; |
| | | import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private IArchiveRecordsService archiveRecordsService; |
| | | @Autowired |
| | | private BarcodeService barcodeService; |
| | | |
| | | @Autowired |
| | | private pdfGenerateService pdfGenerateService; |
| | | |
| | | @Autowired |
| | | private IDocumentMaterialsService iDocumentMaterialsService; |
| | |
| | | return AjaxResult.success( archiveRecordsService.whether(recordId)); |
| | | } |
| | | |
| | | @PostMapping(value={"/recordFileList/{includeQrCode}/{selectedSignatures}/{selectedAnnotations}", "/recordFileList/{includeQrCode}", "/recordFileList/{includeQrCode}/{selectedSignatures}","/recordFileList/{includeQrCode}/{selectedAnnotations}"}) |
| | | @PostMapping("/recordFileList") |
| | | //导出excle |
| | | public void getSpecialArchiveInfo(HttpServletResponse response, @RequestParam("recordId")Long recordId, @PathVariable(name = "includeQrCode",required = false) boolean includeQrCode, @PathVariable(name = "selectedSignatures",required = false) int[] selectedSignatures, @PathVariable(name = "selectedAnnotations",required = false) int[] selectedAnnotations) throws IOException { |
| | | public void getSpecialArchiveInfo(HttpServletResponse response, @RequestBody searSigAnn searSigAnn) throws IOException { |
| | | System.out.println("uuuuuuuuuuuuuuuuuuusssss88888888888888"); |
| | | // System.out.println(selectedSignatures[0]); |
| | | // System.out.println(selectedAnnotations[0]); |
| | | System.out.println(includeQrCode); |
| | | //二维码是否生成 |
| | | //System.out.println(includeQrCode); |
| | | //生成二维码 |
| | | String code = "2024050000029250"; |
| | | byte [] bt = barcodeService.generateBarcodeImage(code); |
| | | // System.out.println(Arrays.toString(selectedSignatures)); |
| | | //签名选择 |
| | | String [] sig = {"业务科室移交人:","审批科移交人:","档案整理公司:"}; |
| | | List<String> arrLis = new ArrayList<>(); |
| | | if(selectedSignatures!=null){ |
| | | for(int si: selectedSignatures) |
| | | if(searSigAnn.getSelectedSignatures()!=null){ |
| | | for(String si: searSigAnn.getSelectedSignatures()) |
| | | { |
| | | arrLis.add(sig[si]); |
| | | arrLis.add(sig[Integer.parseInt(si)]); |
| | | } |
| | | } |
| | | //注选择 |
| | |
| | | "保管期限:30年或永久", |
| | | "页号按照正式录入页码为准"}; |
| | | List<String> arrAn = new ArrayList<>(); |
| | | if(selectedAnnotations!=null) { |
| | | for (int ar : selectedAnnotations) { |
| | | arrAn.add(ann[ar]); |
| | | if(searSigAnn.getSelectedAnnotations()!=null) { |
| | | for (String ar : searSigAnn.getSelectedAnnotations()) { |
| | | arrAn.add(ann[Integer.parseInt(ar)]); |
| | | } |
| | | } |
| | | List<DocumentMaterialsFileList> arsi = new ArrayList<>(); |
| | | // DocumentMaterials documentMaterials = new DocumentMaterials(); |
| | | // documentMaterials.setRecordId(recordId); |
| | | List<DocumentMaterialsFileList> lst = iDocumentMaterialsService.selectDocumentMaterialsFileList(recordId); |
| | | List<DocumentMaterialsFileList> lst = iDocumentMaterialsService.selectDocumentMaterialsFileList(searSigAnn.getRecordId()); |
| | | |
| | | |
| | | |
| | |
| | | inquiryNumber = arsi.get(0).getInquiryNumber(); |
| | | caseTitle = arsi.get(0).getCaseTitle(); |
| | | } |
| | | util3.exportExcelManySheet(response, mysheet1, includeQrCode,bt, arrLis, arrAn, inquiryNumber, caseTitle); |
| | | util3.exportExcelManySheet(response, mysheet1, searSigAnn.getIncludeQrCode(), bt, arrLis, arrAn, inquiryNumber, caseTitle); |
| | | } |
| | | } |
| | | |
| | | |
| | | |