diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/ContractTemplateEnum.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/ContractTemplateEnum.java index d1cd3580db..b79636a103 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/ContractTemplateEnum.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/ContractTemplateEnum.java @@ -15,7 +15,7 @@ public enum ContractTemplateEnum { CUSTOMERINVOICINGAPPLICATION("customer_invoicing_application", "客户开票申请书"), VEHICLEREGISTRATION("vehicle_registration", "车辆登记合同"), ENTRUSTPICKUPAUTHORIZATION("entrust_pickup_authorization", "委托提车授权书"), - CONTRACTALL("contract_all", "合同其他附件"), + CONTRACTALL("contract_all", "合同整体"), ; /** diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/InvoicMessageContractVo.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/InvoicMessageContractVo.java index d0e52cc20d..17bdfc7a96 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/InvoicMessageContractVo.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/InvoicMessageContractVo.java @@ -17,7 +17,7 @@ public class InvoicMessageContractVo implements Vo { @ApiModelProperty("开票类型") private String type; @ApiModelProperty("开票金额") - private String invoicMoney; + private String money; @ApiModelProperty("开票名称") - private String invoicName; + private String name; } 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 4cb30ce26d..ad7c06d986 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 @@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModel; import com.yxt.anrui.base.api.commonappendix.CommonAppendix; import com.yxt.anrui.base.api.commonappendix.CommonAttachTypeEnum; import com.yxt.anrui.base.api.commoncontract.*; @@ -765,6 +766,21 @@ public class CommonContractService extends MybatisBaseService stringList = orderModelInfoVo.getVinList(); + if (stringList.size() > 0) { + remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。车架号:" + String.join("、", stringList); + } else { + remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; + } + map.put("remarks", remarks); + InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); //生成word文件名 String targetPath = docPdfComponent.getUploadTemplateUrl(); @@ -783,6 +799,48 @@ public class CommonContractService extends MybatisBaseService map, AppOrderDetailsVo appOrderDetailsVo) { + String ftl = ""; + if ("现车".equals(appOrderDetailsVo.getOrderType())) { + //获取模板 + ftl = "existingvehicles2"; + } else { + //获取模板 + ftl = "orderacar"; + } + AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); + //查询台数 + String num = priceInfo.getNumber(); + //单台成交价 + String transactionPrice = priceInfo.getSingleFinalPrice(); + String remarks = ""; + AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); + List stringList = orderModelInfoVo.getVinList(); + if (stringList.size() > 0) { + remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。车架号:" + String.join("、", stringList); + } else { + remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; + } + map.put("remarks", remarks); + + InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); + //生成word文件名 + String targetPath = docPdfComponent.getUploadTemplateUrl(); + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + File file = new File(targetPath + ftl + seconds + ".ftl"); + File dir = new File(targetPath); + WordConvertUtils.inputStreamToFile(inputStream, file); + WordConvertUtils.creatWord1(map, file, targetPath, typeName, dir); + //新生成的word路径 + String wordPath = targetPath + typeName; + //生成文件名 + String pdfName = "新车买卖合同2_" + dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + /** * 生成 新车买卖合同(现车) (空)pdf * @@ -818,6 +876,22 @@ public class CommonContractService extends MybatisBaseService stringList = orderModelInfoVo.getVinList(); + if ("1".equals(dto.getDiscountKey())) { + if (stringList.size() > 0) { + remarks = "主车" + num + "台,单台成交价: 元。车架号:" + String.join("、", stringList); + } else { + remarks = "主车" + num + "台,单台成交价: 元。"; + } + map.put("remarks", remarks); + } String ftl = ""; // 涉及高低开票的,需要打印两套合同,一套按照成交价打印(记账用),一套为价格空白的合同(开票用) if ("1".equals(dto.getDiscountKey())) { @@ -849,6 +923,58 @@ public class CommonContractService extends MybatisBaseService map, AppOrderDetailsVo appOrderDetailsVo) { + String url = ""; + map.put("totalPrice", ""); + map.put("priceRemarks", ""); + map.put("depositTotal", ""); + AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); + //查询台数 + String num = priceInfo.getNumber(); + //单台成交价 + String transactionPrice = priceInfo.getSingleFinalPrice(); + String remarks = ""; + AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); + List stringList = orderModelInfoVo.getVinList(); + if ("1".equals(dto.getDiscountKey())) { + if (stringList.size() > 0) { + remarks = "主车" + num + "台,单台成交价: 元。车架号:" + String.join("、", stringList); + } else { + remarks = "主车" + num + "台,单台成交价: 元。"; + } + map.put("remarks", remarks); + } + String ftl = ""; + // 涉及高低开票的,需要打印两套合同,一套按照成交价打印(记账用),一套为价格空白的合同(开票用) + if ("1".equals(dto.getDiscountKey())) { + // 现车 + if ("现车".equals(appOrderDetailsVo.getOrderType())) { + //获取模板 + ftl = "existingvehicles_black2"; + } else { + // 订车获取模板 + ftl = "orderacar_black"; + } + InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); + //生成word文件名 + String targetPath = docPdfComponent.getUploadTemplateUrl(); + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + File file = new File(targetPath + ftl + seconds + ".ftl"); + File dir = new File(targetPath); + WordConvertUtils.inputStreamToFile(inputStream, file); + WordConvertUtils.creatWord1(map, file, targetPath, typeName, dir); + //新生成的word路径 + String wordPath = targetPath + typeName; + //生成合同文件名 + String pdfName = "新车买卖空白合同2_" + dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + url = pdfName; + } + return url; + } + private String getReceiveCar(Map map, AppOrderDetailsVo appOrderDetailsVo) { String url = ""; //查询销售订单的现车 @@ -890,7 +1016,7 @@ public class CommonContractService extends MybatisBaseService invoicingDetailsVoResultBean = finCompanyInvoicingFeign.fetchDetailsByUseOrgSid(appOrderDetailsVo.getUseOrgSid()); if (invoicingDetailsVoResultBean.getData() != null) { - map.put("createOrgName", invoicingDetailsVoResultBean.getData().getUseOrgName()); + map.put("createOrgName", invoicingDetailsVoResultBean.getData().getName()); invoicName = invoicingDetailsVoResultBean.getData().getName(); } //查询销售订单的现车 @@ -901,10 +1027,12 @@ public class CommonContractService extends MybatisBaseService 0) { for (int i = 0; i < stringList.size(); i++) { InvoicMessageContractVo vo = new InvoicMessageContractVo(); - vo.setVinNo(stringList.get(i)); + if (stringList.get(i).length() > 8) { + vo.setVinNo(stringList.get(i).substring(stringList.get(i).length() - 8)); + } else { + vo.setVinNo(stringList.get(i)); + } vo.setType(appOrderDetailsVo.getInvoiceType()); - vo.setInvoicMoney(priceInfo.getSingleFinalPrice()); - vo.setInvoicName(invoicName); invoicMessageContractVos.add(vo); } } @@ -1538,10 +1666,15 @@ public class CommonContractService extends MybatisBaseService discountList = appOrderDetailsVo.getDiscountList(); + discountDetail = "优惠说明:赠送价值" + appOrderDetailsVo.getTotaldiscount() + "元优惠包。包括"; + for (int iii = 0; iii < discountList.size(); iii++) { + AppOrderDiscountListVo vv = discountList.get(iii); + String discountName = vv.getDiscountName(); + if (iii == discountList.size() - 1) { + discountDetail = discountDetail + "价值" + vv.getPrice() + "元" + discountName +vv.getNumber()+ "份(每份包含" + vv.getDiscountExplain()+")。"; + } else { + discountDetail = discountDetail + "价值" + vv.getPrice() + "元" + discountName +vv.getNumber()+ "份(每份包含" + vv.getDiscountExplain()+"),"; + } + } + map.put("discountDetail", discountDetail); + } + //保险说明 String insuranceInfo = "保险说明:" + appOrderDetailsVo.getInsuranceInfo() + "。"; @@ -1578,9 +1727,16 @@ public class CommonContractService extends MybatisBaseService invoicingDetailsVoResultBean = finCompanyInvoicingFeign.fetchDetailsByUseOrgSid(appOrderDetailsVo.getUseOrgSid()); + ResultBean invoicingDetailsVoResultBean = finCompanyInvoicingFeign.fetchDetailsByUseOrgSid(appOrderDetailsVo.getUseOrgSid()); if (invoicingDetailsVoResultBean.getData() != null) { map.put("createOrgName", invoicingDetailsVoResultBean.getData().getName()); - }else{ + } else { return rb.setMsg("请先完善公司开票信息"); } map.put("customerName", customerName); @@ -1600,14 +1756,13 @@ public class CommonContractService extends MybatisBaseService(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); - Future future1 = pool.submit(() -> { + /* Future future1 = pool.submit(() -> { return genCarSaleContract(dto, map, appOrderDetailsVo); }); + Future future1_2 = pool.submit(() -> { + return genCarSaleContract2(dto, map, appOrderDetailsVo); + });*/ PrintConfirmVo printConfirmVo = null; String urlAll = ""; - /*if (StringUtils.isNotBlank(future1.get())) { - printConfirmVo = new PrintConfirmVo(); - if ("现车".equals(appOrderDetailsVo.getOrderType())) { - printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTNEW.getName())); - } else { - printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTBOOK.getName())); - } - printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future1.get()); - list.add(printConfirmVo); - url = future1.get(); - } - Future future2 = pool.submit(() -> { + /*Future future2 = pool.submit(() -> { return genCarSaleContractBlank(dto, map, appOrderDetailsVo); }); - if (StringUtils.isNotBlank(future2.get())) { - printConfirmVo = new PrintConfirmVo(); - if ("现车".equals(appOrderDetailsVo.getOrderType())) { - printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTNEWBLANK.getName())); - } else { - printConfirmVo.setName(MessageFormat.format("《{0}》", ContractTemplateEnum.CARSALECONTRACTBOOKBLANK.getName())); - } - printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future2.get()); - list.add(printConfirmVo); - url = url + "," + future2.get(); - } + Future future2_2 = pool.submit(() -> { + return genCarSaleContractBlank2(dto, map, appOrderDetailsVo); + }); //接收车辆委托书 Future future4 = pool.submit(() -> { return getReceiveCar(map, appOrderDetailsVo); @@ -1674,6 +1813,30 @@ public class CommonContractService extends MybatisBaseService 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())) { @@ -1689,7 +1852,7 @@ public class CommonContractService extends MybatisBaseService qw = new QueryWrapper<>(); SysUserVo sysUserVo = sysUserFeign.fetchBySid(params.getUserSid()).getData(); String staffSid = sysUserVo.getStaffSid(); - qw.eq("staffSid",staffSid); - if (StringUtils.isNotBlank(params.getNames())){ + qw.eq("staffSid", staffSid); + if (StringUtils.isNotBlank(params.getNames())) { qw.and(wrapper -> wrapper.like("contractNo", params.getNames()).or().like("partyB", params.getNames())); } IPage page = PagerUtil.queryToPage(query); diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/carContract.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/carContract.ftl index 7bb1788c2d..618f663d43 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/carContract.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/carContract.ftl @@ -796,7 +796,7 @@ - ${createOrgName1!} + ${createOrgName1!} @@ -906,7 +906,7 @@ - ${createDate!} + ${createDate!} diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/carFin.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/carFin.ftl index 55112e7fd5..fca0470298 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/carFin.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/carFin.ftl @@ -579,7 +579,7 @@ - ${createOrgName!} + ${createOrgName!} diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl index 6f84cd53f0..a2bef1ac59 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles.ftl @@ -1409,7 +1409,7 @@ - 甲方: 乙方: + 甲方: 乙方: @@ -1468,7 +1468,7 @@ - + @@ -1504,7 +1504,7 @@ - + <#-- @@ -1522,7 +1522,7 @@ - + @@ -1530,7 +1530,7 @@ - + --> @@ -1539,7 +1539,7 @@ - 地址: + 地址: @@ -1559,7 +1559,7 @@ - 年 月 日 年 月 日 + 年 月 日 年 月 日 diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles2.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles2.ftl new file mode 100644 index 0000000000..a2bef1ac59 --- /dev/null +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles2.ftl @@ -0,0 +1,1573 @@ + + + + + Administrator + 孟哲 + 2 + 0 + 2022-01-06T06:45:00Z + 2022-08-17T08:56:00Z + 2022-08-17T08:56:00Z + 1 + 147 + 839 + 6 + 1 + 985 + 16 + + + 2052-11.1.0.12302 + 00792B5205314B0BB2CF2B94EA12F497 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 新车买卖合同(现车) + + + + + + + + + + + + + + + + + + + + + 合同编号:${contractNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方(出卖方) : + + + + + + + + + + ${createOrgName!} + + + + + + + + + + + + + + + + + + + + + + 乙方(买受方): + + + + + + + + + + ${customerName!} + + + + + + + + + 联系电话 + + + + + + + + + + ${mobile!} + + + + + + + + + 身份证号码: + + + + + + + + + + ${idNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 乙方从甲方以全款方式购买现车,现将双方权利和义务约定如下: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标的车辆基本信息 + + + + + + + + + + + + + + + + + + + + + + + + <#if modelName??> + + + + + + + + + + + + + + + + + + + ${modelName!} + + + + <#if modelConfig??> + + + + + + + + + + + + + + + + + + + ${modelConfig!} + + + + <#if topName??> + + + + + + + + + + + + + + + + + + + ${topName!} + + + + <#if trailerName??> + + + + + + + + + + + + + + + + + + + ${trailerName!} + + + + <#if remarks??> + + + + + + + + + + + + + + + + + + + ${remarks!} + + + + <#if discountDetail??> + + + + + + + + + + + + + + + + + + + ${discountDetail!} + + + + + + + + + + + + + + + + + + + + + + + + ${insuranceInfo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 二、 + + + + + + + + + + 车辆含税总价 + + + + + + + + + + + + + + + + + + + ${totalPrice!} + + + + + + + + + 元(大写 + + + + + + + + + + ${priceRemarks!} + + + + + + + + + )。 + + + + + + + + + + + + + + + + + + + + + + 三、乙方向甲方交纳订金 + + + + + + + + + + ${depositTotal!} + + + + + + + + + 元${depositRemarks!},乙方提车时交清全部车款。甲方未收到全款前,车辆所有权归甲方所有。 + + + + + + + + + + + + + + + + + + + + + + 四、车辆交付地点 + + + + + + + + + + ${address!} + + + + + + + + + ,乙方自提。 + + + + + + + + + + + + + + + + + + + + + 五、乙方或乙方授权的提车人提车时需按照合同约定的车辆信息对车况及随车工具进行验收,验收无异议的,甲方向乙方交付车钥匙,自此,车辆毁损、灭失的风险以及对第三人的侵权责任由乙方承担。乙方提车上路时必须办理车辆临牌和保险,未办理临牌和保险产生的后果全部由乙方承担。 + + + + + + + + + + + + + + + + + + + + + 六、甲方负责提供车辆合格证及发票,因国家政策调整等原因致使无法办理落实手续的后果由乙方承担。 + + + + + + + + + + + + + + + + + + + + + 七、乙方交纳订金后在10日内不提车的,视为乙方单方放弃购车,甲方有权将车辆另行处置,订金不退。如果甲方同意乙方继续履行合同的,有权要求乙方每日按合同总价款的千分之一承担违约金。 + + + + + + + + + + + + + + + + + + + + + 乙方交纳订金后,因甲方原因导致乙方不能提车的,甲方退还乙方订金,合同终止不再履行。 + + + + + + + + + + + + + + + + + + + + + 八、本合同发生争议协商解决,协商不成向甲方所在地人民法院起诉解决。 + + + + + + + + + + + + + + + + + + + + + 九、本合同双方签字或盖章之时生效。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方: 乙方: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <#-- + + + + + + + + + + + + + + + + + + + + + + + + + + --> + + + + + + + + + 地址: + + + + + + + + + + + + + + + + + + + + 年 月 日 年 月 日 + + + + + + + + + + \ No newline at end of file diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl index ede19817cf..3f623227ab 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black.ftl @@ -1411,7 +1411,7 @@ - 甲方: 乙方: + 甲方: 乙方: @@ -1506,7 +1506,7 @@ - + <#-- @@ -1532,7 +1532,7 @@ - + --> @@ -1541,7 +1541,7 @@ - 地址: + 地址: @@ -1561,7 +1561,7 @@ - 年 月 日 年 月 日 + 年 月 日 年 月 日 diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black2.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black2.ftl new file mode 100644 index 0000000000..3f623227ab --- /dev/null +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/existingvehicles_black2.ftl @@ -0,0 +1,1575 @@ + + + + + Administrator + 孟哲 + 2 + 0 + 2022-01-06T06:45:00Z + 2022-08-17T08:56:00Z + 2022-08-17T08:56:00Z + 1 + 147 + 839 + 6 + 1 + 985 + 16 + + + 2052-11.1.0.12302 + 00792B5205314B0BB2CF2B94EA12F497 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 新车买卖合同(现车) + + + + + + + + + + + + + + + + + + + + + 合同编号:${contractNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方(出卖方) : + + + + + + + + + + ${createOrgName!} + + + + + + + + + + + + + + + + + + + + + + 乙方(买受方): + + + + + + + + + + ${customerName!} + + + + + + + + + 联系电话 + + + + + + + + + + ${mobile!} + + + + + + + + + 身份证号码: + + + + + + + + + + ${idNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 乙方从甲方以全款方式购买现车,现将双方权利和义务约定如下: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标的车辆基本信息 + + + + + + + + + + + + + + + + + + + + + + + + <#if modelName??> + + + + + + + + + + + + + + + + + + + ${modelName!} + + + + <#if modelConfig??> + + + + + + + + + + + + + + + + + + + ${modelConfig!} + + + + <#if topName??> + + + + + + + + + + + + + + + + + + + ${topName!} + + + + <#if trailerName??> + + + + + + + + + + + + + + + + + + + ${trailerName!} + + + + <#if remarks??> + + + + + + + + + + + + + + + + + + + ${remarks!} + + + + <#if discountDetail??> + + + + + + + + + + + + + + + + + + + ${discountDetail!} + + + + <#if insuranceInfo??> + + + + + + + + + + + + + + + + + + + + + ${insuranceInfo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 二、 + + + + + + + + + + 车辆含税总价 + + + + + + + + + + + + + + + + + + + ${totalPrice!} + + + + + + + + + 元(大写 + + + + + + + + + + ${priceRemarks!} + + + + + + + + + )。 + + + + + + + + + + + + + + + + + + + + + + 三、乙方向甲方交纳订金 + + + + + + + + + + ${depositTotal!} + + + + + + + + + 元${depositRemarks!},乙方提车时交清全部车款。甲方未收到全款前,车辆所有权归甲方所有。 + + + + + + + + + + + + + + + + + + + + + + 四、车辆交付地点 + + + + + + + + + + ${address!} + + + + + + + + + ,乙方自提。 + + + + + + + + + + + + + + + + + + + + + 五、乙方或乙方授权的提车人提车时需按照合同约定的车辆信息对车况及随车工具进行验收,验收无异议的,甲方向乙方交付车钥匙,自此,车辆毁损、灭失的风险以及对第三人的侵权责任由乙方承担。乙方提车上路时必须办理车辆临牌和保险,未办理临牌和保险产生的后果全部由乙方承担。 + + + + + + + + + + + + + + + + + + + + + 六、甲方负责提供车辆合格证及发票,因国家政策调整等原因致使无法办理落实手续的后果由乙方承担。 + + + + + + + + + + + + + + + + + + + + + 七、乙方交纳订金后在10日内不提车的,视为乙方单方放弃购车,甲方有权将车辆另行处置,订金不退。如果甲方同意乙方继续履行合同的,有权要求乙方每日按合同总价款的千分之一承担违约金。 + + + + + + + + + + + + + + + + + + + + + 乙方交纳订金后,因甲方原因导致乙方不能提车的,甲方退还乙方订金,合同终止不再履行。 + + + + + + + + + + + + + + + + + + + + + 八、本合同发生争议协商解决,协商不成向甲方所在地人民法院起诉解决。 + + + + + + + + + + + + + + + + + + + + + 九、本合同双方签字或盖章之时生效。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方: 乙方: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <#-- + + + + + + + + + + + + + + + + + + + + + + + + + + --> + + + + + + + + + 地址: + + + + + + + + + + + + + + + + + + + + 年 月 日 年 月 日 + + + + + + + + + + \ No newline at end of file diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/invoicApply.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/invoicApply.ftl index 4387f9a405..e648acf8a3 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/invoicApply.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/invoicApply.ftl @@ -582,7 +582,7 @@ - + <#-- @@ -593,7 +593,7 @@ - + --> @@ -602,7 +602,7 @@ - ${createOrgName!} + ${createOrgName!} @@ -669,7 +669,7 @@ - + @@ -682,19 +682,19 @@ - - - - - + + + + + - + - + - + @@ -722,7 +722,7 @@ - + @@ -751,7 +751,7 @@ - + @@ -779,7 +779,7 @@ - + @@ -807,7 +807,7 @@ - + @@ -836,13 +836,13 @@ <#list invoicList as invoic> - + - + - + @@ -871,7 +871,7 @@ - + @@ -900,20 +900,9 @@ - + - - - - - - - - - - - @@ -952,7 +941,7 @@ - + @@ -975,13 +964,13 @@ - ${invoic.invoicMoney!} + ${invoic.money!} - + @@ -1004,534 +993,13 @@ - ${invoic.invoicName!} + ${invoic.name!} - <#-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 序号 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 车架号 - - - - - - - - - - - - - - - - - - - - - - - - - - - 开票类型 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 开票金额 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 开票名称 - - - - - <#list invoicList as invoic> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic_index+1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.vinNo!} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.type!} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.invoicMoney!} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.invoicName!} - - - - - - - - - <#–<#list invoicList as invoic> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic_index+1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.vinNo!} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.type!} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.invoicMoney!} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${invoic.invoicName!} - - - - - –> - --> diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/moneyFin.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/moneyFin.ftl index 522daa7577..0f1786f8fe 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/moneyFin.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/moneyFin.ftl @@ -640,7 +640,7 @@ - ${createOrgName!} + ${createOrgName!} diff --git a/anrui-base/anrui-base-biz/src/main/resources/ftl/receiveCar.ftl b/anrui-base/anrui-base-biz/src/main/resources/ftl/receiveCar.ftl index 23d818c3ea..a7e85ae9cd 100644 --- a/anrui-base/anrui-base-biz/src/main/resources/ftl/receiveCar.ftl +++ b/anrui-base/anrui-base-biz/src/main/resources/ftl/receiveCar.ftl @@ -622,7 +622,7 @@ - ${createOrgName!} + ${createOrgName!} diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java index f5ba187926..9ce27cf03f 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java @@ -102,5 +102,7 @@ public class AppOrderDetailsVo implements Vo { //中介人2 private SubmitVo intermediary2; + private String isInsurance; + } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java index 6b83e39e8b..31d135206f 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java @@ -2726,6 +2726,7 @@ public class BusSalesOrderService extends MybatisBaseService - + @@ -152,18 +152,18 @@ - +
- + - + - +
@@ -216,7 +216,7 @@
- +
@@ -264,12 +264,12 @@ {{ scope.row.currentReceivableMoney }} - + - + @@ -296,6 +296,7 @@ export default { data() { return { viewTitle: '', + dialogStatus: '', overduereceivableKey: 0, selectedreceivableKey: 1, receiptBank_list: [], @@ -350,7 +351,8 @@ export default { payAccount: [{ required: true, message: '付款账号不能为空', trigger: 'blur' }] }, submitdisabled: false, - balance: '' // 余额 + balance: '', // 余额 + balanceCopy: '' // 计算余额时使用(针对已选应收款项明细表中认款金额多次输入导致余额计算错误) } }, methods: { @@ -426,7 +428,10 @@ export default { this.formobj.collectionTypeKey = aa.value }, changeCollectionMoney() { - this.balance = this.formobj.collectionMoney + if (this.dialogStatus === '') { + this.balance = this.formobj.collectionMoney + this.balanceCopy = this.formobj.collectionMoney + } }, changeSubscriptionMoney() { let subscriptionMoney = '0' @@ -469,7 +474,7 @@ export default { return u }) }) - this.balance = parseInt(this.balance) - parseInt(resNum) + this.balance = parseInt(this.balanceCopy) - parseInt(resNum) }, getlist() { this.listQuery.createBySid = window.sessionStorage.getItem('userSid') @@ -508,10 +513,12 @@ export default { showEdit(row) { this.DataDictionary() this.viewTitle = '【编辑】收款确认申请' + this.dialogStatus = 'edit' fetchDetailBySid(row.sid).then(resp => { - if (resp.code === '200') { + if (resp.success) { this.formobj = resp.data this.balance = this.formobj.balance + this.balanceCopy = this.formobj.balance this.getlist() this.forbidden = true if (this.formobj.paymentVoucherAppendixs.length > 0) { @@ -622,6 +629,9 @@ export default { paymentVoucherUrl_list.push(this.formobj.paymentVoucherAppendixs[i].filePath) } this.formobj.paymentVoucherUrl = paymentVoucherUrl_list.join(',') + } else { + this.$message({ showClose: true, type: 'error', message: '请上传打款凭证' }) + return } if (this.formobj.remittanceConfirmationAppendixs.length > 0) { var remittanceConfirmationUrl_list = [] @@ -629,6 +639,13 @@ export default { remittanceConfirmationUrl_list.push(this.formobj.remittanceConfirmationAppendixs[b].filePath) } this.formobj.remittanceConfirmationUrl = remittanceConfirmationUrl_list.join(',') + } else { + for (var k = 0; k < this.formobj.finSelectedReceivablesDetaileds.length; k++) { + if (this.formobj.finSelectedReceivablesDetaileds[k].customerName !== this.formobj.payerName) { + this.$message({ showClose: true, type: 'error', message: '请上传汇款确认书' }) + return + } + } } this.formobj.userSid = window.sessionStorage.getItem('userSid') this.$refs['form_obj'].validate((valid) => { @@ -638,6 +655,8 @@ export default { if (resp.success) { this.$message({ showClose: true, type: 'success', message: resp.msg }) this.handleReturn('true') + } else { + this.submitdisabled = false } }).catch(() => { this.submitdisabled = false @@ -691,6 +710,8 @@ export default { this.$refs['remittance'].show(this.list2) }) this.balance = '' + this.balanceCopy = '' + this.dialogStatus = '' this.$refs['form_obj'].resetFields() this.$emit('doback') } diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java index 9953b7a4e6..e0c207f416 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java @@ -1290,6 +1290,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService fEntityList = new ArrayList<>(); ARReceivebill.FRECEIVEBILLENTRY freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); //推送车款 + List finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "车款"); finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); if (!finSelectedReceivablesDetailedVos1.isEmpty()) { @@ -1457,38 +1458,6 @@ public class FinCollectionConfirmationService extends MybatisBaseService resultBean = busSalesOrderFeign.selectByContractNo(v.getContractNo()); - if(resultBean.getSuccess()){ - BusSalesOrderPrice busSalesOrderPrice = resultBean.getData(); - BigDecimal singleFinalPrice = busSalesOrderPrice.getSingleFinalPrice(); - if(singleFinalPrice.compareTo(bigDecimalVinAll) == 0){//推送待出库 - BusDeliveredDto busDeliveredDto = new BusDeliveredDto(); - busDeliveredDto.setSubscriptionKey(VehicleStateTempOrLast.PaymentEnum.PAY_MODELS.getCode()); - busDeliveredDto.setSubscription(VehicleStateTempOrLast.PaymentEnum.PAY_MODELS.getRemarks()); - ResultBean busSalesOrderResultBean = busSalesOrderFeign.selectOrderByContractNo(v.getContractNo()); - if(busSalesOrderResultBean.getSuccess()){ - BusSalesOrder busSalesOrder = busSalesOrderResultBean.getData(); - if(busSalesOrder != null){ - busDeliveredDto.setPaymentMethodKey(busSalesOrder.getPayTypeKey()); - busDeliveredDto.setPaymentMethod(busSalesOrder.getPayType()); - } - } - busDeliveredDto.setContractNo(v.getContractNo()); - busDeliveredDto.setName(v.getCustomerName()); - busDeliveredDto.setVinNo(v.getVIN()); - busDeliveredDto.setMobile(v.getCustomerPhone()); - busDeliveredDto.setPrice(busSalesOrderPrice.getSingleFinalPrice().toString()); - //根据客户sid查询客户的身份证号和 - ResultBean orderDetails = busSalesOrderFeign.getSaleOrderDetails(busSalesOrderPrice.getSalesOrderSid()); - AppOrderDetailsVo vo = orderDetails.getData(); - if(vo != null){ - AppOrderModelInfoVo appOrderModelInfoVo = vo.getModelInfo(); - busDeliveredDto.setModelName(appOrderModelInfoVo.getModelName()); - } - ResultBean resultBean1 = busDeliveredFeign.save(busDeliveredDto); - - } - }*/ }); //查询该申请已认款金额总数 subscriptionMoneyAll = finSelectedReceivablesDetailedVos.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); @@ -1505,7 +1474,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService - + @@ -236,6 +236,12 @@ export default { // } // } return { + pickerOptions: { + disabledDate(time) { + let oneDay = 3600 * 1000 * 24 * 5 + return Date.now() < time.getTime() || time.getTime() < Date.now() - oneDay + } + }, dialogVisible: false, disabledBtn: false, temp: { diff --git a/anrui-scm/anrui-scm-ui/src/views/guache/guachechexing/guachechexingAdd.vue b/anrui-scm/anrui-scm-ui/src/views/guache/guachechexing/guachechexingAdd.vue index 98b25e07f1..3479b5cb53 100644 --- a/anrui-scm/anrui-scm-ui/src/views/guache/guachechexing/guachechexingAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/guache/guachechexing/guachechexingAdd.vue @@ -16,10 +16,7 @@ - - - - + @@ -190,10 +187,10 @@ - 销售指导价(元) + *销售指导价(元) - + @@ -206,14 +203,13 @@