|
|
@ -1051,32 +1051,31 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
} |
|
|
|
baseMapper.insert(busHandover); |
|
|
|
//-------------------------PC端注释交车PDF
|
|
|
|
// ResultBean<List<String>> pdf = createPdf(busHandover.getSid());
|
|
|
|
// String path = "";
|
|
|
|
// if (pdf.getSuccess()) {
|
|
|
|
// //打印pdf
|
|
|
|
// List<String> filePaths = pdf.getData();
|
|
|
|
// List<File> fileList = new ArrayList<>();
|
|
|
|
// if (!filePaths.isEmpty()) {
|
|
|
|
// for (String filePath : filePaths) {
|
|
|
|
// File file = new File(filePath);
|
|
|
|
// fileList.add(file);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
|
|
|
|
// long seconds = System.currentTimeMillis();
|
|
|
|
// String targetPath = docPdfComponent.getUploadTemplateUrl();
|
|
|
|
// File file = WordConvertUtils.mulFile2One(fileList, targetPath + dateStr + seconds + "交车确认.pdf");
|
|
|
|
// if (fileList.size() <= 0) {
|
|
|
|
// path = null;
|
|
|
|
// } else {
|
|
|
|
// for (File fileDelete : fileList) {
|
|
|
|
// fileDelete.delete();
|
|
|
|
// }
|
|
|
|
// path = dateStr + seconds + "交车确认.pdf";
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
String path = "temp"; |
|
|
|
ResultBean<List<String>> pdf = createPdf(busHandover.getSid()); |
|
|
|
String path = ""; |
|
|
|
if (pdf.getSuccess()) { |
|
|
|
//打印pdf
|
|
|
|
List<String> filePaths = pdf.getData(); |
|
|
|
List<File> fileList = new ArrayList<>(); |
|
|
|
if (!filePaths.isEmpty()) { |
|
|
|
for (String filePath : filePaths) { |
|
|
|
File file = new File(filePath); |
|
|
|
fileList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); |
|
|
|
long seconds = System.currentTimeMillis(); |
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
File file = WordConvertUtils.mulFile2One(fileList, targetPath + dateStr + seconds + "交车确认.pdf"); |
|
|
|
if (fileList.size() <= 0) { |
|
|
|
path = null; |
|
|
|
} else { |
|
|
|
for (File fileDelete : fileList) { |
|
|
|
fileDelete.delete(); |
|
|
|
} |
|
|
|
path = dateStr + seconds + "交车确认.pdf"; |
|
|
|
} |
|
|
|
} |
|
|
|
BusHandover entity = fetchBySid(busHandover.getSid()); |
|
|
|
entity.setFilePath(path); |
|
|
|
baseMapper.updateById(entity); |
|
|
@ -1776,32 +1775,31 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
} |
|
|
|
baseMapper.insert(busHandover); |
|
|
|
//-------------------------注释移动端生成PDF--------------------------------------
|
|
|
|
// ResultBean<List<String>> pdf = createPdf(busHandover.getSid());
|
|
|
|
// String path = "";
|
|
|
|
// if (pdf.getSuccess()) {
|
|
|
|
// //打印pdf
|
|
|
|
// List<String> filePaths = pdf.getData();
|
|
|
|
// List<File> fileList = new ArrayList<>();
|
|
|
|
// if (!filePaths.isEmpty()) {
|
|
|
|
// for (String filePath : filePaths) {
|
|
|
|
// File file = new File(filePath);
|
|
|
|
// fileList.add(file);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
|
|
|
|
// long seconds = System.currentTimeMillis();
|
|
|
|
// String targetPath = docPdfComponent.getUploadTemplateUrl();
|
|
|
|
// File file = WordConvertUtils.mulFile2One(fileList, targetPath + dateStr + seconds + "交车确认.pdf");
|
|
|
|
// if (fileList.size() <= 0) {
|
|
|
|
// path = null;
|
|
|
|
// } else {
|
|
|
|
// for (File fileDelete : fileList) {
|
|
|
|
// fileDelete.delete();
|
|
|
|
// }
|
|
|
|
// path = dateStr + seconds + "交车确认.pdf";
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
String path = "temp"; |
|
|
|
ResultBean<List<String>> pdf = createPdf(busHandover.getSid()); |
|
|
|
String path = ""; |
|
|
|
if (pdf.getSuccess()) { |
|
|
|
//打印pdf
|
|
|
|
List<String> filePaths = pdf.getData(); |
|
|
|
List<File> fileList = new ArrayList<>(); |
|
|
|
if (!filePaths.isEmpty()) { |
|
|
|
for (String filePath : filePaths) { |
|
|
|
File file = new File(filePath); |
|
|
|
fileList.add(file); |
|
|
|
} |
|
|
|
} |
|
|
|
String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); |
|
|
|
long seconds = System.currentTimeMillis(); |
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
File file = WordConvertUtils.mulFile2One(fileList, targetPath + dateStr + seconds + "交车确认.pdf"); |
|
|
|
if (fileList.size() <= 0) { |
|
|
|
path = null; |
|
|
|
} else { |
|
|
|
for (File fileDelete : fileList) { |
|
|
|
fileDelete.delete(); |
|
|
|
} |
|
|
|
path = dateStr + seconds + "交车确认.pdf"; |
|
|
|
} |
|
|
|
} |
|
|
|
BusHandover entity = fetchBySid(busHandover.getSid()); |
|
|
|
entity.setFilePath(path); |
|
|
|
baseMapper.updateById(entity); |
|
|
@ -2604,11 +2602,10 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
pdfVo.setColor("-"); |
|
|
|
pdfVo.setListPdfVos(listPdfVos); |
|
|
|
String uploadTemplateUrl = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
//---------------挂车注释PDF
|
|
|
|
//String s = receiveVehicleConfirmationCreatePdf(pdfVo);
|
|
|
|
//String savePath = s.substring(uploadTemplateUrl.length());
|
|
|
|
// ---------------挂车注释PDF
|
|
|
|
String s = receiveVehicleConfirmationCreatePdf(pdfVo); |
|
|
|
String savePath = s.substring(uploadTemplateUrl.length()); |
|
|
|
BusHandover entity = fetchBySid(sid); |
|
|
|
String savePath = "temp"; |
|
|
|
entity.setTrailerFilePath(savePath); |
|
|
|
baseMapper.updateById(entity); |
|
|
|
String templateUrl = docPdfComponent.getPrefixTemplateUrl(); |
|
|
@ -2808,9 +2805,8 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
pdfVo.setListPdfVos(listPdfVos); |
|
|
|
String uploadTemplateUrl = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
//-------挂车注释PDF
|
|
|
|
// String s = receiveVehicleConfirmationCreatePdf(pdfVo);
|
|
|
|
// String savePath = s.substring(uploadTemplateUrl.length());
|
|
|
|
String savePath = "temp"; |
|
|
|
String s = receiveVehicleConfirmationCreatePdf(pdfVo); |
|
|
|
String savePath = s.substring(uploadTemplateUrl.length()); |
|
|
|
BusHandover entity = fetchBySid(sid); |
|
|
|
entity.setTrailerFilePath(savePath); |
|
|
|
baseMapper.updateById(entity); |
|
|
|