Package org.jeecgframework.web.cgform.service.impl.config.util

Examples of org.jeecgframework.web.cgform.service.impl.config.util.FieldNumComparator


      String jversion = cgFormFieldService.getCgFormVersionByTableName(configId);
      Map<String, Object> configs = configService.queryConfigs(configId,jversion);
      //表单列集合
      lists = (List<CgFormFieldEntity>) configs.get(CgAutoListConstant.FILEDS);
      // 对字段列按顺序排序
      Collections.sort(lists, new FieldNumComparator());
      //表的中文名称
      sheetName = (String)configs.get(CgAutoListConstant.CONFIG_NAME);
      //表的英文名称
      String tableName = (String)configs.get(CgAutoListConstant.TABLENAME);
      //导出文件名称 form表单中文名-v版本号.xsl
View Full Code Here


  /**
   * 设置OrderNum
   * @param cgFormHead
   */
  private void refreshFormFieldOrderNum(CgFormHeadEntity cgFormHead) {
    Collections.sort(cgFormHead.getColumns(),new FieldNumComparator());
    for(int i = 0;i<cgFormHead.getColumns().size();i++){
      cgFormHead.getColumns().get(i).setOrderNum(i+1);
    }
  }
View Full Code Here

      cq.eq("table.id", cgFormHead.getId());
      cq.add();
      columnList = cgFormFieldService
          .getListByCriteriaQuery(cq, false);
      //对字段列按顺序排序
      Collections.sort(columnList,new FieldNumComparator());
    }else{
      CgFormFieldEntity field = new CgFormFieldEntity();
      field.setFieldName("id");
      field.setLength(36);
      field.setContent("主键");
View Full Code Here

  public String createTableSQL(CgFormHeadEntity cgFormHead) {
    StringBuilder sb = new StringBuilder();
    sb.append("CREATE TABLE ");
    sb.append(cgFormHead.getTableName()+" (");
    CgFormFieldEntity column,agoColumn = null;
    Collections.sort(cgFormHead.getColumns(), new FieldNumComparator());
    String idField = "";
    Collections.sort(cgFormHead.getColumns(),new FieldNumComparator());
    for(int i = 0;i<cgFormHead.getColumns().size();i++){
      if(i>0){agoColumn = cgFormHead.getColumns().get(i-1);}
      column = cgFormHead.getColumns().get(i);
      sb.append(getColumnPorperty(column,agoColumn,false));
      if(column.getIsKey().equals("Y")){
View Full Code Here

    StringBuilder sb = new StringBuilder();
    sb.append(createChangeTableSql(cgFormHead));
    CgFormFieldEntity column,agoColumn = null;
    String idField = "";
    //step1 :对列进行排序
    Collections.sort(cgFormHead.getColumns(),new FieldNumComparator());
    for(int i = 0;i<cgFormHead.getColumns().size();i++){
      if(i>0){agoColumn = cgFormHead.getColumns().get(i-1);}
      column = cgFormHead.getColumns().get(i);
      //step2 :判断是否有这个字段  有 更新  没有 添加
      if(fieldMap.containsKey(DbTableUtil.translatorToDbField(column.getFieldName()))){
View Full Code Here

TOP

Related Classes of org.jeecgframework.web.cgform.service.impl.config.util.FieldNumComparator

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.