班级信息,多角色。

This commit is contained in:
zhanglipeng 2021-08-16 11:27:25 +08:00
parent 5e294546fe
commit d235b5367d
14 changed files with 139 additions and 8 deletions

View File

@ -9,6 +9,15 @@ export function listMathtermplan(query) {
})
}
// 查询游戏数学学期计划列表
export function listMathtermplansp(query) {
return request({
url: '/benyi/mathtermplan/listsp',
method: 'get',
params: query
})
}
// 查询游戏数学学期计划详细
export function getMathtermplan(id) {
return request({

View File

@ -9,6 +9,15 @@ export function listMonthplan(query) {
})
}
// 查询主题整合月计划列表
export function listMonthplansp(query) {
return request({
url: '/benyi/thememonthplan/listsp',
method: 'get',
params: query
})
}
// 查询主题整合月计划详细
export function getMonthplan(id) {
return request({

View File

@ -9,6 +9,15 @@ export function listTermplan(query) {
})
}
// 查询主题整合学期计划列表
export function listTermplansp(query) {
return request({
url: '/benyi/themetermplan/listsp',
method: 'get',
params: query
})
}
// 查询主题整合学期计划详细
export function getTermplan(id) {
return request({

View File

@ -9,6 +9,15 @@ export function listWeekplan(query) {
})
}
// 查询主题整合周计划(根据月计划明细)列表
export function listWeekplansp(query) {
return request({
url: '/benyi/themeweekplan/listsp',
method: 'get',
params: query
})
}
// 查询主题整合周计划(根据月计划明细)详细
export function getWeekplan(id) {
return request({

View File

@ -236,7 +236,7 @@
<script>
import {
listMathtermplan,
listMathtermplansp,
getMathtermplan,
delMathtermplan,
addMathtermplan,
@ -323,7 +323,7 @@ export default {
/** 查询游戏数学学期计划列表 */
getList() {
this.loading = true;
listMathtermplan(this.queryParams).then((response) => {
listMathtermplansp(this.queryParams).then((response) => {
this.mathtermplanList = response.rows;
this.total = response.total;
this.loading = false;

View File

@ -270,7 +270,7 @@
<script>
import {
listMonthplan,
listMonthplansp,
getMonthplan,
updateMonthplan,
} from "@/api/benyi/thememonthplan";
@ -416,7 +416,7 @@ export default {
/** 查询主题整合月计划列表 */
getList() {
this.loading = true;
listMonthplan(this.queryParams).then((response) => {
listMonthplansp(this.queryParams).then((response) => {
this.monthplanList = response.rows;
this.total = response.total;
this.loading = false;

View File

@ -236,7 +236,7 @@
<script>
import {
listTermplan,
listTermplansp,
getTermplan,
updateTermplan,
} from "@/api/benyi/themetermplan";
@ -342,7 +342,7 @@ export default {
/** 查询主题整合学期计划列表 */
getList() {
this.loading = true;
listTermplan(this.queryParams).then((response) => {
listTermplansp(this.queryParams).then((response) => {
this.termplanList = response.rows;
this.total = response.total;
this.loading = false;

View File

@ -265,7 +265,7 @@
<script>
import {
listWeekplan,
listWeekplansp,
getWeekplan,
updateWeekplan,
} from "@/api/benyi/themeweekplan";
@ -373,7 +373,7 @@ export default {
/** 查询主题整合周计划(根据月计划明细)列表 */
getList() {
this.loading = true;
listWeekplan(this.queryParams).then((response) => {
listWeekplansp(this.queryParams).then((response) => {
this.weekplanList = response.rows;
this.total = response.total;
this.loading = false;

View File

@ -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);
}
/**
* 导出游戏数学学期计划列表
*/

View File

@ -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);
}
/**
* 导出主题整合月计划列表
*/

View File

@ -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);
}
/**
* 导出主题整合学期计划列表
*/

View File

@ -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);
}
/**
* 导出主题整合周计划根据月计划明细列表
*/

View File

@ -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);

View File

@ -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();