小班禁止添加备课&学校显示截至日期

This commit is contained in:
sk1551 2021-01-30 15:12:56 +08:00
parent 128fb0dd4f
commit e83d4754cb
6 changed files with 176 additions and 152 deletions

View File

@ -116,6 +116,7 @@
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<!--<el-table-column label="创建人" align="center" prop="createUser" />--> <!--<el-table-column label="创建人" align="center" prop="createUser" />-->
<el-table-column label="创建时间" align="center" prop="createTime" /> <el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="开通截至时间" align="center" prop="openDeadline" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

View File

@ -102,6 +102,11 @@ public class ByMathTermplanController extends BaseController {
String classId = schoolCommon.getClassId(); String classId = schoolCommon.getClassId();
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
// 判断当前班级是否为托班
String bjtypeNew = byClassService.selectByClassById(classId).getBjtype();
if (bjtypeNew.equals("1")) {
return AjaxResult.error("当前班级为托班,无法创建计划");
}else {
int iCount = schoolCommon.getDifMonth(byMathTermplan.getStartmonth(), byMathTermplan.getEndmonth()); int iCount = schoolCommon.getDifMonth(byMathTermplan.getStartmonth(), byMathTermplan.getEndmonth());
System.out.println("月份差=" + iCount); System.out.println("月份差=" + iCount);
String uuid = schoolCommon.getUuid(); String uuid = schoolCommon.getUuid();
@ -124,6 +129,7 @@ public class ByMathTermplanController extends BaseController {
byMathTermplanitemService.insertByMathTermplanitem(byMathTermplanitem); byMathTermplanitemService.insertByMathTermplanitem(byMathTermplanitem);
} }
return toAjax(byMathTermplanService.insertByMathTermplan(byMathTermplan)); return toAjax(byMathTermplanService.insertByMathTermplan(byMathTermplan));
}
} else { } else {
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划"); return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
} }

View File

@ -110,7 +110,11 @@ public class ByThemeMonthplanController extends BaseController {
String classId = schoolCommon.getClassId(); String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号 //首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
// 判断当前班级是否为托班
String bjtypeNew = byClassService.selectByClassById(classId).getBjtype();
if (bjtypeNew.equals("1")) {
return AjaxResult.error("当前班级为托班,无法创建计划");
}else {
//根据当前月份 查找学期计划的主题 //根据当前月份 查找学期计划的主题
ByThemeTermplan byThemeTermplan = new ByThemeTermplan(); ByThemeTermplan byThemeTermplan = new ByThemeTermplan();
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
@ -152,6 +156,7 @@ public class ByThemeMonthplanController extends BaseController {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")"); byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")");
return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan)); return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
}
} else { } else {
return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划"); return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划");
} }

View File

@ -10,6 +10,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.domain.ByThemeTermplanitem; import com.ruoyi.project.benyi.domain.ByThemeTermplanitem;
import com.ruoyi.project.benyi.service.IByThemeTermplanitemService; import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
import com.ruoyi.project.common.SchoolCommon; import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.domain.ByClass;
import com.ruoyi.project.system.service.IByClassService; import com.ruoyi.project.system.service.IByClassService;
import com.ruoyi.project.system.service.ISysUserService; import com.ruoyi.project.system.service.ISysUserService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -106,7 +107,11 @@ public class ByThemeTermplanController extends BaseController {
String classId = schoolCommon.getClassId(); String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号 //首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
// 判断当前班级是否为托班
String bjtypeNew = byClassService.selectByClassById(classId).getBjtype();
if (bjtypeNew.equals("1")) {
return AjaxResult.error("当前班级为托班,无法创建计划");
}else {
ByThemeTermplan mybyThemeTermplan = new ByThemeTermplan(); ByThemeTermplan mybyThemeTermplan = new ByThemeTermplan();
String xnxqNew = null; String xnxqNew = null;
List<ByThemeTermplan> list = null; List<ByThemeTermplan> list = null;
@ -152,6 +157,7 @@ public class ByThemeTermplanController extends BaseController {
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan)); return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
} }
}
} else { } else {
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划"); return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
} }

View File

@ -115,7 +115,11 @@ public class ByThemeWeekplanController extends BaseController {
String classId = schoolCommon.getClassId(); String classId = schoolCommon.getClassId();
//首先判断当前账户是否为幼儿园账号 //首先判断当前账户是否为幼儿园账号
if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
// 判断当前班级是否为托班
String bjtypeNew = byClassService.selectByClassById(classId).getBjtype();
if (bjtypeNew.equals("1")) {
return AjaxResult.error("当前班级为托班,无法创建计划");
}else {
//判断当前班级是否创建月计划 //判断当前班级是否创建月计划
ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan(); ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan();
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
@ -181,8 +185,8 @@ public class ByThemeWeekplanController extends BaseController {
} }
} }
} }
return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan)); return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan));
}
} else { } else {
return AjaxResult.error("当前用户非幼儿园教师,无法创建周计划"); return AjaxResult.error("当前用户非幼儿园教师,无法创建周计划");
} }

View File

@ -1,5 +1,6 @@
package com.ruoyi.project.system.domain; package com.ruoyi.project.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.aspectj.lang.annotation.Excel;
@ -130,6 +131,7 @@ public class BySchool extends BaseEntity
/** 开通截至日期 */ /** 开通截至日期 */
@Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date openDeadline; private Date openDeadline;
/** 当前学年 */ /** 当前学年 */