|
|
@ -689,6 +689,10 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
if (buscenterFile != null) { |
|
|
|
appArrearsCarryInfoVo.setZjlLetterDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
} |
|
|
|
buscenterFile = buscenterFileService.selectByLinkSidOne(sid, BuscenterFileEnum.TCALL_DOWNLOADURL.getAttachType()); |
|
|
|
if (buscenterFile != null) { |
|
|
|
appArrearsCarryInfoVo.setZjlLetterDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(busArrearsCarryVehicleApply.getCarContractFile())) { |
|
|
|
List<String> carContract = Arrays.asList(busArrearsCarryVehicleApply.getCarContractFile().split(",")); |
|
|
|
carContract = carContract.stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
|
|
@ -784,6 +788,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
String guaranteeLetterDownloadUrl = ""; |
|
|
|
String zjlLetterDownloadUrl = ""; |
|
|
|
String gdLetterDownloadUrl = ""; |
|
|
|
String allDownloadUrl = ""; |
|
|
|
//新增生成附件(新车买卖合同(欠款)、欠款提车担保承诺书、总经理担保承诺书、股东会对外担保决议)
|
|
|
|
//车架号发生变化,重新生成新车买卖合同(欠款)、欠款提车担保承诺书、总经理担保承诺书、
|
|
|
|
//回购日期发生变化,重新生成欠款提车担保承诺书
|
|
|
@ -797,34 +802,60 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
//生成股东会对外担保决议
|
|
|
|
gdLetterDownloadUrl = gdLetterDownloadUrl(dto, map);*/ |
|
|
|
PdfVo pdfVo = new PdfVo(); |
|
|
|
List<File> filesList = new ArrayList<>(); |
|
|
|
if(StringUtils.isNotBlank(carContractDownloadUrl)){ |
|
|
|
pdfVo.setType(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(carContractDownloadUrl); |
|
|
|
list.add(pdfVo); |
|
|
|
// pdfVo.setType(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(carContractDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(gdLetterDownloadUrl)){ |
|
|
|
pdfVo = new PdfVo(); |
|
|
|
pdfVo.setType(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(gdLetterDownloadUrl); |
|
|
|
list.add(pdfVo); |
|
|
|
// pdfVo = new PdfVo();
|
|
|
|
// pdfVo.setType(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(gdLetterDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(zjlLetterDownloadUrl)){ |
|
|
|
pdfVo = new PdfVo(); |
|
|
|
pdfVo.setType(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(zjlLetterDownloadUrl); |
|
|
|
list.add(pdfVo); |
|
|
|
// pdfVo = new PdfVo();
|
|
|
|
// pdfVo.setType(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(zjlLetterDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(guaranteeLetterDownloadUrl)){ |
|
|
|
// pdfVo = new PdfVo();
|
|
|
|
// pdfVo.setType(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(guaranteeLetterDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
String urlAll = ""; |
|
|
|
if (filesList.size() > 0) { |
|
|
|
String typeName = "欠款提车附件" + ".pdf"; |
|
|
|
try { |
|
|
|
File allFile = WordConvertUtils.mulFile2One(filesList, docPdfComponent.getUploadTemplateUrl() + typeName); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
System.out.println("-========" + docPdfComponent.getUploadTemplateUrl() + typeName); |
|
|
|
urlAll = typeName; |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(urlAll)) { |
|
|
|
pdfVo = new PdfVo(); |
|
|
|
pdfVo.setType(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(guaranteeLetterDownloadUrl); |
|
|
|
pdfVo.setType(BuscenterFileEnum.TCALL_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.TCALL_DOWNLOADURL.getMark()); |
|
|
|
list.add(pdfVo); |
|
|
|
} |
|
|
|
|
|
|
@ -873,34 +904,61 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
} |
|
|
|
//新车买卖合同(欠款)
|
|
|
|
PdfVo pdfVo = new PdfVo(); |
|
|
|
List<File> filesList = new ArrayList<>(); |
|
|
|
if (StringUtils.isNotBlank(carContractDownloadUrl)) { |
|
|
|
pdfVo.setType(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(carContractDownloadUrl); |
|
|
|
list.add(pdfVo); |
|
|
|
// pdfVo.setType(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.CARCONTRACT_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(carContractDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(gdLetterDownloadUrl)) { |
|
|
|
//股东会对外担保决议
|
|
|
|
pdfVo = new PdfVo(); |
|
|
|
pdfVo.setType(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(gdLetterDownloadUrl); |
|
|
|
list.add(pdfVo); |
|
|
|
// pdfVo = new PdfVo();
|
|
|
|
// pdfVo.setType(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.GDLETTER_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(gdLetterDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(zjlLetterDownloadUrl)){ |
|
|
|
//总经理担保书
|
|
|
|
pdfVo = new PdfVo(); |
|
|
|
pdfVo.setType(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(zjlLetterDownloadUrl); |
|
|
|
list.add(pdfVo); |
|
|
|
// pdfVo = new PdfVo();
|
|
|
|
// pdfVo.setType(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(zjlLetterDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(guaranteeLetterDownloadUrl)){ |
|
|
|
//欠款提车担保承诺书
|
|
|
|
// pdfVo = new PdfVo();
|
|
|
|
// pdfVo.setType(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getAttachType());
|
|
|
|
// pdfVo.setName(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getMark());
|
|
|
|
// pdfVo.setDownUrl(guaranteeLetterDownloadUrl);
|
|
|
|
// list.add(pdfVo);
|
|
|
|
File file = new File(docPdfComponent.getUploadTemplateUrl() + carContractDownloadUrl); |
|
|
|
filesList.add(file); |
|
|
|
} |
|
|
|
String urlAll = ""; |
|
|
|
if (filesList.size() > 0) { |
|
|
|
String typeName = "欠款提车附件" + ".pdf"; |
|
|
|
try { |
|
|
|
File allFile = WordConvertUtils.mulFile2One(filesList, docPdfComponent.getUploadTemplateUrl() + typeName); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
System.out.println("-========" + docPdfComponent.getUploadTemplateUrl() + typeName); |
|
|
|
urlAll = typeName; |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(urlAll)) { |
|
|
|
pdfVo = new PdfVo(); |
|
|
|
pdfVo.setType(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.GUARANTEELETTER_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(guaranteeLetterDownloadUrl); |
|
|
|
pdfVo.setType(BuscenterFileEnum.TCALL_DOWNLOADURL.getAttachType()); |
|
|
|
pdfVo.setName(BuscenterFileEnum.TCALL_DOWNLOADURL.getMark()); |
|
|
|
pdfVo.setDownUrl(urlAll); |
|
|
|
list.add(pdfVo); |
|
|
|
} |
|
|
|
} |
|
|
@ -2088,8 +2146,8 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean saveArrearsApplyPdf(AppArrearsCarryDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
public ResultBean<DownloadUrlVo> saveArrearsApplyPdf(AppArrearsCarryDto dto) { |
|
|
|
ResultBean<DownloadUrlVo> rb = ResultBean.fireFail(); |
|
|
|
DownloadUrlVo downloadUrlVo = new DownloadUrlVo(); |
|
|
|
ResultBean<CreatePdfVo> resultBean = saveArrearsApply(dto); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
@ -2112,6 +2170,9 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
if (BuscenterFileEnum.ZJLLETTER_DOWNLOADURL.getAttachType().equals(pdfVo.getType())) { |
|
|
|
downloadUrlVo.setZjlLetterDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + pdfVo.getDownUrl()); |
|
|
|
} |
|
|
|
if(BuscenterFileEnum.TCALL_DOWNLOADURL.getAttachType().equals(pdfVo.getType())){ |
|
|
|
downloadUrlVo.setAllDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + pdfVo.getDownUrl()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (resultBean.getData().isChange() || resultBean.getData().isDateChange()) { |
|
|
|
return rb.success().setData(downloadUrlVo).setMsg("附件已发生变化,可下载最新附件"); |
|
|
@ -2195,6 +2256,10 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
if (buscenterFile != null) { |
|
|
|
appArrearsCarryInfoVo.setZjlLetterDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
} |
|
|
|
buscenterFile = buscenterFileService.selectByLinkSidOne(sid, BuscenterFileEnum.TCALL_DOWNLOADURL.getAttachType()); |
|
|
|
if (buscenterFile != null) { |
|
|
|
appArrearsCarryInfoVo.setAllDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(busArrearsCarryVehicleApply.getCarContractFile())) { |
|
|
|
List<String> carContract = Arrays.asList(busArrearsCarryVehicleApply.getCarContractFile().split(",")); |
|
|
|
carContract = carContract.stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
|
|
|