Package org.jeecgframework.web.system.pojo.base

Examples of org.jeecgframework.web.system.pojo.base.TSFunction


   * @author tanghan 2013-7-23
   */
  private void repairOperation() {
    TSIcon back = commonDao.findByProperty(TSIcon.class, "iconName", "返回")
        .get(0);
    TSFunction function = commonDao.findByProperty(TSFunction.class,
        "functionName", "Demo示例").get(0);

    TSOperation add = new TSOperation();
    add.setOperationname("录入");
    add.setOperationcode("add");
View Full Code Here


    TSIcon pie = commonDao.findByProperty(TSIcon.class, "iconName", "饼图")
        .get(0);
    TSIcon folder = commonDao.findByProperty(TSIcon.class, "iconName",
        "文件夹").get(0);
    org.jeecgframework.core.util.LogUtil.info(pic.getIconPath());
    TSFunction autoinput = new TSFunction();
    autoinput.setFunctionName("Online 开发");
    autoinput.setFunctionUrl("");
    autoinput.setFunctionLevel((short) 0);
    autoinput.setFunctionOrder("1");
    autoinput.setTSIcon(folder);
    commonDao.saveOrUpdate(autoinput);

    TSFunction sys = new TSFunction();
    sys.setFunctionName("系统管理");
    sys.setFunctionUrl("");
    sys.setFunctionLevel((short) 0);
    sys.setFunctionOrder("5");
    sys.setTSIcon(group_add);
    commonDao.saveOrUpdate(sys);

    TSFunction state = new TSFunction();
    state.setFunctionName("统计查询");
    state.setFunctionUrl("");
    state.setFunctionLevel((short) 0);
    state.setFunctionOrder("3");
    state.setTSIcon(folder);
    commonDao.saveOrUpdate(state);

    TSFunction commondemo = new TSFunction();
    commondemo.setFunctionName("常用示例");
    commondemo.setFunctionUrl("");
    commondemo.setFunctionLevel((short) 0);
    commondemo.setFunctionOrder("8");
    commondemo.setTSIcon(pic);
    commonDao.saveOrUpdate(commondemo);

    TSFunction syscontrol = new TSFunction();
    syscontrol.setFunctionName("系统监控");
    syscontrol.setFunctionUrl("");
    syscontrol.setFunctionLevel((short) 0);
    syscontrol.setFunctionOrder("11");
    syscontrol.setTSIcon(pic);
    commonDao.saveOrUpdate(syscontrol);
    TSFunction user = new TSFunction();
    user.setFunctionName("用户管理");
    user.setFunctionUrl("userController.do?user");
    user.setFunctionLevel((short) 1);
    user.setFunctionOrder("5");
    user.setTSFunction(sys);
    user.setTSIcon(pic);
    commonDao.saveOrUpdate(user);

    TSFunction role = new TSFunction();
    role.setFunctionName("角色管理");
    role.setFunctionUrl("roleController.do?role");
    role.setFunctionLevel((short) 1);
    role.setFunctionOrder("6");
    role.setTSFunction(sys);
    role.setTSIcon(pic);
    commonDao.saveOrUpdate(role);

    TSFunction menu = new TSFunction();
    menu.setFunctionName("菜单管理");
    menu.setFunctionUrl("functionController.do?function");
    menu.setFunctionLevel((short) 1);
    menu.setFunctionOrder("7");
    menu.setTSFunction(sys);
    menu.setTSIcon(pic);
    commonDao.saveOrUpdate(menu);

    TSFunction typegroup = new TSFunction();
    typegroup.setFunctionName("数据字典");
    typegroup.setFunctionUrl("systemController.do?typeGroupList");
    typegroup.setFunctionLevel((short) 1);
    typegroup.setFunctionOrder("6");
    typegroup.setTSFunction(sys);
    typegroup.setTSIcon(pic);
    commonDao.saveOrUpdate(typegroup);

    TSFunction icon = new TSFunction();
    icon.setFunctionName("图标管理");
    icon.setFunctionUrl("iconController.do?icon");
    icon.setFunctionLevel((short) 1);
    icon.setFunctionOrder("18");
    icon.setTSFunction(sys);
    icon.setTSIcon(pic);
    commonDao.saveOrUpdate(icon);

    TSFunction depart = new TSFunction();
    depart.setFunctionName("部门管理");
    depart.setFunctionUrl("departController.do?depart");
    depart.setFunctionLevel((short) 1);
    depart.setFunctionOrder("22");
    depart.setTSFunction(sys);
    depart.setTSIcon(pic);
    commonDao.saveOrUpdate(depart);
   
    TSFunction territory = new TSFunction();
    territory.setFunctionName("地域管理");
    territory.setFunctionUrl("territoryController.do?territory");
    territory.setFunctionLevel((short) 1);
    territory.setFunctionOrder("22");
    territory.setTSFunction(sys);
    territory.setTSIcon(pie);
    commonDao.saveOrUpdate(territory);
    TSFunction useranalyse = new TSFunction();
    useranalyse.setFunctionName("用户分析");
    useranalyse.setFunctionUrl("logController.do?statisticTabs&isIframe");
    useranalyse.setFunctionLevel((short) 1);
    useranalyse.setFunctionOrder("17");
    useranalyse.setTSFunction(state);
    useranalyse.setTSIcon(pie);
    commonDao.saveOrUpdate(useranalyse);
    TSFunction formconfig = new TSFunction();
    formconfig.setFunctionName("表单配置");
    formconfig.setFunctionUrl("cgFormHeadController.do?cgFormHeadList");
    formconfig.setFunctionLevel((short) 1);
    formconfig.setFunctionOrder("1");
    formconfig.setTSFunction(autoinput);
    formconfig.setTSIcon(pic);
    commonDao.saveOrUpdate(formconfig);
    TSFunction formconfig1 = new TSFunction();
    formconfig1.setFunctionName("动态报表配置");
    formconfig1.setFunctionUrl("cgreportConfigHeadController.do?cgreportConfigHead");
    formconfig1.setFunctionLevel((short) 1);
    formconfig1.setFunctionOrder("2");
    formconfig1.setTSFunction(autoinput);
    formconfig1.setTSIcon(pic);
    commonDao.saveOrUpdate(formconfig1);
    TSFunction druid = new TSFunction();
    druid.setFunctionName("数据监控");
    druid.setFunctionUrl("dataSourceController.do?goDruid&isIframe");
    druid.setFunctionLevel((short) 1);
    druid.setFunctionOrder("11");
    druid.setTSFunction(syscontrol);
    druid.setTSIcon(pic);
    commonDao.saveOrUpdate(druid);

    TSFunction log = new TSFunction();
    log.setFunctionName("系统日志");
    log.setFunctionUrl("logController.do?log");
    log.setFunctionLevel((short) 1);
    log.setFunctionOrder("21");
    log.setTSFunction(syscontrol);
    log.setTSIcon(pic);
    commonDao.saveOrUpdate(log);
   
    TSFunction timeTask = new TSFunction();
    timeTask.setFunctionName("定时任务");
    timeTask.setFunctionUrl("timeTaskController.do?timeTask");
    timeTask.setFunctionLevel((short) 1);
    timeTask.setFunctionOrder("21");
    timeTask.setTSFunction(syscontrol);
    timeTask.setTSIcon(pic);
    commonDao.saveOrUpdate(timeTask);
    TSFunction formcheck = new TSFunction();
    formcheck.setFunctionName("表单验证");
    formcheck.setFunctionUrl("demoController.do?formTabs");
    formcheck.setFunctionLevel((short) 1);
    formcheck.setFunctionOrder("1");
    formcheck.setTSFunction(commondemo);
    formcheck.setTSIcon(pic);
    commonDao.saveOrUpdate(formcheck);

    TSFunction demo = new TSFunction();
    demo.setFunctionName("Demo示例");
    demo.setFunctionUrl("jeecgDemoController.do?jeecgDemo");
    demo.setFunctionLevel((short) 1);
    demo.setFunctionOrder("2");
    demo.setTSFunction(commondemo);
    demo.setTSIcon(pic);
    commonDao.saveOrUpdate(demo);

    TSFunction minidao = new TSFunction();
    minidao.setFunctionName("Minidao例子");
    minidao.setFunctionUrl("jeecgMinidaoController.do?jeecgMinidao");
    minidao.setFunctionLevel((short) 1);
    minidao.setFunctionOrder("2");
    minidao.setTSFunction(commondemo);
    minidao.setTSIcon(pic);
    commonDao.saveOrUpdate(minidao);

    TSFunction onetable = new TSFunction();
    onetable.setFunctionName("单表模型");
    onetable.setFunctionUrl("jeecgNoteController.do?jeecgNote");
    onetable.setFunctionLevel((short) 1);
    onetable.setFunctionOrder("3");
    onetable.setTSFunction(commondemo);
    onetable.setTSIcon(pic);
    commonDao.saveOrUpdate(onetable);

    TSFunction onetoMany = new TSFunction();
    onetoMany.setFunctionName("一对多模型");
    onetoMany.setFunctionUrl("jeecgOrderMainController.do?jeecgOrderMain");
    onetoMany.setFunctionLevel((short) 1);
    onetoMany.setFunctionOrder("4");
    onetoMany.setTSFunction(commondemo);
    onetoMany.setTSIcon(pic);
    commonDao.saveOrUpdate(onetoMany);

    TSFunction excel = new TSFunction();
    excel.setFunctionName("Excel导入导出");
    excel.setFunctionUrl("courseController.do?course");
    excel.setFunctionLevel((short) 1);
    excel.setFunctionOrder("5");
    excel.setTSFunction(commondemo);
    excel.setTSIcon(pic);
    commonDao.saveOrUpdate(excel);

    TSFunction uploadownload = new TSFunction();
    uploadownload.setFunctionName("上传下载");
    uploadownload
        .setFunctionUrl("commonController.do?listTurn&turn=system/document/filesList");
    uploadownload.setFunctionLevel((short) 1);
    uploadownload.setFunctionOrder("6");
    uploadownload.setTSFunction(commondemo);
    uploadownload.setTSIcon(pic);
    commonDao.saveOrUpdate(uploadownload);

    TSFunction nopaging = new TSFunction();
    nopaging.setFunctionName("无分页列表");
    nopaging.setFunctionUrl("userNoPageController.do?user");
    nopaging.setFunctionLevel((short) 1);
    nopaging.setFunctionOrder("7");
    nopaging.setTSIcon(pic);
    nopaging.setTSFunction(commondemo);
    commonDao.saveOrUpdate(nopaging);

    TSFunction jdbcdemo = new TSFunction();
    jdbcdemo.setFunctionName("jdbc示例");
    jdbcdemo.setFunctionUrl("jeecgJdbcController.do?jeecgJdbc");
    jdbcdemo.setFunctionLevel((short) 1);
    jdbcdemo.setFunctionOrder("8");
    jdbcdemo.setTSFunction(commondemo);
    jdbcdemo.setTSIcon(pic);
    commonDao.saveOrUpdate(jdbcdemo);
   
    TSFunction sqlsep = new TSFunction();
    sqlsep.setFunctionName("SQL分离");
    sqlsep.setFunctionUrl("jeecgJdbcController.do?dictParameter");
    sqlsep.setFunctionLevel((short) 1);
    sqlsep.setTSIcon(pic);
    sqlsep.setFunctionOrder("9");
    sqlsep.setTSFunction(commondemo);
    commonDao.saveOrUpdate(sqlsep);

    TSFunction dicttag = new TSFunction();
    dicttag.setFunctionName("字典标签");
    dicttag.setFunctionUrl("demoController.do?dictSelect");
    dicttag.setFunctionLevel((short) 1);
    dicttag.setFunctionOrder("10");
    dicttag.setTSFunction(commondemo);
    dicttag.setTSIcon(pic);
    commonDao.saveOrUpdate(dicttag);

    TSFunction demomaintain = new TSFunction();
    demomaintain.setFunctionName("表单弹出风格");
    demomaintain.setFunctionUrl("demoController.do?demoList");
    demomaintain.setFunctionLevel((short) 1);
    demomaintain.setFunctionOrder("11");
    demomaintain.setTSFunction(commondemo);
    demomaintain.setTSIcon(pic);
    commonDao.saveOrUpdate(demomaintain);

    TSFunction democlassify = new TSFunction();
    democlassify.setFunctionName("特殊布局");
    democlassify.setFunctionUrl("demoController.do?demoIframe");
    democlassify.setFunctionLevel((short) 1);
    democlassify.setFunctionOrder("12");
    democlassify.setTSFunction(commondemo);
    democlassify.setTSIcon(pic);
    commonDao.saveOrUpdate(democlassify);

    TSFunction notag1 = new TSFunction();
    notag1.setFunctionName("单表例子(无Tag)");
    notag1.setFunctionUrl("jeecgEasyUIController.do?jeecgEasyUI");
    notag1.setFunctionLevel((short) 1);
    notag1.setFunctionOrder("13");
    notag1.setTSFunction(commondemo);
    notag1.setTSIcon(pic);
    commonDao.saveOrUpdate(notag1);

    TSFunction notag2 = new TSFunction();
    notag2.setFunctionName("一对多例子(无Tag)");
    notag2.setFunctionUrl("jeecgOrderMainNoTagController.do?jeecgOrderMainNoTag");
    notag2.setFunctionLevel((short) 1);
    notag2.setFunctionOrder("14");
    notag2.setTSFunction(commondemo);
    notag2.setTSIcon(pic);
    commonDao.saveOrUpdate(notag2);

    TSFunction htmledit = new TSFunction();
    htmledit.setFunctionName("HTML编辑器");
    htmledit.setFunctionUrl("jeecgDemoController.do?ckeditor&isIframe");
    htmledit.setFunctionLevel((short) 1);
    htmledit.setFunctionOrder("15");
    htmledit.setTSFunction(commondemo);
    htmledit.setTSIcon(pic);
    commonDao.saveOrUpdate(htmledit);

    TSFunction weboffice = new TSFunction();
    weboffice.setFunctionName("在线word(IE)");
    weboffice.setFunctionUrl("webOfficeController.do?webOffice");
    weboffice.setFunctionLevel((short) 1);
    weboffice.setFunctionOrder("16");
    weboffice.setTSFunction(commondemo);
    weboffice.setTSIcon(pic);
    commonDao.saveOrUpdate(weboffice);

    TSFunction Office = new TSFunction();
    Office.setFunctionName("WebOffice官方例子");
    Office.setFunctionUrl("webOfficeController.do?webOfficeSample&isIframe");
    Office.setFunctionLevel((short) 1);
    Office.setFunctionOrder("17");
    Office.setTSIcon(pic);
    Office.setTSFunction(commondemo);
    commonDao.saveOrUpdate(Office);

    TSFunction finance = new TSFunction();
    finance.setFunctionName("多附件管理");
    finance.setFunctionUrl("tFinanceController.do?tFinance");
    finance.setFunctionLevel((short) 1);
    finance.setFunctionOrder("18");
    finance.setTSFunction(commondemo);
    finance.setTSIcon(pic);
    commonDao.saveOrUpdate(finance);

    TSFunction userdemo = new TSFunction();
    userdemo.setFunctionName("Datagrid手工Html");
    userdemo.setFunctionUrl("userController.do?userDemo");
    userdemo.setFunctionLevel((short) 1);
    userdemo.setFunctionOrder("19");
    userdemo.setTSFunction(commondemo);
    userdemo.setTSIcon(pic);
    commonDao.saveOrUpdate(userdemo);
    TSFunction matterBom = new TSFunction();
    matterBom.setFunctionName("物料Bom");
    matterBom.setFunctionUrl("jeecgMatterBomController.do?goList");
    matterBom.setFunctionLevel((short) 1);
    matterBom.setFunctionOrder("20");
    matterBom.setTSFunction(commondemo);
    matterBom.setTSIcon(pic);
    commonDao.saveOrUpdate(matterBom);
    TSFunction reportdemo = new TSFunction();
    reportdemo.setFunctionName("报表示例");
    reportdemo.setFunctionUrl("reportDemoController.do?studentStatisticTabs&isIframe");
    reportdemo.setFunctionLevel((short) 1);
    reportdemo.setFunctionOrder("21");
    reportdemo.setTSFunction(state);
    reportdemo.setTSIcon(pie);
    commonDao.saveOrUpdate(reportdemo);
   
    TSFunction ckfinder = new TSFunction();
    ckfinder.setFunctionName("ckfinder例子");
    ckfinder.setFunctionUrl("jeecgDemoCkfinderController.do?jeecgDemoCkfinder");
    ckfinder.setFunctionLevel((short) 1);
    ckfinder.setFunctionOrder("100");
    ckfinder.setTSFunction(commondemo);
    ckfinder.setTSIcon(pic);
    commonDao.saveOrUpdate(ckfinder);
  }
