diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busbillapplication/BusBillApplication.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busbillapplication/BusBillApplication.java index 8df2f53925..02892fb27b 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busbillapplication/BusBillApplication.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busbillapplication/BusBillApplication.java @@ -146,4 +146,6 @@ public class BusBillApplication extends BaseEntity { private String qkkpBillNo; @ApiModelProperty("出库申请sid") private String ckSid; + + private String fileUrl; } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.java index 66b2edf10f..6c9f5951c6 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.java @@ -30,10 +30,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.anrui.base.api.basetrailer.BaseTrailer; +import com.yxt.anrui.base.api.basetrailermodel.BaseTrailerModel; +import com.yxt.anrui.base.api.basevehicle.BaseVehicle; import com.yxt.anrui.buscenter.api.busbillapplication.BusBillApplication; import com.yxt.anrui.buscenter.api.busbillapplication.BusBillApplicationDetailsVo; import com.yxt.anrui.buscenter.api.busbillapplication.BusBillApplicationVo; import com.yxt.anrui.buscenter.api.busbillapplication.*; +import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; +import com.yxt.anrui.buscenter.api.bussalesordermodel.BusSalesOrderModel; +import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPrice; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; import com.yxt.anrui.fin.api.finbillapplication.FinBillApplication; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -80,4 +87,18 @@ public interface BusBillApplicationMapper extends BaseMapper BusBillApplication selectByContractNoAndSid(@Param("contractNo") String contractNo, @Param("vinSid") String vinSid); FinBillApplication selectByNo(String billNo); + + BusSalesOrder selectByContract(String contractNo); + + BusSalesOrderModel selectByOrderSid(String sid); + + BusSalesOrderPrice selectByPrices(String sid); + + BaseTrailer selectByTrailerNo(String gcVinNo); + + BaseTrailerModel selectByModelSid(String trailerModelSid); + + BaseVehicle selectByVinSid(String vehSid); + + CrmCustomerTemp selectByCustomerSid(String openTickSid); } \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.xml b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.xml index c910d92a9c..116c447b24 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.xml +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationMapper.xml @@ -102,4 +102,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationService.java index a6f09cd890..72eac2fd97 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationService.java @@ -27,12 +27,16 @@ package com.yxt.anrui.buscenter.biz.busbillapplication; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.date.DateUtil; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.yxt.anrui.base.api.basetrailer.*; +import com.yxt.anrui.base.api.basetrailermodel.BaseTrailerModel; +import com.yxt.anrui.base.api.basevehicle.BaseVehicle; import com.yxt.anrui.base.api.basevehicleappendix.BaseVehicleAppendixFeign; import com.yxt.anrui.base.api.basevehiclecertificate.BaseVehicleCertificateFeign; import com.yxt.anrui.base.api.basevehiclecertificate.BaseVehicleCertificateVo; import com.yxt.anrui.base.api.commonappendix.CommonAppendixFeign; import com.yxt.anrui.base.api.commonappendix.CommonAppendixVo; +import com.yxt.anrui.base.api.commoncontract.CarContractListVo; import com.yxt.anrui.base.api.commoncontract.CommonContractFeign; import com.yxt.anrui.buscenter.api.busbillfile.BusAttachTypeEnum; import com.yxt.anrui.buscenter.api.busbillfile.BusBillFileDto; @@ -47,6 +51,7 @@ import com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApply; import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetails; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo; +import com.yxt.anrui.buscenter.api.bussalesordermodel.BusSalesOrderModel; import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPrice; import com.yxt.anrui.buscenter.biz.busbillfile.BusBillFileService; import com.yxt.anrui.buscenter.biz.busbilltrailer.BusBillTrailerService; @@ -57,19 +62,31 @@ import com.yxt.anrui.buscenter.api.busbilltrailer.BusBillTrailerVo; import com.yxt.anrui.buscenter.biz.busdeliveredapply.BusDeliveredApplyService; import com.yxt.anrui.buscenter.biz.busdeliveredapplydetails.BusDeliveredApplyDetailsService; import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; +import com.yxt.anrui.fin.api.finbillapplication.BillFileVo; import com.yxt.anrui.fin.api.finbillapplication.FinBillApplication; +import com.yxt.anrui.fin.api.finbillapplication.FinBillApplicationDto; +import com.yxt.anrui.fin.api.finbilltrailer.FinBillTrailerDto; +import com.yxt.anrui.fin.api.finbillvehicle.FinBillVehicleDto; import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingDetailsVo; import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingFeign; +import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign; +import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo; +import com.yxt.common.base.config.component.DocPdfComponent; import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.WordConvertUtils; import com.yxt.common.core.result.ResultBean; import org.apache.commons.lang3.StringUtils; +import org.apache.tomcat.util.threads.ThreadPoolExecutor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.File; +import java.io.InputStream; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; +import java.util.*; +import java.util.concurrent.*; @Service public class BusBillApplicationService extends MybatisBaseService { @@ -98,6 +115,12 @@ public class BusBillApplicationService extends MybatisBaseService saveOrUpdateDto(BusBillApplicationDto dto) { ResultBean rb = ResultBean.fireFail(); @@ -112,6 +135,10 @@ public class BusBillApplicationService extends MybatisBaseService map = new HashMap<>(); + Map carMap = new HashMap<>(); + Map filemap = new HashMap<>(); + Map checkMap = new HashMap<>(); + String fileUrl = ""; + String contractNo = dto.getContractNo(); + //根据合同号查询销售订单数据 + BusSalesOrder busSalesOrder = baseMapper.selectByContract(contractNo); + SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(busSalesOrder.getSid()).getData(); + List finBillVehicles = dto.getFinBillVehicles(); + BusSalesOrderModel busSalesOrderModel = baseMapper.selectByOrderSid(busSalesOrder.getSid()); + BusSalesOrderPrice busSalesOrderPrice = baseMapper.selectByPrices(busSalesOrder.getSid()); + FinCompanyInvoicingDetailsVo finCompanyInvoicingDetailsVo = finCompanyInvoicingFeign.fetchDetailsVoBySid(dto.getOpenTickSid()).getData(); + if (!dto.getOpenTickSid().equals(busSalesOrder.getAffiliatedCompanySid())) { + //生成开票申请书 + if (StringUtils.isNotBlank(busSalesOrder.getPurchaseSystemSid())) { + ResultBean invoicingDetailsVoResultBean = finCompanyInvoicingFeign.getDetailsByUseOrgAndSystem(busSalesOrder.getUseOrgSid(), busSalesOrder.getPurchaseSystemSid()); + if (invoicingDetailsVoResultBean.getData() != null) { + map.put("createOrgName", invoicingDetailsVoResultBean.getData().getName()); + } + } + map.put("contractNo", busSalesOrder.getContractNo()); + List list = new ArrayList<>(); + + BillFileVo billFileVo = new BillFileVo(); + if (busSalesOrderModel != null) { + billFileVo.setCarName(busSalesOrderModel.getModelName()); + billFileVo.setNum(String.valueOf(finBillVehicles.size())); + billFileVo.setPrice(busSalesOrderPrice.getSingleFinalPrice().toString()); + } + if (loanSolutions != null) { + if (StringUtils.isNotBlank(loanSolutions.getMainVehicleAmount())) { + billFileVo.setOpenPrice(loanSolutions.getMainVehicleAmount()); + } + } + billFileVo.setType(busSalesOrder.getBillingType()); + list.add(billFileVo); + List finBillTrailers = dto.getFinBillTrailers(); + finBillTrailers.removeAll(Collections.singleton(null)); + Map carNameMap = new HashMap<>(); + if (!finBillTrailers.isEmpty()) { + for (int i = 0; i < finBillTrailers.size(); i++) { + BusBillTrailerDto finBillTrailerDto = finBillTrailers.get(i); + billFileVo = new BillFileVo(); + BaseTrailer baseTrailer = baseMapper.selectByTrailerNo(finBillTrailerDto.getGcVinNo()); + if (baseTrailer != null) { + BaseTrailerModel baseTrailerModel = baseMapper.selectByModelSid(baseTrailer.getTrailerModelSid()); + if (baseTrailerModel != null) { + String carName = "外廓-" + Integer.parseInt(baseTrailerModel.getAppearanceSizeLong()) / 1000 + "米" + "\t" + baseTrailerModel.getTrailerTypeValue(); + if (carNameMap.containsKey(carName)) { + carNameMap.put(carName, Integer.parseInt(carNameMap.get(carName).toString()) + 1); + continue; + } else { + billFileVo.setType(busSalesOrder.getBillingType()); + if (loanSolutions != null) { + if (StringUtils.isNotBlank(loanSolutions.getMainVehicleAmount())) { + billFileVo.setOpenPrice(loanSolutions.getMainVehicleAmount()); + } + } + billFileVo.setCarName(carName); + if (busSalesOrderModel != null) { + billFileVo.setPrice(busSalesOrderPrice.getSingleFinalPrice().toString()); + } + carNameMap.put(carName, 1); + list.add(billFileVo); + } + } + } + } + } + if (!list.isEmpty()) { + for (int i = 0; i < list.size(); i++) { + BillFileVo billFileVo1 = list.get(i); + String carName = billFileVo1.getCarName(); + if (carNameMap.containsKey(carName)) { + billFileVo1.setNum(carNameMap.get(carName).toString()); + } + } + } + map.put("list", list); + map.put("name",busSalesOrder.getAffiliatedCompany()); + String date = DateUtil.today(); + List dateString = Arrays.asList(date.split("-")); + String year = dateString.get(0); + String month = dateString.get(1); + String day = dateString.get(2); + map.put("year", year); + map.put("month", month); + map.put("day", day); + if (!"02".equals(dto.getOpenTickTypeKey())) { + if (finCompanyInvoicingDetailsVo != null) { + //生成车辆登记合同 + if (busSalesOrder != null) { + carMap.put("Yf", busSalesOrder.getCustomerName()); + carMap.put("invoiceName", finCompanyInvoicingDetailsVo.getName());//开票名称 + } + carMap.put("contractNo", "D" + map.get("contractNo")); + if (StringUtils.isNotBlank(busSalesOrder.getPurchaseSystemSid())) { + ResultBean invoicingDetailsVoResultBean = finCompanyInvoicingFeign.getDetailsByUseOrgAndSystem(busSalesOrder.getUseOrgSid(), busSalesOrder.getPurchaseSystemSid()); + if (invoicingDetailsVoResultBean.getData() != null) { + carMap.put("createOrgName", invoicingDetailsVoResultBean.getData().getName()); + } + } + carMap.put("date", date); + List carContractListVos = new ArrayList<>(); + + for (BusBillVehicleDto salesOrderVehicle : finBillVehicles) { + CarContractListVo carContractListVo = new CarContractListVo(); + BaseVehicle baseVehicle = baseMapper.selectByVinSid(salesOrderVehicle.getVehSid()); + carContractListVo.setBrand(baseVehicle.getModelName()); + carContractListVo.setVinNo(baseVehicle.getVinNo()); + carContractListVo.setEnginNo(baseVehicle.getEngineNo()); + carContractListVos.add(carContractListVo); + } + carMap.put("carLists", carContractListVos); + + } + } + } + + if (loanSolutions != null) { + if (!dto.getOneBillMoney().equals(loanSolutions.getMainVehicleAmount())) { + //生成新车空白合同 + filemap.put("totalPrice", ""); + filemap.put("priceRemarks", ""); + filemap.put("depositTotal", ""); + String remarks = ""; + String date = DateUtil.today(); + List dateString = Arrays.asList(date.split("-")); + String year = dateString.get(0); + String month = dateString.get(1); + String day = dateString.get(2); + filemap.put("year", year); + filemap.put("month", month); + filemap.put("day", day); + if (finCompanyInvoicingDetailsVo != null) { + filemap.put("invoiceName", finCompanyInvoicingDetailsVo.getName());//开票名称 + filemap.put("customerName", finCompanyInvoicingDetailsVo.getName());//开票名称 + filemap.put("invoiceNo", finCompanyInvoicingDetailsVo.getTaxpayerNo());//纳税人识别号 + filemap.put("idNo", finCompanyInvoicingDetailsVo.getTaxpayerNo());//纳税人识别号 + filemap.put("adds", finCompanyInvoicingDetailsVo.getAddress());//户籍地址 + }else{ + CrmCustomerTemp crmCustomerTemp = baseMapper.selectByCustomerSid(dto.getOpenTickSid()); + if (crmCustomerTemp != null) { + filemap.put("invoiceName", crmCustomerTemp.getName());//开票名称 + filemap.put("customerName", crmCustomerTemp.getName());//开票名称 + filemap.put("invoiceNo", crmCustomerTemp.getIDNumber());//纳税人识别号 + filemap.put("idNo", crmCustomerTemp.getIDNumber());//纳税人识别号 + filemap.put("adds", crmCustomerTemp.getCertificateAddress());//户籍地址 + } + } + filemap.put("invoiceType", dto.getOpenTickTypeValue());//开票类型 + filemap.put("createOrgName", ""); + remarks = "数量" + finBillVehicles.size() + "台,单台成交价: 元。"; + filemap.put("remarks", remarks); + filemap.put("busSid",busSalesOrder.getSid()); + ResultBean> mapResultBean = commonContractFeign.getModelMap(filemap); + checkMap = mapResultBean.getData(); + + + } + } + try { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("demo-pool-%d").build(); + ExecutorService pool = new ThreadPoolExecutor(1, 2, + 1000, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + List filesList = new ArrayList<>(); + if(!map.isEmpty()){ + Future future1 = pool.submit(() -> { + return getInvoiceApplyFile(map); + }); + if (StringUtils.isNotBlank(future1.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future1.get()); + filesList.add(file); + } + } + if(!carMap.isEmpty()){ + Future future2 = pool.submit(() -> { + return getCarFile(carMap); + }); + if (StringUtils.isNotBlank(future2.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future2.get()); + filesList.add(file); + } + } + Map finalCheckMap = checkMap; + if(!finalCheckMap.isEmpty()){ + Future future3 = pool.submit(() -> { + return blackFile(finalCheckMap); + }); + if (StringUtils.isNotBlank(future3.get())) { + File file = new File(docPdfComponent.getUploadTemplateUrl() + future3.get()); + filesList.add(file); + } + } + if (filesList.size() > 0) { + String typeName = contractNo + "开票附件.pdf"; + File allFile = WordConvertUtils.mulFile2One(filesList, docPdfComponent.getUploadTemplateUrl() + typeName); + System.out.println("-========" + docPdfComponent.getUploadTemplateUrl() + typeName); + fileUrl =typeName; + } + + } catch (Exception e) { + e.printStackTrace(); + log.error("生成文件失败:==========================" + e.getMessage()); + } + + return fileUrl; + } + + public String blackFile(Map map) { + String ftl = "dai_existingvehicles_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 = map.get("contractNo").toString() + "贷款新车买卖空白合同_" + dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + + public String getInvoiceApplyFile(Map map) { + String ftl = "invoiceApply"; + 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 = map.get("contractNo").toString() + "开票申请书_" + dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + + public String getCarFile(Map map) { + String ftl = "carContract"; + 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 = map.get("contractNo").toString() + "车辆登记合同_" + dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } } \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/carContract.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/carContract.ftl new file mode 100644 index 0000000000..7a7621cf9e --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/carContract.ftl @@ -0,0 +1,1545 @@ + + + + + Administrator + 孟哲 底 + 2 + 0 + 2024-02-21T01:04:00Z + 2024-02-21T01:04:00Z + 1 + 86 + 493 + CHINA + 4 + 1 + 578 + 16 + + + 2052-12.1.0.16250 + F8140F1EA6284E39B1433097E0F6AAD5_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 合同编号: + + + + + + + + + + + ${contractNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方: + + + + + + + + + + + <#if invoiceName??> + ${invoiceName!} + <#else> ${invoiceName!} + + + + + + + + + + + + + + + + + + + + + + + + + + 乙方: + + + + + + + + + + + ${Yf!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 签订日期: + + + + + + + + + + + + + + + + + + + + + ${date!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲、乙双方经协商就车辆登记事宜达成一致订立本合同,共同遵守执行。 + + + + + + + + + + + + + + + + + + + + + 一、车辆出售方 + + + + + + + + + + + + + + + + + + + + + ${createOrgName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 二、车辆信息 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 品牌 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车架号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发动机号 + + + + + <#list carLists as car> + + + + + + + + + + + + + + + + + + + + + + + + + ${car_index+1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.brand!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.vinNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.enginNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 三、车辆登记 + + + + + + + + + + + + + + + + + + + + 甲方同意乙方将其购买的上述车辆发票开至甲方名下,并同意将车辆登记在甲方名下。 + + + + + + + + + + + + + + + + + + + 四、权利义务 + + + + + + + + + + + + + + + + + + + 甲方不是车辆所有权人。甲方有义务协助乙方办理 + + + + + + + + + 车辆购置税、登记、营运、抵押、事故处理、保险理赔等手续。 + + + + + + + + + 甲方不得用车辆进行债务担保,不得转让、变卖、出租车辆。 + + + + + + + + + + + + + + + + + + + + + 五、车辆经营 + + + + + + + + + + + + + + + + + + + + + 甲方不得干涉乙方经营车辆。车辆由乙方自主经营,自负盈亏。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方: 乙方: + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl new file mode 100644 index 0000000000..63d3d961de --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/dai_existingvehicles_black.ftl @@ -0,0 +1,2891 @@ + + + + + tianlong ma + 孟哲 底 + 2 + 0 + 2024-02-21T03:50:00Z + 2024-02-21T03:50:00Z + 1 + 176 + 1009 + 8 + 2 + 1183 + 16 + + + 2052-12.1.0.16250 + 6F572EF574EC404788BBCC6BAF8548AB_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 新车买卖合同(现车 + + + + + + + + + + ) + + + + + + + + + + + + + + + + + + 合同 + + + + + + + + + + + + + + + + 号: + + + + + + + + ${contractNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (出卖方) : + + + + + + + + + + + + + + + + + + + + + + ${createOrgName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (买受方): + + + + + + + + + + + <#if customerName??> + ${customerName!} + <#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 证件 + + + + + + + + + + 号码: + + + + + + + + + + <#if idNo??> + ${idNo!} + <#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 户籍/注册地址 + + + + + + + + + + + + + + + + + + + + <#if adds??> + ${adds!} + <#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 从甲方以 + + + + + + + + + + 全款方式 + + + + + + + + + + + 购买现车,现将双方权利和义务约定如下: + + + + + + + + + + + + + + + + + + + + + + + 一、 标的车辆基本信 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <#if modelName??> + + + + + + + + + + + + + + + + + + + + + ${modelName!} + + + + <#if modelConfig??> + + + + + + + + + + + + + + + + + + + + + ${modelConfig!} + + + + <#if modelConfigs??> + + + + + + + + + + + + + + + + + + + + + ${modelConfigs!} + + + + <#if publicModel??> + + + + + + + + + + + + + + + + + + + + + ${publicModel!} + + + + <#if topName??> + + + + + + + + + + + + + + + + + + + + + ${topName!} + + + + <#if trailerName??> + + + + + + + + + + + + + + + + + + + + + ${trailerName!} + + + + <#if remarks??> + + + + + + + + + + + + + + + + + + + + + ${remarks!} + + + + <#if discountDetail??> + + + + + + + + + + + + + + + + + + + + + ${discountDetail!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 二、 + + + + + + + + + + 车辆总价 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${totalPrice!} + + + + + + + + + + + + + + + + + + + + + 元(大写 + + + + + + + + + + + + + + + + + + + + + + ${priceRemarks!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 、乙方 + + + + + + + + + + 在签订合同当日 + + + + + + + + + + 向甲方交纳订金 + + + + + + + + + + + + + + + + + + + + + + ${depositTotal!} + + + + + + + + + + + + + + + + + + + + + 元, 乙方提车时交清全部车款。甲方未收到全款前, 车辆所有 + + + + + + + + + + 权归甲方所有 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 四、车辆交 + + + + + + + + + + 付地点 + + + + + + + + + + + + + + + + + + + + + + ${address!} + + + + + + + + + + + + + + + + + + + + + ,乙方自提。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 乙方或乙方授权的提车人提车时需按照合同约定的车辆信息对车况及随车工具进行验收,验 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 异议的, + + + + + + + + + + 乙方接收车辆 + + + + + + + + + + ,自此,车辆毁损、灭失的风险以及对第三人的侵权责任由乙方 + + + + + + + + + + 承担。乙 + + + + + + + + + + + + + + + + + + + + 提车上路时必须办理车辆临牌和保险,未办理临牌和保险产生的后果全部由乙方承担。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方负责提供车辆合格证及发票 + + + + + + + + + + + ,甲方所提供的发票,不作为乙方支付款项的依据 + + + + + + + + + + + 。由于车 + + + + + + + + + + 辆自身问题等甲方原因导致车辆不能登记上牌的, + + + + + + + + + + + + + + + + + + + 由甲方负 + + + + + + + + + + + + + + + + + + + + 解决; 由于乙方未按有关规定时限及时办理车辆登记上牌手续或车辆注册登记所在公司的 + + + + + + + + + + + + + + + + + + + 问题 + + + + + + + + + + + + + + + + + + + + 非甲方原因导致不能办理车辆登记上牌手续的, 由乙方自行解决。 + + + + + + + + + + + + + + + + + + + + + + 七、乙方交纳订金后在 10 日内不提车的,视为乙方单方放 + + + + + + + + + + 弃购车, 甲方有权将车辆另行处置, 订 + + + + + + + + + + + + + + + + + + + 金不退。 + + + + + + + + + + + + + + + + + + + + 果甲方同意乙方继续履行合同的,有权要求乙方每日按合同总价款的千分之一承担违约金。 + + + + + + + + + + + + + + + + + + + + + + 乙方交纳订金后,因甲方原因导致乙方不能提车的,甲方退还乙方订金,合同终止不再履行 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 八、 + + + + + + + + + + + + + + + + + + + + 合同发生争议协商解决,协商不成向甲方所在地人民法院起诉解决。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 、本合同双方签字或盖章之时生效。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 甲方: + + + + + + + + + + + + + + + + + + + + 乙方: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${year!} + + + + + + + + + + + + + + + + + + + + ${month!} + + + + + + + + + + + + + + + + + + + + ${day!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${year!} + + + + + + + + + + + + + + + + + + + + ${month!} + + + + + + + + + + + + + + + + + + + + ${day!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/invoiceApply.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/invoiceApply.ftl new file mode 100644 index 0000000000..b0c8d38a94 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/invoiceApply.ftl @@ -0,0 +1,1535 @@ + + + + + Administrator + 孟哲 底 + 2 + 0 + 2024-02-22T02:39:00Z + 2024-02-22T02:39:00Z + 1 + 40 + 233 + CHINA + 1 + 1 + 272 + 16 + + + 2052-12.1.0.16120 + 709AAA1DA3054B23B6EEA488B1FF478B_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票申请书 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${createOrgName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 我与你公司签署了《车辆买卖合同》(编号为 + + + + + + + + + + + ${contractNo!} + + + + + + + + + ),现我申请将车辆发票按照下列金额开具发票,我自行承担相应的法律后果。我承诺按照《车辆买卖合同》约定的价格支付车辆价款。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车辆名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 数量 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 合同单价 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发票类型 + + + + + <#list list as car> + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car_index+1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.carName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.num!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.price!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.openPrice!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${car.type!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车辆落户单位 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 申请人: 申请时间: + + + + + + + + + + ${year!} + + + + + + + + + + + + + + + + + + + ${month!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${day!} + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/BillFileVo.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/BillFileVo.java new file mode 100644 index 0000000000..bf834c1b92 --- /dev/null +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/BillFileVo.java @@ -0,0 +1,23 @@ +package com.yxt.anrui.fin.api.finbillapplication; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/2/22 + **/ +@Data +public class BillFileVo { + @ApiModelProperty("车辆名称") + private String carName; + @ApiModelProperty("数量") + private String num; + @ApiModelProperty("合同单价") + private String price; + @ApiModelProperty("开票金额") + private String openPrice; + @ApiModelProperty("发票类型") + private String type; +}