|
|
@ -759,19 +759,15 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
}*/ |
|
|
|
private String genCarSaleContract(PrintConfirmDto dto, Map<String, Object> map, AppOrderDetailsVo appOrderDetailsVo) { |
|
|
|
String ftl = ""; |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles"; |
|
|
|
} else { |
|
|
|
//获取模板
|
|
|
|
ftl = "orderacar"; |
|
|
|
} |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles"; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if (stringList.size() > 0) { |
|
|
@ -779,6 +775,11 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
} |
|
|
|
} else { |
|
|
|
//获取模板
|
|
|
|
ftl = "orderacar"; |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
|
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
@ -801,19 +802,15 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
|
|
|
|
private String genCarSaleContract2(PrintConfirmDto dto, Map<String, Object> 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 = ""; |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles"; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if (stringList.size() > 0) { |
|
|
@ -821,6 +818,11 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
} |
|
|
|
} else { |
|
|
|
//获取模板
|
|
|
|
ftl = "orderacar"; |
|
|
|
remarks = "主车" + num + "台,单台成交价:" + transactionPrice + "元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
|
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
@ -879,19 +881,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> 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())) { |
|
|
@ -899,10 +889,19 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles_black"; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> stringList = orderModelInfoVo.getVinList(); |
|
|
|
if (stringList.size() > 0) { |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。车架号:" + String.join("、", stringList); |
|
|
|
} else { |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。"; |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 订车获取模板
|
|
|
|
ftl = "orderacar_black"; |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
|
//生成word文件名
|
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
@ -931,30 +930,27 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
AppOrderPriceInfoVo priceInfo = appOrderDetailsVo.getPriceInfo(); |
|
|
|
//查询台数
|
|
|
|
String num = priceInfo.getNumber(); |
|
|
|
//单台成交价
|
|
|
|
String transactionPrice = priceInfo.getSingleFinalPrice(); |
|
|
|
String remarks = ""; |
|
|
|
String ftl = ""; |
|
|
|
// 涉及高低开票的,需要打印两套合同,一套按照成交价打印(记账用),一套为价格空白的合同(开票用)
|
|
|
|
if ("1".equals(dto.getDiscountKey())) { |
|
|
|
// 现车
|
|
|
|
if ("现车".equals(appOrderDetailsVo.getOrderType())) { |
|
|
|
//获取模板
|
|
|
|
ftl = "existingvehicles_black"; |
|
|
|
AppOrderModelInfoVo orderModelInfoVo = appOrderDetailsVo.getModelInfo(); |
|
|
|
List<String> 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"; |
|
|
|
remarks = "主车" + num + "台,单台成交价: 元。"; |
|
|
|
} |
|
|
|
map.put("remarks", remarks); |
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
|
//生成word文件名
|
|
|
|
String targetPath = docPdfComponent.getUploadTemplateUrl(); |
|
|
@ -1674,7 +1670,8 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
//根据车型sid查询车型的全称
|
|
|
|
BaseVehicleModel baseVehicleModel = baseVehicleModelService.fetchBySid(appOrderModelInfoVo.getModelSid()); |
|
|
|
//车型
|
|
|
|
String modelName = "车型:" + baseVehicleModel.getModelName() + "。"; |
|
|
|
String modelName1 = baseVehicleModel.getVehicleTypeValue() + baseVehicleModel.getProductLineValue() + baseVehicleModel.getDriveFormValue() + baseVehicleModel.getGearboxTypeValue() + baseVehicleModel.getVehicleVersionValue() + baseVehicleModel.getPowerValue() + baseVehicleModel.getFuelTypeValue() + baseVehicleModel.getEngineTypeValue() + baseVehicleModel.getEmissionStandardValue() + baseVehicleModel.getMarketSegmentsValue() + baseVehicleModel.getSpecifications(); |
|
|
|
String modelName = "车型:" + modelName1 + "。"; |
|
|
|
//配置
|
|
|
|
String modelConfig = "配置:" + appOrderModelInfoVo.getConfig() + "。"; |
|
|
|
//上装
|
|
|
@ -1708,7 +1705,6 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
map.put("discountDetail", discountDetail); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//保险说明
|
|
|
|
String insuranceInfo = "保险说明:" + appOrderDetailsVo.getInsuranceInfo() + "。"; |
|
|
|
//车价合计
|
|
|
|