View Full Code Here

public class SetListSort implements Comparator {
  /**
   * 菜单排序比较器
   */
  public int compare(Object o1, Object o2) {
    TSFunction c1 = (TSFunction) o1;
    TSFunction c2 = (TSFunction) o2;
    if (c1.getFunctionOrder() != null && c2.getFunctionOrder() != null) {
      int c1order = oConvertUtils.getInt(c1.getFunctionOrder().substring(c1.getFunctionOrder().indexOf("fun")+3));
      int c2order = oConvertUtils.getInt(c2.getFunctionOrder().substring(c2.getFunctionOrder().indexOf("fun"))+3);
      if (c1order > c2order) {
        return 1;
      } else {
        return -1;
      }
View Full Code Here

    for (TSRoleUser ru : rUsers) {
      TSRole role = ru.getTSRole();
      List<TSRoleFunction> roleFunctionList = systemService.findByProperty(TSRoleFunction.class, "TSRole.id", role.getId());
      if (roleFunctionList.size() > 0) {
        for (TSRoleFunction roleFunction : roleFunctionList) {
          TSFunction function = (TSFunction) roleFunction.getTSFunction();
          loginActionlist.add(function);
        }
      }
    }
    List<TSFunction> bigActionlist = new ArrayList();// 一级权限菜单
    List<TSFunction> smailActionlist = new ArrayList();// 二级权限菜单
    if (loginActionlist.size() > 0) {
      for (TSFunction function : loginActionlist) {
        if (function.getFunctionLevel() == 0) {
          bigActionlist.add(function);
        } else if (function.getFunctionLevel() == 1) {
          smailActionlist.add(function);
        }
      }
    }
    // 菜单栏排序
View Full Code Here

    // ----------------------------------------------------------------
    // ----------------------------------------------------------------
    if (function.getTSFunction().getId().equals("")) {
      function.setTSFunction(null);
    } else {
      TSFunction parent = systemService.getEntity(TSFunction.class,
          function.getTSFunction().getId());
      function.setFunctionLevel(Short.valueOf(parent.getFunctionLevel()
          + 1 + ""));
    }
    if (StringUtil.isNotEmpty(function.getId())) {
      message = "权限: " + function.getFunctionName() + "被更新成功";
      userService.saveOrUpdate(function);
View Full Code Here

        TSRole role = ru.getTSRole();
        List<TSRoleFunction> roleFunctionList = systemService
            .findByProperty(TSRoleFunction.class, "TSRole.id",
                role.getId());
        for (TSRoleFunction roleFunction : roleFunctionList) {
          TSFunction function = roleFunction.getTSFunction();
          loginActionlist.put(function.getId(), function);
        }
      }
      client.setFunctions(loginActionlist);
    }
    return client.getFunctions();
View Full Code Here

      TSRole role = ru.getTSRole();
      List<TSRoleFunction> roleFunctionList = systemService
          .findByProperty(TSRoleFunction.class, "TSRole.id",
              role.getId());
      for (TSRoleFunction roleFunction : roleFunctionList) {
        TSFunction function = roleFunction.getTSFunction();
        loginActionlist.put(function.getId(), function);
      }
    }
   
