diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java index 0cf2ca30c4..d2337d36cb 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java @@ -1950,115 +1950,83 @@ public class CommonContractService extends MybatisBaseService(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); - if ("1".equals(appOrderDetailsVo.getPayTypeKey())) {//全款 - Future future1 = pool.submit(() -> { - return genCarSaleContract(dto, map, appOrderDetailsVo); - }); - Future future1_2 = pool.submit(() -> { - return genCarSaleContract2(dto, map, appOrderDetailsVo); - }); - Future future2 = pool.submit(() -> { - return genCarSaleContractBlank(dto, map, appOrderDetailsVo); - }); - Future future2_2 = pool.submit(() -> { - return genCarSaleContractBlank2(dto, map, appOrderDetailsVo); - }); - //接收车辆委托书 - Future future4 = pool.submit(() -> { - return getReceiveCar(map, appOrderDetailsVo); + + Future future1 = pool.submit(() -> { + return genCarSaleContract(dto, map, appOrderDetailsVo); + }); + Future future1_2 = pool.submit(() -> { + return genCarSaleContract2(dto, map, appOrderDetailsVo); + }); + Future future2 = pool.submit(() -> { + return genCarSaleContractBlank(dto, map, appOrderDetailsVo); + }); + Future future2_2 = pool.submit(() -> { + return genCarSaleContractBlank2(dto, map, appOrderDetailsVo); + }); + //接收车辆委托书 + Future future4 = pool.submit(() -> { + return getReceiveCar(map, appOrderDetailsVo); + }); + String singleFinalPriceOne = priceInfo.getSingleFinalPrice(); + String depositOne = depositInfo.getDeposit(); + Future future8 = null; + if (!"02".equals(appOrderDetailsVo.getInvoiceType())) { + future8 = pool.submit(() -> { + return getCarContract(map, appOrderDetailsVo); }); - /* Future future5 = pool.submit(() -> { - return getInvoicMessage(map, appOrderDetailsVo); - });*/ - String singleFinalPriceOne = priceInfo.getSingleFinalPrice(); - String depositOne = depositInfo.getDeposit(); - //单台成交价与单台订金相等 - /* Future future6 = null; - if (new BigDecimal(singleFinalPriceOne).compareTo(new BigDecimal(depositOne)) != 0) { - future6 = pool.submit(() -> { - return getCarFin(map, appOrderDetailsVo); - }); - } - Future future7 = pool.submit(() -> { - return getMoneyFin(map, appOrderDetailsVo); - });*/ - Future future8 = null; - if (!"02".equals(appOrderDetailsVo.getInvoiceType())) { - future8 = pool.submit(() -> { - return getCarContract(map, appOrderDetailsVo); - }); - } - List filesList = new ArrayList<>(); - if (future1 != null) { - if (StringUtils.isNotBlank(future1.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future1.get()); - filesList.add(file); - } - } - if (future1_2 != null) { - if (StringUtils.isNotBlank(future1_2.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future1_2.get()); - filesList.add(file); - } - } - if (future2 != null) { - if (StringUtils.isNotBlank(future2.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future2.get()); - filesList.add(file); - } - } - if (future2_2 != null) { - if (StringUtils.isNotBlank(future2_2.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future2_2.get()); - filesList.add(file); - } - } - //合并pdf文件 - if (future8 != null) { - if (StringUtils.isNotBlank(future8.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future8.get()); - filesList.add(file); - } + } + List filesList = new ArrayList<>(); + if (future1 != null) { + if (StringUtils.isNotBlank(future1.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future1.get()); + filesList.add(file); } - if (StringUtils.isNotBlank(future4.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future4.get()); + } + if (future1_2 != null) { + if (StringUtils.isNotBlank(future1_2.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future1_2.get()); filesList.add(file); } - /*if (StringUtils.isNotBlank(future5.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future5.get()); + } + if (future2 != null) { + if (StringUtils.isNotBlank(future2.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future2.get()); filesList.add(file); - }*/ - /* if (future6 != null) { - if (StringUtils.isNotBlank(future6.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future6.get()); - filesList.add(file); - } } - - if (StringUtils.isNotBlank(future7.get())) { - File file = new File(docPdfComponent.getUploadTemplateUrl() + future7.get()); + } + if (future2_2 != null) { + if (StringUtils.isNotBlank(future2_2.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future2_2.get()); filesList.add(file); - }*/ - - if (filesList.size() > 0) { -// String typeName = ContractTemplateEnum.CONTRACTALL.getName() + "_" + DateUtil.format(new Date(), "yyyMMdd") + System.currentTimeMillis() + ".pdf"; - String typeName = appOrderDetailsVo.getPayType() + contractNo + ".pdf"; - File allFile = WordConvertUtils.mulFile2One(filesList, docPdfComponent.getUploadTemplateUrl() + typeName); - System.out.println("-========" + docPdfComponent.getUploadTemplateUrl() + typeName); - urlAll = typeName; } - if (StringUtils.isNotBlank(urlAll)) { - printConfirmVo = new PrintConfirmVo(); -// printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CONTRACTALL.getName())); - printConfirmVo.setName(MessageFormat.format("《{0}》", appOrderDetailsVo.getPayType() + contractNo)); - printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + urlAll); - list.add(printConfirmVo); + } + //合并pdf文件 + if (future8 != null) { + if (StringUtils.isNotBlank(future8.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future8.get()); + filesList.add(file); } - } else { + } + if (StringUtils.isNotBlank(future4.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future4.get()); + filesList.add(file); + } + if (filesList.size() > 0) { + String typeName = appOrderDetailsVo.getPayType() + contractNo + ".pdf"; + File allFile = WordConvertUtils.mulFile2One(filesList, docPdfComponent.getUploadTemplateUrl() + typeName); + System.out.println("-========" + docPdfComponent.getUploadTemplateUrl() + typeName); + urlAll = typeName; + } + if (StringUtils.isNotBlank(urlAll)) { + printConfirmVo = new PrintConfirmVo(); + printConfirmVo.setName(MessageFormat.format("《{0}》", appOrderDetailsVo.getPayType() + contractNo)); + printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + urlAll); + list.add(printConfirmVo); + } + if ("2".equals(appOrderDetailsVo.getPayTypeKey())) { Future future10 = pool.submit(() -> { return getRisk(appOrderDetailsVo, dto); }); - List filesList = new ArrayList<>(); if (StringUtils.isNotBlank(future10.get())) { File file = new File(docPdfComponent.getUploadTemplateUrl() + future10.get()); filesList.add(file);