|
|
|
|
@ -79,39 +79,41 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
|
|
|
|
|
public void getPdfToPdf(HttpServletResponse response, String imgStr, String masterId,String pdfWater) {
|
|
|
|
|
if (StringUtils.isNotBlank(masterId)) {
|
|
|
|
|
//获取废除的pdf文件名列表archive_detail
|
|
|
|
|
List pdfList = new ArrayList();
|
|
|
|
|
Archive_Detail archiveDetail = new Archive_Detail();
|
|
|
|
|
archiveDetail.setFlag("0");
|
|
|
|
|
archiveDetail.setMasterid(masterId.trim());
|
|
|
|
|
archiveDetail.setTitle(imgStr);
|
|
|
|
|
List<Archive_Detail> arList = selectByCol(archiveDetail);
|
|
|
|
|
if (arList != null && !arList.isEmpty()) {
|
|
|
|
|
for (Archive_Detail detail : arList) {
|
|
|
|
|
String str = detail.getPdfPath();
|
|
|
|
|
if (StringUtils.isNoneBlank(str)) {
|
|
|
|
|
pdfList.add(str);
|
|
|
|
|
}
|
|
|
|
|
mulFile2OneById(response, pdfWater,arList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 封装合成pdf方法
|
|
|
|
|
* @param response
|
|
|
|
|
* @param pdfWater
|
|
|
|
|
* @param arList
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void mulFile2OneById(HttpServletResponse response, String pdfWater, List<Archive_Detail> arList) {
|
|
|
|
|
List<String> pdfList = new ArrayList<>();
|
|
|
|
|
if (arList != null && !arList.isEmpty()) {
|
|
|
|
|
for (Archive_Detail detail : arList) {
|
|
|
|
|
String str = detail.getPdfPath();
|
|
|
|
|
if (StringUtils.isNoneBlank(str)) {
|
|
|
|
|
pdfList.add(str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
|
|
|
|
|
}
|
|
|
|
|
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void selectPdfPathByIds(HttpServletResponse response, String detailIds, String masterId,String pdfWater) {
|
|
|
|
|
if (StringUtils.isNotBlank(masterId)) {
|
|
|
|
|
//获取废除的pdf文件名列表archive_detail
|
|
|
|
|
List pdfList = new ArrayList();
|
|
|
|
|
List<Archive_Detail> arList = archiveDetailMapper.selectPdfPathByIds(masterId,detailIds);
|
|
|
|
|
if (arList != null && !arList.isEmpty()) {
|
|
|
|
|
for (Archive_Detail detail : arList) {
|
|
|
|
|
String str = detail.getPdfPath();
|
|
|
|
|
if (StringUtils.isNoneBlank(str)) {
|
|
|
|
|
pdfList.add(str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
|
|
|
|
|
mulFile2OneById(response, pdfWater,arList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|