    if (loginActionlist.size() > 0) {
      Collection<TSFunction> allFunctions = loginActionlist.values();
      for (TSFunction function : allFunctions) {
        if (!functionMap.containsKey(function.getFunctionLevel() + 0)) {
          functionMap.put(function.getFunctionLevel() + 0,
              new ArrayList<TSFunction>());
        }
        functionMap.get(function.getFunctionLevel() + 0).add(function);
      }
      // 菜单栏排序
      Collection<List<TSFunction>> c = functionMap.values();
      for (List<TSFunction> list : c) {
        Collections.sort(list, new NumberComparator());
View Full Code Here

    role = this.systemService.get(TSRole.class, roleid);
    if (role != null) {
      List<TSRoleFunction> roleFunctionList = systemService.findByProperty(TSRoleFunction.class, "TSRole.id", role.getId());
      if (roleFunctionList.size() > 0) {
        for (TSRoleFunction roleFunction : roleFunctionList) {
          TSFunction function = (TSFunction) roleFunction.getTSFunction();
          loginActionlist.add(function);
        }
      }
    }
    ComboTreeModel comboTreeModel = new ComboTreeModel("id", "functionName", "TSFunctions");
View Full Code Here

    String[] roleFunctions = null;
    if (rolefunction != "") {
      roleFunctions = rolefunction.split(",");
      for (String s : roleFunctions) {
        TSRoleFunction rf = new TSRoleFunction();
        TSFunction f = this.systemService.get(TSFunction.class, Integer.valueOf(s));
        rf.setTSFunction(f);
        rf.setTSRole(role);
        this.systemService.save(rf);
      }
    }
View Full Code Here

    role = this.systemService.get(TSRole.class, roleId);
    if (role != null) {
      List<TSRoleFunction> roleFunctionList=systemService.findByProperty(TSRoleFunction.class, "TSRole.id", role.getId());
      if (roleFunctionList.size() > 0) {
        for (TSRoleFunction roleFunction : roleFunctionList) {
          TSFunction function = (TSFunction) roleFunction
              .getTSFunction();
          loginActionlist.add(function);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.jeecgframework.web.system.pojo.base.TSFunction

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.