|
|
|
@ -665,32 +665,32 @@ public class ProjectValuationController {
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getMarketPrice().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getMarketPrice()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getEarnings().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getEarnings()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getGrowthRate().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getGrowthRate()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getGrowthRate1().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getGrowthRate1()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getEarnings1().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getEarnings1()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(valuePerShare.toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(valuePerShare), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
@ -719,27 +719,27 @@ public class ProjectValuationController {
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getMarketPrice().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getMarketPrice()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getNetWorth().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getNetWorth()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getNetInterest().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getNetInterest()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getNetInterest1().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getNetInterest1()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getNetWorth1().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getNetWorth1()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
@ -773,27 +773,27 @@ public class ProjectValuationController {
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getMarketPrice().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getMarketPrice()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getOperatingIncome().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getOperatingIncome()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getNetOperatinginterestRate().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getNetOperatinginterestRate()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getNetOperatinginterestRate1().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getNetOperatinginterestRate1()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(projectValuationList.get(i).getOperatingIncome1().toString(), 0, 1.5f));
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(projectValuationList.get(i).getOperatingIncome1()), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
@ -807,5 +807,495 @@ public class ProjectValuationController {
|
|
|
|
|
return table;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("exportFCFFPDF")
|
|
|
|
|
@ApiOperation("绝对估值法FCFF-PDF导出")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public void exportFCFFPDF(@ApiParam("HttpServletResponse") HttpServletResponse response,
|
|
|
|
|
@ApiParam("flow_id") @RequestParam String flowId) throws IOException, DocumentException {
|
|
|
|
|
Document document = new Document();
|
|
|
|
|
// 创建 PdfWriter 对象 第一个参数是对文档对象的引用,第二个参数是文件的实际名称,在该名称中还会给出其输出路径。
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(("绝对估值报告" + "." + "pdf"), CharsetUtil.UTF_8));
|
|
|
|
|
PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
|
|
|
|
|
writer.setPageEvent(new HeaderAndFooterEvent());
|
|
|
|
|
document.open();
|
|
|
|
|
HeaderAndFooterEvent.tpl = writer.getDirectContent().createTemplate(500, 500);
|
|
|
|
|
HeaderAndFooterEvent.PAGE_NUMBER = true;//实现页眉跟页脚
|
|
|
|
|
HeaderAndFooterEvent.HeaderLeft = "";//左上角
|
|
|
|
|
HeaderAndFooterEvent.HeaderRight = "";//右上角
|
|
|
|
|
HeaderAndFooterEvent.FooterLeft = "";//左下角
|
|
|
|
|
HeaderAndFooterEvent.FooterRight = "深圳市天择教育科技有限公司";//右下角
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "宋体", 25, Font.BOLD);
|
|
|
|
|
//添加一个空段落来占位,五个参数分别为:内容,对齐方式(1为居中,0为居左,2为居右),段后空行数,段前空行数,行间距
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph(" ", 1, 200, 0, 1.5f));
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph("天择投资银行业务教学系统", 1, 1.5f));
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.GRAY, "宋体", 18, Font.BOLD);
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph("绝对估值分析报告-企业自由现金流FCFF", 1, 1.5f));
|
|
|
|
|
|
|
|
|
|
document.newPage(); //换第二页 目录
|
|
|
|
|
|
|
|
|
|
PdfPTable table = new PdfPTable(6);
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell1= new PdfPCell(HeaderAndFooterEvent.AddParagraph("输入核心参数", 0, 1.5f));
|
|
|
|
|
cell1.setColspan(2); // 设置单元格跨两行
|
|
|
|
|
table.addCell(cell1);
|
|
|
|
|
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell2= new PdfPCell(HeaderAndFooterEvent.AddParagraph("预测值", 0, 1.5f));
|
|
|
|
|
cell2.setColspan(4); // 设置单元格跨四行
|
|
|
|
|
table.addCell(cell2);
|
|
|
|
|
|
|
|
|
|
ArrayList<String> headList = new ArrayList<>();
|
|
|
|
|
headList.add("假设项目");
|
|
|
|
|
headList.add("2020-12-31");
|
|
|
|
|
headList.add("预测项目");
|
|
|
|
|
headList.add("2021-12-31");
|
|
|
|
|
headList.add("2022-12-31");
|
|
|
|
|
headList.add("2023-12-31");
|
|
|
|
|
for (int i = 0; i < headList.size(); i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(headList.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EduFCFF fcff=eduFCFFService.selectFCFFByFlowId(flowId);
|
|
|
|
|
List<FCFFFCFEDto> list=new ArrayList<>();
|
|
|
|
|
List<String> jsxmList=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastThreeYearList=new ArrayList<>();
|
|
|
|
|
List<String> ycxm=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastYear=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastTwoYear=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> thisYear=new ArrayList<>();
|
|
|
|
|
jsxmList.add("营业收入");
|
|
|
|
|
jsxmList.add("税后经营净利润");
|
|
|
|
|
jsxmList.add("折旧摊销");
|
|
|
|
|
jsxmList.add("营业现金毛流量");
|
|
|
|
|
jsxmList.add("经营营运资本增加");
|
|
|
|
|
jsxmList.add("营业现金净流量");
|
|
|
|
|
jsxmList.add("资本支出");
|
|
|
|
|
jsxmList.add("企业自由现金流");
|
|
|
|
|
lastThreeYearList.add(fcff.getYysr2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getShjyjlr2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getZjtx2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getYyxjmll2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getJyyyzbzj2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getYyxjjll2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getZbzc2020());
|
|
|
|
|
lastThreeYearList.add(fcff.getQyzyxjl2020());
|
|
|
|
|
ycxm.add("销售增长率");
|
|
|
|
|
ycxm.add("营业收入");
|
|
|
|
|
ycxm.add("税后经营净利润");
|
|
|
|
|
ycxm.add("折旧摊销");
|
|
|
|
|
ycxm.add("营业现金毛流量");
|
|
|
|
|
ycxm.add("经营营运资本增加");
|
|
|
|
|
ycxm.add("营业现金净流量");
|
|
|
|
|
ycxm.add("资本支出");
|
|
|
|
|
ycxm.add("企业自由现金流");
|
|
|
|
|
ycxm.add("债务资本比重Wd");
|
|
|
|
|
ycxm.add("债务资本成本Rd");
|
|
|
|
|
ycxm.add("股权资本比重We");
|
|
|
|
|
ycxm.add("股权资本成本Re");
|
|
|
|
|
ycxm.add("公司资本成本WACC");
|
|
|
|
|
ycxm.add("企业价值");
|
|
|
|
|
|
|
|
|
|
lastTwoYear.add(fcff.getXszzl2021());
|
|
|
|
|
lastTwoYear.add(fcff.getYysr2021());
|
|
|
|
|
lastTwoYear.add(fcff.getShjyjlr2021());
|
|
|
|
|
lastTwoYear.add(fcff.getZjtx2021());
|
|
|
|
|
lastTwoYear.add(fcff.getYyxjmll2021());
|
|
|
|
|
lastTwoYear.add(fcff.getJyyyzbzj2021());
|
|
|
|
|
lastTwoYear.add(fcff.getYyxjjll2021());
|
|
|
|
|
lastTwoYear.add(fcff.getZbzc2021());
|
|
|
|
|
lastTwoYear.add(fcff.getQyzyxjl2021());
|
|
|
|
|
lastTwoYear.add(fcff.getZwzbbzWd2021());
|
|
|
|
|
lastTwoYear.add(fcff.getZwzbcbRd2021());
|
|
|
|
|
lastTwoYear.add(fcff.getGqzbbzWb2021());
|
|
|
|
|
lastTwoYear.add(fcff.getGqzbcbRe2021());
|
|
|
|
|
lastTwoYear.add(fcff.getGszbcbWacc2021());
|
|
|
|
|
lastTwoYear.add(fcff.getQyjz2021());
|
|
|
|
|
|
|
|
|
|
lastYear.add(fcff.getXszzl2022());
|
|
|
|
|
lastYear.add(fcff.getYysr2022());
|
|
|
|
|
lastYear.add(fcff.getShjyjlr2022());
|
|
|
|
|
lastYear.add(fcff.getZjtx2022());
|
|
|
|
|
lastYear.add(fcff.getYyxjmll2022());
|
|
|
|
|
lastYear.add(fcff.getJyyyzbzj2022());
|
|
|
|
|
lastYear.add(fcff.getYyxjjll2022());
|
|
|
|
|
lastYear.add(fcff.getZbzc2022());
|
|
|
|
|
lastYear.add(fcff.getQyzyxjl2022());
|
|
|
|
|
lastYear.add(fcff.getZwzbbzWd2022());
|
|
|
|
|
lastYear.add(fcff.getZwzbcbRd2022());
|
|
|
|
|
lastYear.add(fcff.getGqzbbzWb2022());
|
|
|
|
|
lastYear.add(fcff.getGqzbcbRe2022());
|
|
|
|
|
lastYear.add(fcff.getGszbcbWacc2022());
|
|
|
|
|
lastYear.add(fcff.getQyjz2022());
|
|
|
|
|
|
|
|
|
|
thisYear.add(fcff.getXszzl2023());
|
|
|
|
|
thisYear.add(fcff.getYysr2023());
|
|
|
|
|
thisYear.add(fcff.getShjyjlr2023());
|
|
|
|
|
thisYear.add(fcff.getZjtx2023());
|
|
|
|
|
thisYear.add(fcff.getYyxjmll2013());
|
|
|
|
|
thisYear.add(fcff.getJyyyzbzj2023());
|
|
|
|
|
thisYear.add(fcff.getYyxjjll2023());
|
|
|
|
|
thisYear.add(fcff.getZbzc2023());
|
|
|
|
|
thisYear.add(fcff.getQyzyxjl2023());
|
|
|
|
|
thisYear.add(fcff.getZwzbbzWd2023());
|
|
|
|
|
thisYear.add(fcff.getZwzbcbRd2023());
|
|
|
|
|
thisYear.add(fcff.getGqzbbzWb2023());
|
|
|
|
|
thisYear.add(fcff.getGqzbcbRe2023());
|
|
|
|
|
thisYear.add(fcff.getGszbcbWacc2023());
|
|
|
|
|
thisYear.add(fcff.getQyjz2023());
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(jsxmList.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastThreeYearList.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(ycxm.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastTwoYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(thisYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 8; i < 15; i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph("", 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph("", 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(ycxm.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastTwoYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(thisYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
document.add(table);
|
|
|
|
|
document.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("exportFCFEPDF")
|
|
|
|
|
@ApiOperation("绝对估值法FCFE-PDF导出")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public void exportFCFEPDF(@ApiParam("HttpServletResponse") HttpServletResponse response,
|
|
|
|
|
@ApiParam("flow_id") @RequestParam String flowId) throws IOException, DocumentException {
|
|
|
|
|
Document document = new Document();
|
|
|
|
|
// 创建 PdfWriter 对象 第一个参数是对文档对象的引用,第二个参数是文件的实际名称,在该名称中还会给出其输出路径。
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(("绝对估值报告" + "." + "pdf"), CharsetUtil.UTF_8));
|
|
|
|
|
PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
|
|
|
|
|
writer.setPageEvent(new HeaderAndFooterEvent());
|
|
|
|
|
document.open();
|
|
|
|
|
HeaderAndFooterEvent.tpl = writer.getDirectContent().createTemplate(500, 500);
|
|
|
|
|
HeaderAndFooterEvent.PAGE_NUMBER = true;//实现页眉跟页脚
|
|
|
|
|
HeaderAndFooterEvent.HeaderLeft = "";//左上角
|
|
|
|
|
HeaderAndFooterEvent.HeaderRight = "";//右上角
|
|
|
|
|
HeaderAndFooterEvent.FooterLeft = "";//左下角
|
|
|
|
|
HeaderAndFooterEvent.FooterRight = "深圳市天择教育科技有限公司";//右下角
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "宋体", 25, Font.BOLD);
|
|
|
|
|
//添加一个空段落来占位,五个参数分别为:内容,对齐方式(1为居中,0为居左,2为居右),段后空行数,段前空行数,行间距
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph(" ", 1, 200, 0, 1.5f));
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph("天择投资银行业务教学系统", 1, 1.5f));
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.GRAY, "宋体", 18, Font.BOLD);
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph("绝对估值分析报告-股权自由现金流FCFF", 1, 1.5f));
|
|
|
|
|
|
|
|
|
|
document.newPage(); //换第二页 目录
|
|
|
|
|
|
|
|
|
|
PdfPTable table = new PdfPTable(6);
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell1= new PdfPCell(HeaderAndFooterEvent.AddParagraph("输入核心参数", 0, 1.5f));
|
|
|
|
|
cell1.setColspan(2); // 设置单元格跨两行
|
|
|
|
|
table.addCell(cell1);
|
|
|
|
|
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell2= new PdfPCell(HeaderAndFooterEvent.AddParagraph("预测值", 0, 1.5f));
|
|
|
|
|
cell2.setColspan(4); // 设置单元格跨四行
|
|
|
|
|
table.addCell(cell2);
|
|
|
|
|
|
|
|
|
|
ArrayList<String> headList = new ArrayList<>();
|
|
|
|
|
headList.add("假设项目");
|
|
|
|
|
headList.add("2020-12-31");
|
|
|
|
|
headList.add("预测项目");
|
|
|
|
|
headList.add("2021-12-31");
|
|
|
|
|
headList.add("2022-12-31");
|
|
|
|
|
headList.add("2023-12-31");
|
|
|
|
|
for (int i = 0; i < headList.size(); i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(headList.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EduFCFE fcfe = eduFCFEService.selectFCFEByFlowId(flowId);
|
|
|
|
|
List<String> jsxmList=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastThreeYearList=new ArrayList<>();
|
|
|
|
|
List<String> ycxm=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastYear=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastTwoYear=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> thisYear=new ArrayList<>();
|
|
|
|
|
jsxmList.add("营业收入");
|
|
|
|
|
jsxmList.add("净负债");
|
|
|
|
|
jsxmList.add("股东权益");
|
|
|
|
|
jsxmList.add("净利润");
|
|
|
|
|
jsxmList.add("股权价值");
|
|
|
|
|
|
|
|
|
|
lastThreeYearList.add(fcfe.getYysr2020());
|
|
|
|
|
lastThreeYearList.add(fcfe.getJfz2020());
|
|
|
|
|
lastThreeYearList.add(fcfe.getGdqy2020());
|
|
|
|
|
lastThreeYearList.add(fcfe.getJlr2020());
|
|
|
|
|
lastThreeYearList.add(fcfe.getGqjz2020());
|
|
|
|
|
|
|
|
|
|
ycxm.add("销售增长率");
|
|
|
|
|
ycxm.add("营业收入");
|
|
|
|
|
ycxm.add("净负债");
|
|
|
|
|
ycxm.add("股东权益");
|
|
|
|
|
ycxm.add("净利润");
|
|
|
|
|
ycxm.add("股权资本成本Re");
|
|
|
|
|
ycxm.add("股权现金流");
|
|
|
|
|
ycxm.add("股权价值");
|
|
|
|
|
|
|
|
|
|
lastTwoYear.add(fcfe.getXszzl2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getYysr2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getJfz2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getGdqy2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getJlr2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getGqzbcbre2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getGqxjl2021());
|
|
|
|
|
lastTwoYear.add(fcfe.getGqjz2021());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lastYear.add(fcfe.getXszzl2022());
|
|
|
|
|
lastYear.add(fcfe.getYysr2022());
|
|
|
|
|
lastYear.add(fcfe.getJfz2022());
|
|
|
|
|
lastYear.add(fcfe.getGdqy2022());
|
|
|
|
|
lastYear.add(fcfe.getJlr2022());
|
|
|
|
|
lastYear.add(fcfe.getGqzbcbre2022());
|
|
|
|
|
lastYear.add(fcfe.getGqxjl2022());
|
|
|
|
|
lastYear.add(fcfe.getGqjz2022());
|
|
|
|
|
|
|
|
|
|
thisYear.add(fcfe.getXszzl2023());
|
|
|
|
|
thisYear.add(fcfe.getYysr2023());
|
|
|
|
|
thisYear.add(fcfe.getJfz2023());
|
|
|
|
|
thisYear.add(fcfe.getGdqy2023());
|
|
|
|
|
thisYear.add(fcfe.getJlr2023());
|
|
|
|
|
thisYear.add(fcfe.getGqzbcbre2023());
|
|
|
|
|
thisYear.add(fcfe.getGqxjl2023());
|
|
|
|
|
thisYear.add(fcfe.getGqjz2023());
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 5; i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(jsxmList.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastThreeYearList.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(ycxm.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastTwoYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(thisYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 5; i < 8; i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph("", 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph("", 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(ycxm.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastTwoYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(thisYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
document.add(table);
|
|
|
|
|
document.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("exportDDMPDF")
|
|
|
|
|
@ApiOperation("绝对估值法DDM-PDF导出")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public void exportDDMPDF(@ApiParam("HttpServletResponse") HttpServletResponse response,
|
|
|
|
|
@ApiParam("flow_id") @RequestParam String flowId) throws IOException, DocumentException {
|
|
|
|
|
Document document = new Document();
|
|
|
|
|
// 创建 PdfWriter 对象 第一个参数是对文档对象的引用,第二个参数是文件的实际名称,在该名称中还会给出其输出路径。
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(("绝对估值报告" + "." + "pdf"), CharsetUtil.UTF_8));
|
|
|
|
|
PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
|
|
|
|
|
writer.setPageEvent(new HeaderAndFooterEvent());
|
|
|
|
|
document.open();
|
|
|
|
|
HeaderAndFooterEvent.tpl = writer.getDirectContent().createTemplate(500, 500);
|
|
|
|
|
HeaderAndFooterEvent.PAGE_NUMBER = true;//实现页眉跟页脚
|
|
|
|
|
HeaderAndFooterEvent.HeaderLeft = "";//左上角
|
|
|
|
|
HeaderAndFooterEvent.HeaderRight = "";//右上角
|
|
|
|
|
HeaderAndFooterEvent.FooterLeft = "";//左下角
|
|
|
|
|
HeaderAndFooterEvent.FooterRight = "深圳市天择教育科技有限公司";//右下角
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "宋体", 25, Font.BOLD);
|
|
|
|
|
//添加一个空段落来占位,五个参数分别为:内容,对齐方式(1为居中,0为居左,2为居右),段后空行数,段前空行数,行间距
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph(" ", 1, 200, 0, 1.5f));
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph("天择投资银行业务教学系统", 1, 1.5f));
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.GRAY, "宋体", 18, Font.BOLD);
|
|
|
|
|
document.add(HeaderAndFooterEvent.AddParagraph("绝对估值分析报告-股利贴现DDM", 1, 1.5f));
|
|
|
|
|
|
|
|
|
|
document.newPage(); //换第二页 目录
|
|
|
|
|
|
|
|
|
|
PdfPTable table = new PdfPTable(4);
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell1= new PdfPCell(HeaderAndFooterEvent.AddParagraph("预测值", 0, 1.5f));
|
|
|
|
|
cell1.setColspan(4); // 设置单元格跨两行
|
|
|
|
|
table.addCell(cell1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ArrayList<String> headList = new ArrayList<>();
|
|
|
|
|
headList.add("预测项目");
|
|
|
|
|
headList.add("2021-12-31");
|
|
|
|
|
headList.add("2022-12-31");
|
|
|
|
|
headList.add("2023-12-31");
|
|
|
|
|
for (int i = 0; i < headList.size(); i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(headList.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EduDDM ddm = eduDDMService.selectDDMByFlowId(flowId);
|
|
|
|
|
List<String> ycxm=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastYear=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> lastTwoYear=new ArrayList<>();
|
|
|
|
|
List<BigDecimal> thisYear=new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
ycxm.add("期望股利(每股)");
|
|
|
|
|
ycxm.add("股东必要报酬率");
|
|
|
|
|
ycxm.add("股利年增长率");
|
|
|
|
|
ycxm.add("公司发行股票的内在价值");
|
|
|
|
|
|
|
|
|
|
lastTwoYear.add(ddm.getQwgl2021());
|
|
|
|
|
lastTwoYear.add(ddm.getGdbybcl2021());
|
|
|
|
|
lastTwoYear.add(ddm.getGlnzzl2021());
|
|
|
|
|
lastTwoYear.add(ddm.getGsfxgpdnzjz2021());
|
|
|
|
|
|
|
|
|
|
lastYear.add(ddm.getQwgl2022());
|
|
|
|
|
lastYear.add(ddm.getGdbybcl2022());
|
|
|
|
|
lastYear.add(ddm.getGlnzzl2022());
|
|
|
|
|
lastYear.add(ddm.getGsfxgpdnzjz2022());
|
|
|
|
|
|
|
|
|
|
thisYear.add(ddm.getQwgl2023());
|
|
|
|
|
thisYear.add(ddm.getGdbybcl2023());
|
|
|
|
|
thisYear.add(ddm.getGlnzzl2023());
|
|
|
|
|
thisYear.add(ddm.getGsfxgpdnzjz2023());
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
|
|
|
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
|
|
|
|
|
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(ycxm.get(i), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastTwoYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(lastYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
|
|
|
|
|
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(String.valueOf(thisYear.get(i)), 0, 1.5f));
|
|
|
|
|
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
|
|
|
|
|
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
|
|
|
|
|
table.addCell(cell_data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
document.add(table);
|
|
|
|
|
document.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|