|
|
@ -1036,36 +1036,37 @@ 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"; |
|
|
|
} |
|
|
|
} |
|
|
|
BusHandover entity = fetchBySid(busHandover.getSid()); |
|
|
|
entity.setFilePath(path); |
|
|
|
baseMapper.updateById(entity); |
|
|
|
String temp = "/template/"; |
|
|
|
return rb.success().setData(temp + path); |
|
|
|
// 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);
|
|
|
|
// String temp = "/template/";
|
|
|
|
// return rb.success().setData(temp + path);
|
|
|
|
return rb.success().setData(""); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -2185,7 +2186,7 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); |
|
|
|
List<String> receiveSidList = Arrays.asList(nextNodeUserSids.split(",")); |
|
|
|
// if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(busVehicleApply.getCreateBySid())) {
|
|
|
|
if ("销售专员提交申请".equals(nextName)) { |
|
|
|
if ("发起申请".equals(nextName)) { |
|
|
|
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); |
|
|
|
} else { |
|
|
|
SysUserVo userVo = sysUserFeign.fetchBySid(busHandover.getCreateBySid()).getData(); |
|
|
@ -2671,13 +2672,14 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
pdfVo.setColor("-"); |
|
|
|
pdfVo.setListPdfVos(listPdfVos); |
|
|
|
String uploadTemplateUrl = docPdfComponent.getUploadTemplateUrl(); |
|
|
|
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); |
|
|
|
// 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(""); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|