コード例 #1
0
 public void $testAddFdyRole() {
   CommonDAOBS bs = (CommonDAOBS) this.getBean("commonDAOBS");
   List<MenuBO> menuList =
       bs.findByHql(
           "from "
               + MenuBO.class.getName()
               + " as bo where bo.text in ('成绩管理', '选修课成绩', '必修课成绩', '用户管理',"
               + "'学生管理',"
               + "'报名管理',"
               + "'查询',"
               + "'手工录入',"
               + "'批量导入',"
               + "'考勤管理',"
               + "'考勤录入',"
               + "'考勤统计',"
               + "'打印证明',"
               + "'在学证明',"
               + "'预毕业证明',"
               + "'毕业证明',"
               + "'就读证明',"
               + "'成绩证明'"
               + ")");
   RoleBO roleBO = new RoleBO();
   roleBO.setRoleCd("R0003");
   roleBO.setRoleName("辅导员");
   roleBO.setMenuList(menuList);
   bs.save(roleBO);
 }
コード例 #2
0
 public void $testAddCWRole() {
   CommonDAOBS bs = (CommonDAOBS) this.getBean("commonDAOBS");
   List<MenuBO> menuList =
       bs.findByHql(
           "from "
               + MenuBO.class.getName()
               + " as bo where bo.text in ("
               + "'报名管理',"
               + "'查询'"
               + ")");
   RoleBO roleBO = new RoleBO();
   roleBO.setRoleCd("R0005");
   roleBO.setRoleName("财务");
   roleBO.setMenuList(menuList);
   bs.save(roleBO);
 }
コード例 #3
0
 public void testAddJWCRole() {
   CommonDAOBS bs = (CommonDAOBS) this.getBean("commonDAOBS");
   List<MenuBO> menuList =
       bs.findByHql(
           "from "
               + MenuBO.class.getName()
               + " as bo where bo.text in ("
               + "'系统管理',"
               + "'年级管理',"
               + "'学期管理',"
               + "'专业管理',"
               + "'班级管理',"
               + "'课程管理',"
               + "'成绩管理',"
               + "'选修课成绩',"
               + "'必修课成绩',"
               + "'手工录入',"
               + "'批量导入',"
               + "'报名管理',"
               + "'查询',"
               + "'考勤管理',"
               + "'考勤统计',"
               + "'课程管理',"
               + "'必须课开课',"
               + "'选修课开课',"
               + "'物资管理',"
               + "'教室管理',"
               + "'教材管理',"
               + "'排课管理',"
               + "'自动排课',"
               + "'手工排课',"
               + "'我的课表',"
               + "'查询',"
               + "'打印证明',"
               + "'在学证明',"
               + "'预毕业证明',"
               + "'毕业证明',"
               + "'就读证明',"
               + "'成绩证明'"
               + ")");
   RoleBO roleBO = new RoleBO();
   roleBO.setRoleCd("R0006");
   roleBO.setRoleName("教务处");
   roleBO.setMenuList(menuList);
   bs.save(roleBO);
 }
コード例 #4
0
 public void $testAddAdminRole() {
   CommonDAOBS bs = (CommonDAOBS) this.getBean("commonDAOBS");
   List<MenuBO> menuList =
       bs.findByHql(
           "from "
               + MenuBO.class.getName()
               + " as bo where bo.text in ('系统管理', '管理员管理', '权限管理', '用户角色管理',"
               + "'角色管理',"
               + "'菜单管理',"
               + "'用户管理',"
               + "'教师管理',"
               + "'学生管理',"
               + "'辅导员管理'"
               + ")");
   RoleBO roleBO = new RoleBO();
   roleBO.setRoleCd("R0001");
   roleBO.setRoleName("系统管理员");
   roleBO.setMenuList(menuList);
   bs.save(roleBO);
 }
コード例 #5
0
 public void $testAddTeacherRole() {
   CommonDAOBS bs = (CommonDAOBS) this.getBean("commonDAOBS");
   List<MenuBO> menuList =
       bs.findByHql(
           "from "
               + MenuBO.class.getName()
               + " as bo where bo.text in ('成绩管理', '选修课成绩', '必修课成绩', '手工录入',"
               + "'批量导入',"
               + "'考勤管理',"
               + "'考勤统计',"
               + "'选修课管理',"
               + "'选修课管理',"
               + "'我的课表',"
               + "'查询'"
               + ")");
   RoleBO roleBO = new RoleBO();
   roleBO.setRoleCd("R0002");
   roleBO.setRoleName("教师");
   roleBO.setMenuList(menuList);
   bs.save(roleBO);
 }