Package cn.guoyukun.pdm2pdf.model

Examples of cn.guoyukun.pdm2pdf.model.TableInfo


  private void parseTables(Element ele) throws JDOMException {
    List<Element> tableElements = EXPR_TABLE.evaluate(ele);
    for (Element table : tableElements) {
      // 解析表
      TableInfo tableInfo = parseTable(table);
      tables.put(tableInfo.getCode(), tableInfo);
    }
  }
View Full Code Here


    String tableCode = table.getChildText("Code", A_NS);
    String tableName = table.getChildText("Name", A_NS);
    String tableDesc = table.getChildText("Comment",A_NS);
    LOG.debug("解析表[{}]", tableCode);

    TableInfo t = new TableInfo();
    t.setCode(tableCode);
    t.setName(tableName);
    t.setDesc(tableDesc);
    // 全部字段
    Map<String, ColInfo> allColumns = parseColumns(table);
    Map<String, ColInfo> headerColumns = Maps.newLinkedHashMap();
    Map<String, ColInfo> footerColumns = Maps.newLinkedHashMap();

    //调整pdf文件中字段的顺序
    //通州版
//    final String[] head = new String[]{"ID","ID_FK","UPLOAD_ORG_CODE","PERSON_ID","STATE"};
//    final String[] foot = new String[]{"CREATETIME","LASTUPTIME","SEND_ORG_CODE","SEND_SYSTEM","SEND_TIME"};
   
    //标准版
    final String[] head = new String[]{"ID","UPLOAD_ORG_CODE","SEND_SYSTEM","PERSON_ID","STATE"};
    final String[] foot = new String[]{"ID_FK","CREATETIME","LASTUPTIME","SEND_ORG_CODE","SEND_TIME"};
   
   
    moveColumns(allColumns, headerColumns, head);
    moveColumns(allColumns, footerColumns, foot);
   
    t.setColumns(allColumns);
    t.setHeaderColumns(headerColumns);
    t.setFooterColumns(footerColumns);
    return t;
  }
View Full Code Here

    // 表结构标题
    Paragraph pTitle = new Paragraph(title, Fonts.FONT_TITILE3);
    // 表结构章节
    Section section = parentSection.addSection(pTitle);
    // 生成表结构
    TableInfo tableInfo = tables.get(code);
    addTable(section, tableInfo);
    // 递归子表数
    List<TableTree> subs = tableTree.getSubTables();
    if (subs == null) {
      return;
View Full Code Here

      return;
    }
    String code = tree.getCode();
    LOG.info("添加清单:[{}]", code);
    String rel = tree.getRel();
    TableInfo tableInfo = tables.get(code);
    String name = tableInfo.getName();
    //String desc = tableInfo.getDesc();
    // 表内容
    t.addCell(buildCell(name));
    t.addCell(buildCell(code));
    t.addCell(buildCell(rel));
View Full Code Here

TOP

Related Classes of cn.guoyukun.pdm2pdf.model.TableInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.