班级信息,多角色。
This commit is contained in:
@ -66,6 +66,19 @@ public class ByMathTermplanController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询游戏数学学期计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:mathtermplan:list')")
|
||||
@GetMapping("/listsp")
|
||||
public TableDataInfo listsp(ByMathTermplan byMathTermplan) {
|
||||
byMathTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
List<ByMathTermplan> list = null;
|
||||
startPage();
|
||||
list = byMathTermplanService.selectByMathTermplanList(byMathTermplan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出游戏数学学期计划列表
|
||||
*/
|
||||
|
@ -74,6 +74,19 @@ public class ByThemeMonthplanController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
|
||||
@GetMapping("/listsp")
|
||||
public TableDataInfo listsp(ByThemeMonthplan byThemeMonthplan) {
|
||||
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
List<ByThemeMonthplan> list = null;
|
||||
startPage();
|
||||
list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出主题整合月计划列表
|
||||
*/
|
||||
|
@ -70,6 +70,19 @@ public class ByThemeTermplanController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主题整合学期计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:list')")
|
||||
@GetMapping("/listsp")
|
||||
public TableDataInfo listsp(ByThemeTermplan byThemeTermplan) {
|
||||
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
List<ByThemeTermplan> list = null;
|
||||
startPage();
|
||||
list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出主题整合学期计划列表
|
||||
*/
|
||||
|
@ -79,6 +79,21 @@ public class ByThemeWeekplanController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主题整合周计划(根据月计划明细)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:list')")
|
||||
@GetMapping("/listsp")
|
||||
public TableDataInfo listsp(ByThemeWeekplan byThemeWeekplan) {
|
||||
|
||||
byThemeWeekplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
List<ByThemeWeekplan> list = null;
|
||||
startPage();
|
||||
list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出主题整合周计划(根据月计划明细)列表
|
||||
*/
|
||||
|
@ -114,6 +114,7 @@ public class SchoolCommon {
|
||||
public String getClassId() {
|
||||
// String strClassId = "-1";
|
||||
SysUser sysUser = getUser();
|
||||
|
||||
ByClass byClass = new ByClass();
|
||||
//根据用户id来设置主班教师,配班教师,助理教师的教师id
|
||||
byClass.setZbjs(sysUser.getUserId());
|
||||
@ -148,6 +149,40 @@ public class SchoolCommon {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前用户是否拥有班级
|
||||
**/
|
||||
public String getClassIdOrSchoolAdmin() {
|
||||
String strClassId = "";
|
||||
SysUser sysUser = getUser();
|
||||
List<SysRole> list = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
System.out.println("roles:" + list.size());
|
||||
|
||||
if (list != null && list.size() > 0) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String strKey = list.get(i).getRoleKey();
|
||||
if (strKey.equals("school_admin") || strKey.equals("school_director")) {
|
||||
strClassId = "~";
|
||||
}
|
||||
}
|
||||
}
|
||||
ByClass byClass = new ByClass();
|
||||
//根据用户id来设置主班教师,配班教师,助理教师的教师id
|
||||
byClass.setZbjs(sysUser.getUserId());
|
||||
byClass.setPbjs(sysUser.getUserId());
|
||||
byClass.setZljs(sysUser.getUserId());
|
||||
//新的返回byclassNew返回整条数据
|
||||
ByClass byClassNew = byClassService.selectByClassByUserId(byClass);
|
||||
//System.out.println("--------------------" + byClassNew);
|
||||
if (byClassNew != null) {
|
||||
//如果实体byclassnew不为空,那么取出它的班级编号
|
||||
strClassId = strClassId + byClassNew.getBjbh();
|
||||
return strClassId;
|
||||
} else {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getCurrentXnXq() {
|
||||
Calendar date = Calendar.getInstance();
|
||||
Integer iYear = date.get(Calendar.YEAR);
|
||||
|
@ -50,9 +50,15 @@ public class ByClassController extends BaseController {
|
||||
public TableDataInfo list(ByClass byClass) {
|
||||
List<ByClass> list = null;
|
||||
String classId = schoolCommon.getClassId();
|
||||
String classIdAndschoolAdmin=schoolCommon.getClassIdOrSchoolAdmin();
|
||||
//如果是幼儿园教师 只显示当前班级
|
||||
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
|
||||
byClass.setBjbh(classId);
|
||||
//如果包含~ 说明是班级教师和管理员角色
|
||||
if(classIdAndschoolAdmin.contains("~")){
|
||||
System.out.println("多角色");
|
||||
byClass.setBjbh("");
|
||||
}
|
||||
} else {
|
||||
}
|
||||
startPage();
|
||||
|
Reference in New Issue
Block a user