|
|
|
|
@ -3,6 +3,7 @@ package com.zcloud.edu.command.query.archives;
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import com.alibaba.cola.dto.PageResponse;
|
|
|
|
|
import com.alibaba.cola.statemachine.impl.SysOutVisitor;
|
|
|
|
|
import com.deepoove.poi.data.PictureRenderData;
|
|
|
|
|
import com.deepoove.poi.data.PictureType;
|
|
|
|
|
import com.deepoove.poi.data.Pictures;
|
|
|
|
|
@ -210,13 +211,11 @@ public class ArchivesQueryExe {
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(pdf, params.getName()+"-"+params.getClassName()+"-"+ DateUtil.getSdfTimes()+".pdf","personArchives", params.getClassCorpinfoId());
|
|
|
|
|
|
|
|
|
|
System.out.println(filepath+"filepath-------------------------------------------------------------");
|
|
|
|
|
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
|
|
|
|
|
archivesPdfFileE.initEdit(params.getArchivesPdfFileId(), filepath, 1, null);
|
|
|
|
|
|
|
|
|
|
ArchivesPdfFileDO archivesPdfFileDO = new ArchivesPdfFileDO();
|
|
|
|
|
BeanUtils.copyProperties(archivesPdfFileE, archivesPdfFileDO);
|
|
|
|
|
System.out.println(archivesPdfFileDO.toString());
|
|
|
|
|
archivesPdfFileRepository.updateById(archivesPdfFileDO);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
@ -356,6 +355,7 @@ public class ArchivesQueryExe {
|
|
|
|
|
public ClassArchivesDTO downloadClassArchives(ArchivesQry qry){
|
|
|
|
|
HashMap<String, Object> params = new HashMap<String, Object>();
|
|
|
|
|
params.put("classId", qry.getClassId());
|
|
|
|
|
|
|
|
|
|
List<ArchivesReviewCO> reviewCOList = new ArrayList<>();
|
|
|
|
|
List<ClassCurriculumCO> curriculumList = new ArrayList<>();
|
|
|
|
|
List<StudentSignCO> signList = new ArrayList<>();
|
|
|
|
|
@ -377,9 +377,11 @@ public class ArchivesQueryExe {
|
|
|
|
|
.filter(archivesReviewId -> archivesReviewId != null && !archivesReviewId.trim().isEmpty()) // 非 null 且非空(可选 trim)
|
|
|
|
|
.collect(Collectors.joining(","));
|
|
|
|
|
reviewCOList = archivesReviewCoConvertor.converDOsToCOs(reviewList);
|
|
|
|
|
HashMap<String, Object> reviewParams = new HashMap<String, Object>();
|
|
|
|
|
reviewParams.put("classId", qry.getClassId());
|
|
|
|
|
// 查询子表
|
|
|
|
|
params.put("inArchivesReviewId", reviewIds);
|
|
|
|
|
List<ArchivesReviewRecordDO> reviewRecordList = archivesReviewRecordRepository.listAll(params);
|
|
|
|
|
reviewParams.put("inArchivesReviewId", reviewIds);
|
|
|
|
|
List<ArchivesReviewRecordDO> reviewRecordList = archivesReviewRecordRepository.listAll(reviewParams);
|
|
|
|
|
if(reviewRecordList != null && reviewRecordList.size() > 0){
|
|
|
|
|
List<ArchivesReviewRecordCO> reviewRecordCOList = archivesReviewRecordCoConvertor.converDOsToCOs(reviewRecordList);
|
|
|
|
|
// 子表放到主表下
|
|
|
|
|
@ -392,7 +394,6 @@ public class ArchivesQueryExe {
|
|
|
|
|
|
|
|
|
|
// 安全培训教材或课程讲义
|
|
|
|
|
if (qry.getTypeList().contains(2)){
|
|
|
|
|
params.put("eqClassId", qry.getClassId());
|
|
|
|
|
List<ClassCurriculumDO> curList = classCurriculumRepository.listAll(params);
|
|
|
|
|
List<String> classCurriculumIds = curList.stream().map(ClassCurriculumDO::getClassCurriculumId).collect(Collectors.toList());
|
|
|
|
|
List<ClassCurriculumChapterDO> chapterList = classCurriculumChapterRepository.listByClassCurriculumIds(classCurriculumIds);
|
|
|
|
|
@ -400,7 +401,10 @@ public class ArchivesQueryExe {
|
|
|
|
|
List<ClassCurriculumChapterCO> resultList = Tools.buildEntityTree(chapterCoList, "classCurriculumChapterId", "parentId", "childCurriculumChapterCOList", "0");
|
|
|
|
|
|
|
|
|
|
Map<String, List<ClassCurriculumChapterCO>> chapterMap = resultList.stream().collect(Collectors.groupingBy(ClassCurriculumChapterCO::getClassCurriculumId));
|
|
|
|
|
|
|
|
|
|
System.out.println("curList"+ curList.toString());
|
|
|
|
|
curriculumList = classCurriculumCoConvertor.converDOsToCOs(curList);
|
|
|
|
|
System.out.println("curriculumList"+ curriculumList.toString());
|
|
|
|
|
curriculumList.stream().forEach(bean -> {
|
|
|
|
|
bean.setCurriculumChapterCOList(chapterMap.get(bean.getClassCurriculumId()));
|
|
|
|
|
});
|
|
|
|
|
@ -459,6 +463,8 @@ public class ArchivesQueryExe {
|
|
|
|
|
SSOUser ssoUser = AuthContext.getCurrentUser();
|
|
|
|
|
classArchivesDTO.setCorpinfoId(ssoUser.getTenantId());
|
|
|
|
|
classArchivesDTO.setArchivesReviewList(reviewCOList);
|
|
|
|
|
classArchivesDTO.setSignList(signList);
|
|
|
|
|
classArchivesDTO.setClassCurriculumList(curriculumList);
|
|
|
|
|
|
|
|
|
|
// 新增档案下载记录
|
|
|
|
|
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
|
|
|
|
|
@ -473,6 +479,7 @@ public class ArchivesQueryExe {
|
|
|
|
|
|
|
|
|
|
@Async("archivesAsyncExecutor")
|
|
|
|
|
public void execteClassGeneratePdf(ArchivesQry qry, ClassArchivesDTO params) {
|
|
|
|
|
params.setArchivesDate(DateUtil.getSdfTimes());
|
|
|
|
|
|
|
|
|
|
String tempDir = System.getProperty("java.io.tmpdir");
|
|
|
|
|
List<File> stringList = new ArrayList<>();
|
|
|
|
|
@ -490,37 +497,37 @@ public class ArchivesQueryExe {
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
Files.write(Paths.get(tempDir+"aaa/"+params.getClassName()+"-签字表-"+DateUtil.getSdfTimes()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"aaa/"+params.getClassName()+"-签字表-"+DateUtil.getSdfTimes()+".pdf"));
|
|
|
|
|
Files.write(Paths.get(tempDir+"/"+params.getClassName()+"-签字表-"+params.getArchivesDate()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"/"+params.getClassName()+"-签字表-"+params.getArchivesDate()+".pdf"));
|
|
|
|
|
}
|
|
|
|
|
if (qry.getTypeList().contains(4)){
|
|
|
|
|
byte[] word = exectePicture(params);
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
Files.write(Paths.get(tempDir+"aaa/"+params.getClassName()+"-影像资料-"+DateUtil.getSdfTimes()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"aaa/"+params.getClassName()+"-影像资料-"+DateUtil.getSdfTimes()+".pdf"));
|
|
|
|
|
Files.write(Paths.get(tempDir+"/"+params.getClassName()+"-影像资料-"+params.getArchivesDate()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"/"+params.getClassName()+"-影像资料-"+params.getArchivesDate()+".pdf"));
|
|
|
|
|
}
|
|
|
|
|
if (qry.getTypeList().contains(5)){
|
|
|
|
|
byte[] word = execteClassPaper(params);
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
Files.write(Paths.get(tempDir+"aaa/"+params.getClassName()+"-试卷-"+DateUtil.getSdfTimes()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"aaa/"+params.getClassName()+"-试卷-"+DateUtil.getSdfTimes()+".pdf"));
|
|
|
|
|
Files.write(Paths.get(tempDir+"/"+params.getClassName()+"-试卷-"+params.getArchivesDate()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"/"+params.getClassName()+"-试卷-"+params.getArchivesDate()+".pdf"));
|
|
|
|
|
}
|
|
|
|
|
if (qry.getTypeList().contains(6)){
|
|
|
|
|
byte[] word = execteClassExamResult(params);
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
Files.write(Paths.get(tempDir+"aaa/"+params.getClassName()+"-学员考核成绩统计表-"+DateUtil.getSdfTimes()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"aaa/"+params.getClassName()+"-学员考核成绩统计表-"+DateUtil.getSdfTimes()+".pdf"));
|
|
|
|
|
Files.write(Paths.get(tempDir+"/"+params.getClassName()+"-学员考核成绩统计表-"+params.getArchivesDate()+".pdf"), pdf);
|
|
|
|
|
stringList.add(new File(tempDir+"/"+params.getClassName()+"-学员考核成绩统计表-"+params.getArchivesDate()+".pdf"));
|
|
|
|
|
}
|
|
|
|
|
FileZip.zipList(tempDir+"aaa/"+params.getClassName()+"-"+ DateUtil.getSdfTimes()+"zipzip.zip",stringList );
|
|
|
|
|
File file = new File(tempDir+"aaa/"+params.getClassName()+"-"+ DateUtil.getSdfTimes()+"zipzip.zip");
|
|
|
|
|
FileZip.zipList(tempDir+"/"+params.getClassName()+"-"+ params.getArchivesDate()+"一期一档.zip",stringList );
|
|
|
|
|
File file = new File(tempDir+"/"+params.getClassName()+"-"+ params.getArchivesDate()+"一期一档.zip");
|
|
|
|
|
byte[] bytes = Files.readAllBytes(file.toPath());
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(bytes, params.getClassName()+"-"+ DateUtil.getSdfTimes()+"zipzip.zip","classArchives", params.getCorpinfoId());
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(bytes, params.getClassName()+"-"+ params.getArchivesDate()+"一期一档.zip","classArchives", params.getCorpinfoId());
|
|
|
|
|
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
|
|
|
|
|
archivesPdfFileE.initEdit(params.getArchivesPdfFileId(), filepath, 1, null);
|
|
|
|
|
ArchivesPdfFileDO archivesPdfFileDO = new ArchivesPdfFileDO();
|
|
|
|
|
@ -529,7 +536,7 @@ public class ArchivesQueryExe {
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
} finally {
|
|
|
|
|
// } finally {
|
|
|
|
|
// FileUtil.delFile();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -549,11 +556,11 @@ public class ArchivesQueryExe {
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
byteArrayMap.put(item.getCurriculumName()+"-教材会审表-"+ DateUtil.getSdfTimes()+".pdf", pdf);
|
|
|
|
|
byteArrayMap.put(item.getCurriculumName()+"-教材会审表-"+ params.getArchivesDate()+".pdf", pdf);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FileZip.writeByteArraysToZip(tempDir+"aaa/"+params.getClassName()+"-教材会审表-"+DateUtil.getSdfTimes()+".zip", byteArrayMap);
|
|
|
|
|
return tempDir+"aaa/"+params.getClassName()+"-教材会审表-"+DateUtil.getSdfTimes()+".zip";
|
|
|
|
|
FileZip.writeByteArraysToZip(tempDir+"/"+params.getClassName()+"-教材会审表-"+params.getArchivesDate()+".zip", byteArrayMap);
|
|
|
|
|
return tempDir+"/"+params.getClassName()+"-教材会审表-"+params.getArchivesDate()+".zip";
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
@ -593,6 +600,7 @@ public class ArchivesQueryExe {
|
|
|
|
|
public String execteClassCurriculum(ClassArchivesDTO params){
|
|
|
|
|
try {
|
|
|
|
|
if (params.getClassCurriculumList() != null && params.getClassCurriculumList().size() > 0){
|
|
|
|
|
System.out.println("ddddddddddddddddddd-----"+params.getClassCurriculumList().toString());
|
|
|
|
|
String tempDir = System.getProperty("java.io.tmpdir");
|
|
|
|
|
Map<String, byte[]> byteArrayMap = new HashMap<>();
|
|
|
|
|
for (ClassCurriculumCO item : params.getClassCurriculumList()){
|
|
|
|
|
@ -600,14 +608,15 @@ public class ArchivesQueryExe {
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
byteArrayMap.put(item.getCurriculumName()+"-安全培训教材或课程讲义-"+ DateUtil.getSdfTimes()+".pdf", pdf);
|
|
|
|
|
byteArrayMap.put(item.getCurriculumName()+"-安全培训教材或课程讲义-"+ params.getArchivesDate()+".pdf", pdf);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FileZip.writeByteArraysToZip(tempDir+"aaa/"+params.getClassName()+"-安全培训教材或课程讲义-"+DateUtil.getSdfTimes()+".zip", byteArrayMap);
|
|
|
|
|
return tempDir+"aaa/"+params.getClassName()+"-安全培训教材或课程讲义-"+DateUtil.getSdfTimes()+".zip";
|
|
|
|
|
FileZip.writeByteArraysToZip(tempDir+"/"+params.getClassName()+"-安全培训教材或课程讲义-"+params.getArchivesDate()+".zip", byteArrayMap);
|
|
|
|
|
return tempDir+"/"+params.getClassName()+"-安全培训教材或课程讲义-"+params.getArchivesDate()+".zip";
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
// throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@ -656,6 +665,9 @@ public class ArchivesQueryExe {
|
|
|
|
|
try {
|
|
|
|
|
Map<String, Object> workItem = PropertyUtils.describe( params);
|
|
|
|
|
ArrayList<Object> workList = CollUtil.newArrayList();
|
|
|
|
|
System.out.println("params.getSignList()"+params.getSignList().toString());
|
|
|
|
|
System.out.println("params.getSignList().size()"+params.getSignList().size());
|
|
|
|
|
|
|
|
|
|
if (params.getSignList() != null && params.getSignList().size() > 0){
|
|
|
|
|
AtomicInteger atomicIndex = new AtomicInteger(1);
|
|
|
|
|
for (StudentSignCO item : params.getSignList()){
|
|
|
|
|
@ -835,25 +847,25 @@ public class ArchivesQueryExe {
|
|
|
|
|
HashMap<String, Object> params = new HashMap<String, Object>();
|
|
|
|
|
List<ArchivesReviewCO> reviewCOList = new ArrayList<>();
|
|
|
|
|
params.put("classId", qry.getClassId());
|
|
|
|
|
params.put("classCurriculumId", qry.getClassCurriculumId());
|
|
|
|
|
// 教材会审表
|
|
|
|
|
ArchivesReviewDO reviewInfo = archivesReviewRepository.getInfoByClassCur(params);
|
|
|
|
|
ArchivesReviewCO reviewInfoCO = new ArchivesReviewCO();
|
|
|
|
|
BeanUtils.copyProperties(reviewInfo, reviewInfoCO);
|
|
|
|
|
reviewCOList.add(reviewInfoCO);
|
|
|
|
|
params.put("classCurriculumIds", qry.getClassCurriculumIds());
|
|
|
|
|
ClassDO classDO = classRepository.getByClassId(qry.getClassId());
|
|
|
|
|
if (reviewInfo != null && !ObjectUtils.isEmpty(reviewInfo.getArchivesReviewId())){
|
|
|
|
|
|
|
|
|
|
params.put("eqArchivesReviewId", reviewInfo.getArchivesReviewId());
|
|
|
|
|
List<ArchivesReviewRecordDO> reviewRecordList = archivesReviewRecordRepository.listAll(params);
|
|
|
|
|
if(reviewRecordList != null && reviewRecordList.size() > 0){
|
|
|
|
|
List<ArchivesReviewRecordCO> reviewRecordCOList = archivesReviewRecordCoConvertor.converDOsToCOs(reviewRecordList);
|
|
|
|
|
// 子表放到主表下
|
|
|
|
|
Map<String, List<ArchivesReviewRecordCO>> reviewRecordCOMap = reviewRecordCOList.stream().collect(Collectors.groupingBy(ArchivesReviewRecordCO::getArchivesReviewId));
|
|
|
|
|
reviewCOList.forEach(reviewCO -> {
|
|
|
|
|
reviewCO.setArchivesReviewRecordList(reviewRecordCOMap.get(reviewCO.getArchivesReviewId()));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 教材会审表
|
|
|
|
|
List<ArchivesReviewDO> reviewList = archivesReviewRepository.getInfoByClassCur(params);
|
|
|
|
|
String reviewIds = reviewList.stream()
|
|
|
|
|
.map(ArchivesReviewDO::getArchivesReviewId)
|
|
|
|
|
.filter(archivesReviewId -> archivesReviewId != null && !archivesReviewId.trim().isEmpty()) // 非 null 且非空(可选 trim)
|
|
|
|
|
.collect(Collectors.joining(","));
|
|
|
|
|
reviewCOList = archivesReviewCoConvertor.converDOsToCOs(reviewList);
|
|
|
|
|
// 查询子表
|
|
|
|
|
params.put("inArchivesReviewId", reviewIds);
|
|
|
|
|
List<ArchivesReviewRecordDO> reviewRecordList = archivesReviewRecordRepository.listAll(params);
|
|
|
|
|
if(reviewRecordList != null && reviewRecordList.size() > 0){
|
|
|
|
|
List<ArchivesReviewRecordCO> reviewRecordCOList = archivesReviewRecordCoConvertor.converDOsToCOs(reviewRecordList);
|
|
|
|
|
// 子表放到主表下
|
|
|
|
|
Map<String, List<ArchivesReviewRecordCO>> reviewRecordCOMap = reviewRecordCOList.stream().collect(Collectors.groupingBy(ArchivesReviewRecordCO::getArchivesReviewId));
|
|
|
|
|
reviewCOList.forEach(reviewCO -> {
|
|
|
|
|
reviewCO.setArchivesReviewRecordList(reviewRecordCOMap.get(reviewCO.getArchivesReviewId()));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 查询子表
|
|
|
|
|
|
|
|
|
|
@ -864,7 +876,7 @@ public class ArchivesQueryExe {
|
|
|
|
|
classArchivesDTO.setArchivesReviewList(reviewCOList);
|
|
|
|
|
// 新增档案下载记录
|
|
|
|
|
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
|
|
|
|
|
archivesPdfFileE.init("archives_review", qry.getClassCurriculumId(), 2, ssoUser.getTenantId(), classDO.getName()+"-"+reviewInfo.getCurriculumName()+"教材会审表-");
|
|
|
|
|
archivesPdfFileE.init("archives_review", qry.getClassId(), 2, ssoUser.getTenantId(), classDO.getName()+"-教材会审表-");
|
|
|
|
|
ArchivesPdfFileDO archivesPdfFileDO = new ArchivesPdfFileDO();
|
|
|
|
|
BeanUtils.copyProperties(archivesPdfFileE, archivesPdfFileDO);
|
|
|
|
|
archivesPdfFileRepository.save(archivesPdfFileDO);
|
|
|
|
|
@ -873,12 +885,12 @@ public class ArchivesQueryExe {
|
|
|
|
|
}
|
|
|
|
|
@Async("archivesAsyncExecutor")
|
|
|
|
|
public void execteDownloadReviewInfo(ClassArchivesDTO params){
|
|
|
|
|
params.setArchivesDate(DateUtil.getSdfTimes());
|
|
|
|
|
try {
|
|
|
|
|
byte[] word = execteReviewInfo(params.getArchivesReviewList().get(0));
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(pdf, params.getClassName()+"-"+params.getArchivesReviewList().get(0).getCurriculumName()+"-教材会审表-"+ DateUtil.getSdfTimes()+".pdf","classArchives", params.getCorpinfoId());
|
|
|
|
|
String zipString = execteReview(params);
|
|
|
|
|
File file = new File(zipString);
|
|
|
|
|
byte[] bytes = Files.readAllBytes(file.toPath());
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(bytes, params.getClassName()+"-教材会审表-"+params.getArchivesDate()+".zip","classArchives", params.getCorpinfoId());
|
|
|
|
|
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
|
|
|
|
|
archivesPdfFileE.initEdit(params.getArchivesPdfFileId(), filepath, 1, null);
|
|
|
|
|
ArchivesPdfFileDO archivesPdfFileDO = new ArchivesPdfFileDO();
|
|
|
|
|
@ -924,12 +936,13 @@ public class ArchivesQueryExe {
|
|
|
|
|
}
|
|
|
|
|
@Async("archivesAsyncExecutor")
|
|
|
|
|
public void execteDownloadClassCur(ClassArchivesDTO params){
|
|
|
|
|
params.setArchivesDate(DateUtil.getSdfTimes());
|
|
|
|
|
try {
|
|
|
|
|
byte[] word = execteClassCurriculumInfo(params.getClassCurriculumList().get(0));
|
|
|
|
|
List<byte[]> byteArrayList = new ArrayList<>();
|
|
|
|
|
byteArrayList.add(word);
|
|
|
|
|
byte[] pdf = WordToPdfUtil.mergeWordToPdf(byteArrayList);
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(pdf, params.getClassName()+"-"+params.getClassCurriculumList().get(0).getCurriculumName()+"-安全培训教材或课程讲义-"+ DateUtil.getSdfTimes()+".pdf","classArchives", params.getCorpinfoId());
|
|
|
|
|
String filepath = zcloudImgFilesFacade.saveFile(pdf, params.getClassName()+"-"+params.getClassCurriculumList().get(0).getCurriculumName()+"-安全培训教材或课程讲义-"+ params.getArchivesDate()+".pdf","classArchives", params.getCorpinfoId());
|
|
|
|
|
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
|
|
|
|
|
archivesPdfFileE.initEdit(params.getArchivesPdfFileId(), filepath, 1, null);
|
|
|
|
|
ArchivesPdfFileDO archivesPdfFileDO = new ArchivesPdfFileDO();
|
|
|
|
|
|