|
@@ -876,7 +876,12 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
map.put("financingAmountEname", financingAmount_en);
|
|
|
map.put("financingAmount", NumberFormatUtil.convertDecimal(financingAmount,
|
|
|
NumberFormatUtil.THOUSAND_SEPARATOR_TWO_DECIMAL));
|
|
|
- String path = FileUtil.getAbsolutePath(UUID.randomUUID().toString(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
+ String path = null;
|
|
|
+ if (type.equals(ConstantConversionUtil.IDENTITY_TYPE1)) {
|
|
|
+ path = FileUtil.getAbsolutePath("动产抵押合同(个人)" + mortgagorName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
+ } else if (type.equals(ConstantConversionUtil.IDENTITY_TYPE2)) {
|
|
|
+ path = FileUtil.getAbsolutePath("动产抵押合同(公司)" + mortgagorName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
+ }
|
|
|
XWPFTemplate template = XWPFTemplate.compile(absolutePath, config).render(map);
|
|
|
File file = new File(path);
|
|
|
if (!file.exists()) {
|
|
@@ -990,8 +995,12 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
}
|
|
|
map.put("financingAmount", financingAmount.toString());
|
|
|
map.put("financingAmountCname", financingAmountCname);
|
|
|
-
|
|
|
- String path = FileUtil.getAbsolutePath(UUID.randomUUID().toString(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
+ String path = null;
|
|
|
+ if (type.equals(ConstantConversionUtil.IDENTITY_TYPE1)) {
|
|
|
+ path = FileUtil.getAbsolutePath("股权质押合同(个人)" + mortgageBasicInfo.getMortgagorName(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
+ } else if (type.equals(ConstantConversionUtil.IDENTITY_TYPE2)) {
|
|
|
+ path = FileUtil.getAbsolutePath("股权质押合同(公司)" + mortgageBasicInfo.getMortgagorName(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
+ }
|
|
|
File file = new File(path);
|
|
|
if (!file.exists()) {
|
|
|
FileUtils.createParentDirectories(file);
|
|
@@ -1085,7 +1094,7 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
String guarantorEmail = rltRepay.getResponsibleEmail();
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- ;
|
|
|
+ String path = null;
|
|
|
if (null != rltRepay && rltRepay.getArlpIdType() != null) {
|
|
|
String type = rltRepay.getArlpIdType();
|
|
|
// 个人
|
|
@@ -1134,7 +1143,7 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
map.put("currency_en", currency_en);
|
|
|
map.put("creditLineCname", creditLineCname);
|
|
|
map.put("currency_cn", currency_cn);
|
|
|
-
|
|
|
+ path = FileUtil.getAbsolutePath("最高额保证合同(个人)" + rltRepay.getArlpName(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
} else {
|
|
|
// 公司
|
|
|
map.put("guaranteeContractNo", guaranteeContractNo);
|
|
@@ -1165,10 +1174,9 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
map.put("currency_en", currency_en);
|
|
|
map.put("creditLineCname", creditLineCname);
|
|
|
map.put("currency_cn", currency_cn);
|
|
|
-
|
|
|
+ path = FileUtil.getAbsolutePath("最高额保证合同(公司)" + guarantorName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
}
|
|
|
XWPFTemplate template = XWPFTemplate.compile(absolutePath).render(map);
|
|
|
- String path = FileUtil.getAbsolutePath(UUID.randomUUID().toString(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
File file = new File(path);
|
|
|
if (!file.exists()) {
|
|
|
FileUtils.createParentDirectories(file);
|
|
@@ -1243,6 +1251,7 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
String legalRepresentative = rltRepay.getLegalRepresentative();
|
|
|
//责任人邮箱
|
|
|
String guarantorEmail = rltRepay.getResponsibleEmail();
|
|
|
+ String path = null;
|
|
|
if (null != rltRepay && rltRepay.getArlpIdType() != null) {
|
|
|
String type = rltRepay.getArlpIdType();
|
|
|
// 个人
|
|
@@ -1281,7 +1290,7 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
// 债务人公司名称
|
|
|
map.put("debtorCompanyName", debtorCompanyName);
|
|
|
map.put("guarantorEmail", guarantorEmail);
|
|
|
-
|
|
|
+ path = FileUtil.getAbsolutePath("担保函(个人)" + guarantorName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
} else {
|
|
|
// 公司
|
|
|
map.put("guaranteeContractNo", guaranteeContractNo);
|
|
@@ -1302,10 +1311,9 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
|
|
|
map.put("year", DateUtil.getYear(date));
|
|
|
// 债务人公司名称
|
|
|
map.put("debtorCompanyName", debtorCompanyName);
|
|
|
-
|
|
|
+ path = FileUtil.getAbsolutePath("担保函(公司)" + guarantorName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
}
|
|
|
XWPFTemplate template = XWPFTemplate.compile(absolutePath).render(map);
|
|
|
- String path = FileUtil.getAbsolutePath(UUID.randomUUID().toString(), ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
|
|
|
File file = new File(path);
|
|
|
if (!file.exists()) {
|
|
|
FileUtils.createParentDirectories(file);
|