Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
dimengzhe 2 years ago
parent
commit
451091e180
  1. 85
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java

85
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java

@ -1050,6 +1050,7 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
}
}
baseMapper.insert(busHandover);
//-------------------------PC端注释交车PDF
// ResultBean<List<String>> pdf = createPdf(busHandover.getSid());
// String path = "";
// if (pdf.getSuccess()) {
@ -1075,12 +1076,13 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
// path = dateStr + seconds + "交车确认.pdf";
// }
// }
// BusHandover entity = fetchBySid(busHandover.getSid());
// entity.setFilePath(path);
// baseMapper.updateById(entity);
// String temp = "/template/";
// return rb.success().setData(temp + path);
return rb.success().setData("");
String path = "temp";
BusHandover entity = fetchBySid(busHandover.getSid());
entity.setFilePath(path);
baseMapper.updateById(entity);
String temp = "/template/";
return rb.success().setData(temp + path);
}
/**
@ -1773,31 +1775,33 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
}
}
baseMapper.insert(busHandover);
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";
}
}
//-------------------------注释移动端生成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";
BusHandover entity = fetchBySid(busHandover.getSid());
entity.setFilePath(path);
baseMapper.updateById(entity);
@ -2600,9 +2604,11 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
pdfVo.setColor("-");
pdfVo.setListPdfVos(listPdfVos);
String uploadTemplateUrl = docPdfComponent.getUploadTemplateUrl();
String s = receiveVehicleConfirmationCreatePdf(pdfVo);
//---------------挂车注释PDF
//String s = receiveVehicleConfirmationCreatePdf(pdfVo);
//String savePath = s.substring(uploadTemplateUrl.length());
BusHandover entity = fetchBySid(sid);
String savePath = s.substring(uploadTemplateUrl.length());
String savePath = "temp";
entity.setTrailerFilePath(savePath);
baseMapper.updateById(entity);
String templateUrl = docPdfComponent.getPrefixTemplateUrl();
@ -2801,14 +2807,15 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
pdfVo.setColor("-");
pdfVo.setListPdfVos(listPdfVos);
String uploadTemplateUrl = docPdfComponent.getUploadTemplateUrl();
//-------挂车注释PDF
// String s = receiveVehicleConfirmationCreatePdf(pdfVo);
// BusHandover entity = fetchBySid(sid);
// String savePath = s.substring(uploadTemplateUrl.length());
// entity.setTrailerFilePath(savePath);
// baseMapper.updateById(entity);
// String temp = "/template/";
// return rb.success().setData(temp + savePath);
return rb.success().setData("");
String savePath = "temp";
BusHandover entity = fetchBySid(sid);
entity.setTrailerFilePath(savePath);
baseMapper.updateById(entity);
String temp = "/template/";
return rb.success().setData(temp + savePath);
}

Loading…
Cancel
Save