修改主题整合学期计划创建学期限制
This commit is contained in:
parent
fe79121520
commit
60cf0c6929
@ -215,7 +215,7 @@ export default {
|
|||||||
//主题活动
|
//主题活动
|
||||||
getThemeActivityList(themeid) {
|
getThemeActivityList(themeid) {
|
||||||
listActivityByThemeId(themeid).then((response) => {
|
listActivityByThemeId(themeid).then((response) => {
|
||||||
//console.log(response.rows);
|
console.log(response.rows);
|
||||||
this.themeactivityOptions = response.rows;
|
this.themeactivityOptions = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -106,35 +106,50 @@ 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)) {
|
||||||
int iCount = schoolCommon.getDifMonth(byThemeTermplan.getStartmonth(), byThemeTermplan.getEndmonth());
|
|
||||||
System.out.println("月份差=" + iCount);
|
|
||||||
String uuid = schoolCommon.getUuid();
|
|
||||||
byThemeTermplan.setId(uuid);
|
|
||||||
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
|
||||||
byThemeTermplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
|
||||||
byThemeTermplan.setClassid(classId);
|
|
||||||
byThemeTermplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合学期计划");
|
|
||||||
|
|
||||||
ByThemeTermplanitem byThemeTermplanitem = null;
|
ByThemeTermplan mybyThemeTermplan = new ByThemeTermplan();
|
||||||
for (int i = 0; i <= iCount; i++) {
|
String xnxqNew = null;
|
||||||
byThemeTermplanitem = new ByThemeTermplanitem();
|
List<ByThemeTermplan> list = null;
|
||||||
byThemeTermplanitem.setTpid(uuid);
|
xnxqNew = byThemeTermplan.getXnxq();
|
||||||
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
mybyThemeTermplan.setXnxq(xnxqNew);
|
||||||
|
mybyThemeTermplan.setStartmonth(null);
|
||||||
|
mybyThemeTermplan.setEndmonth(null);
|
||||||
|
list = byThemeTermplanService.selectByThemeTermplanList(mybyThemeTermplan);
|
||||||
|
// 判断是否存在当前学期计划
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
return AjaxResult.error("当前学年学期计划已经存在,无法创建学期计划");
|
||||||
|
}else {
|
||||||
|
int iCount = schoolCommon.getDifMonth(byThemeTermplan.getStartmonth(), byThemeTermplan.getEndmonth());
|
||||||
|
System.out.println("月份差=" + iCount);
|
||||||
|
String uuid = schoolCommon.getUuid();
|
||||||
|
byThemeTermplan.setId(uuid);
|
||||||
|
byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
|
byThemeTermplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||||
|
byThemeTermplan.setClassid(classId);
|
||||||
|
byThemeTermplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合学期计划");
|
||||||
|
|
||||||
|
|
||||||
|
ByThemeTermplanitem byThemeTermplanitem = null;
|
||||||
|
for (int i = 0; i <= iCount; i++) {
|
||||||
|
byThemeTermplanitem = new ByThemeTermplanitem();
|
||||||
|
byThemeTermplanitem.setTpid(uuid);
|
||||||
|
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||||
// //月份加1
|
// //月份加1
|
||||||
// Calendar calendar = Calendar.getInstance();
|
// Calendar calendar = Calendar.getInstance();
|
||||||
// calendar.setTime(byThemeTermplan.getStartmonth());
|
// calendar.setTime(byThemeTermplan.getStartmonth());
|
||||||
// calendar.add(Calendar.MONTH, i);
|
// calendar.add(Calendar.MONTH, i);
|
||||||
|
|
||||||
byThemeTermplanitem.setMonth(schoolCommon.DateAddMonths(i, byThemeTermplan.getStartmonth()));
|
byThemeTermplanitem.setMonth(schoolCommon.DateAddMonths(i, byThemeTermplan.getStartmonth()));
|
||||||
|
|
||||||
//创建时间
|
//创建时间
|
||||||
byThemeTermplanitem.setCreateTime(new Date());
|
byThemeTermplanitem.setCreateTime(new Date());
|
||||||
|
|
||||||
//新增每月计划
|
//新增每月计划
|
||||||
byThemeTermplanitemService.insertByThemeTermplanitem(byThemeTermplanitem);
|
byThemeTermplanitemService.insertByThemeTermplanitem(byThemeTermplanitem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
|
||||||
}
|
}
|
||||||
|
|
||||||
return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan));
|
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
|
return AjaxResult.error("当前用户非幼儿园教师,无法创建计划");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user