班级园历教师生日和幼儿生日提醒
This commit is contained in:
parent
d5751211ff
commit
54d4dffe5b
@ -59,6 +59,8 @@ public class ByCalendarController extends BaseController {
|
|||||||
private IByThemeWeekplanitemService byThemeWeekplanitemService;
|
private IByThemeWeekplanitemService byThemeWeekplanitemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByThemeActivityService byThemeActivityService;
|
private IByThemeActivityService byThemeActivityService;
|
||||||
|
@Autowired
|
||||||
|
private IByChildService byChildService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询园历管理(本一)列表
|
* 查询园历管理(本一)列表
|
||||||
@ -169,12 +171,14 @@ public class ByCalendarController extends BaseController {
|
|||||||
// listvi.addAll(getbyteacherBiths((long)207,formatter,hashMap));
|
// listvi.addAll(getbyteacherBiths((long)207,formatter,hashMap));
|
||||||
|
|
||||||
//根据不同的班级记载班级园历
|
//根据不同的班级记载班级园历
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
String classId = schoolCommon.getClassId();
|
||||||
|
if (!schoolCommon.isStringEmpty(classId)) {
|
||||||
//根据不同的班级加载班级园历
|
//根据不同的班级加载班级园历
|
||||||
listvi.addAll(getbyclasses(schoolCommon.getClassId(), formatter, hashMap));
|
listvi.addAll(getbyclasses(classId, formatter, hashMap));
|
||||||
//加载主题整合活动
|
//加载主题整合活动
|
||||||
listvi.addAll(getbyclassthemes(schoolCommon.getClassId(), formatter, hashMap));
|
listvi.addAll(getbyclassthemes(classId, formatter, hashMap));
|
||||||
//根据班级加载幼儿生日
|
//根据班级加载幼儿生日
|
||||||
|
listvi.addAll(getbychilds(classId, formatter));
|
||||||
}
|
}
|
||||||
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
@ -248,7 +252,7 @@ public class ByCalendarController extends BaseController {
|
|||||||
}
|
}
|
||||||
//生日
|
//生日
|
||||||
if (byTeacherJbxx.getCsrq() != null) {
|
if (byTeacherJbxx.getCsrq() != null) {
|
||||||
String timefor = formatter.format(byTeacherJbxx.getCjgzrq());
|
String timefor = formatter.format(byTeacherJbxx.getCsrq());
|
||||||
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
|
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
|
||||||
|
|
||||||
ByCalendarShow by = new ByCalendarShow();
|
ByCalendarShow by = new ByCalendarShow();
|
||||||
@ -344,4 +348,37 @@ public class ByCalendarController extends BaseController {
|
|||||||
return listvi;
|
return listvi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取班级幼儿生日列表
|
||||||
|
private List<ByCalendarShow> getbychilds(String classId, SimpleDateFormat formatter) {
|
||||||
|
List<ByCalendarShow> listvi = new ArrayList<>();
|
||||||
|
|
||||||
|
Long deptId = SecurityUtils.getLoginUser().getUser().getDept().getDeptId();
|
||||||
|
ByChild byChild = new ByChild();
|
||||||
|
byChild.setSchoolid(deptId);
|
||||||
|
byChild.setClassid(classId);
|
||||||
|
byChild.setStatus("0");
|
||||||
|
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
String strCurrentYear = schoolCommon.getCurrentYear();
|
||||||
|
ByCalendarShow by = null;
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
by = new ByCalendarShow();
|
||||||
|
ByChild byNewChild = list.get(i);
|
||||||
|
if (byNewChild.getCsrq() != null) {
|
||||||
|
by.setId(byNewChild.getId());
|
||||||
|
by.setTitle(byNewChild.getName() + "-生日");
|
||||||
|
|
||||||
|
String timefor = formatter.format(byNewChild.getCsrq());
|
||||||
|
timefor = timefor.replaceAll(timefor.split("-")[0], strCurrentYear);
|
||||||
|
|
||||||
|
by.setStart(timefor);
|
||||||
|
by.setEnd(timefor);
|
||||||
|
by.setColor("#b37feb");
|
||||||
|
listvi.add(by);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return listvi;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,9 @@ public class ByChildCheckinDetailController extends BaseController {
|
|||||||
|
|
||||||
byChildCheckinDetail.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
byChildCheckinDetail.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
//判断是否为班主任
|
//判断是否为班主任
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
String classId = schoolCommon.getClassId();
|
||||||
byChildCheckinDetail.setClassid(schoolCommon.getClassId());
|
if (!schoolCommon.isStringEmpty(classId)) {
|
||||||
|
byChildCheckinDetail.setClassid(classId);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
|
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
|
||||||
|
@ -46,8 +46,9 @@ public class ByChildContactpeopleController extends BaseController {
|
|||||||
startPage();
|
startPage();
|
||||||
byChildContactpeople.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
byChildContactpeople.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
//判断是否为班主任
|
//判断是否为班主任
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
String classId = schoolCommon.getClassId();
|
||||||
byChildContactpeople.setClassid(schoolCommon.getClassId());
|
if (!schoolCommon.isStringEmpty(classId)) {
|
||||||
|
byChildContactpeople.setClassid(classId);
|
||||||
}
|
}
|
||||||
List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople);
|
List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
@ -46,8 +46,9 @@ public class ByChildController extends BaseController {
|
|||||||
startPage();
|
startPage();
|
||||||
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
//判断是否为班主任
|
//判断是否为班主任
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
String classId = schoolCommon.getClassId();
|
||||||
byChild.setClassid(schoolCommon.getClassId());
|
if (!schoolCommon.isStringEmpty(classId) && classId != "-1") {
|
||||||
|
byChild.setClassid(classId);
|
||||||
}
|
}
|
||||||
List<ByChild> list = byChildService.selectByChildList(byChild);
|
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -61,9 +62,10 @@ public class ByChildController extends BaseController {
|
|||||||
public TableDataInfo listByCheck(ByChild byChild) {
|
public TableDataInfo listByCheck(ByChild byChild) {
|
||||||
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
//判断是否为班主任
|
//判断是否为班主任
|
||||||
System.out.println(schoolCommon.getClassId());
|
//System.out.println(schoolCommon.getClassId());
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
String classId = schoolCommon.getClassId();
|
||||||
byChild.setClassid(schoolCommon.getClassId());
|
if (!schoolCommon.isStringEmpty(classId) && classId != "-1") {
|
||||||
|
byChild.setClassid(classId);
|
||||||
}
|
}
|
||||||
List<ByChild> list = byChildService.selectByCheckList(byChild);
|
List<ByChild> list = byChildService.selectByCheckList(byChild);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
@ -33,8 +33,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/benyi/schoolcalendarclass")
|
@RequestMapping("/benyi/schoolcalendarclass")
|
||||||
public class BySchoolcalendarClassController extends BaseController
|
public class BySchoolcalendarClassController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBySchoolcalendarClassService bySchoolcalendarClassService;
|
private IBySchoolcalendarClassService bySchoolcalendarClassService;
|
||||||
|
|
||||||
@ -47,8 +46,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass)
|
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass) {
|
||||||
{
|
|
||||||
String strClassId = schoolCommon.getClassId();
|
String strClassId = schoolCommon.getClassId();
|
||||||
if (!schoolCommon.isStringEmpty(strClassId)) {
|
if (!schoolCommon.isStringEmpty(strClassId)) {
|
||||||
startPage();
|
startPage();
|
||||||
@ -68,8 +66,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass)
|
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass) {
|
||||||
{
|
|
||||||
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||||
//System.out.println("---------------------没有分页"+listAll);
|
//System.out.println("---------------------没有分页"+listAll);
|
||||||
return getDataTable(listAll);
|
return getDataTable(listAll);
|
||||||
@ -81,8 +78,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:export')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:export')")
|
||||||
@Log(title = "园历管理(班级)", businessType = BusinessType.EXPORT)
|
@Log(title = "园历管理(班级)", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public AjaxResult export(BySchoolcalendarClass bySchoolcalendarClass)
|
public AjaxResult export(BySchoolcalendarClass bySchoolcalendarClass) {
|
||||||
{
|
|
||||||
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||||
ExcelUtil<BySchoolcalendarClass> util = new ExcelUtil<BySchoolcalendarClass>(BySchoolcalendarClass.class);
|
ExcelUtil<BySchoolcalendarClass> util = new ExcelUtil<BySchoolcalendarClass>(BySchoolcalendarClass.class);
|
||||||
return util.exportExcel(list, "schoolcalendarclass");
|
return util.exportExcel(list, "schoolcalendarclass");
|
||||||
@ -93,8 +89,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id));
|
return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,8 +99,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:add')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:add')")
|
||||||
@Log(title = "园历管理(班级)", businessType = BusinessType.INSERT)
|
@Log(title = "园历管理(班级)", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody BySchoolcalendarClass bySchoolcalendarClass)
|
public AjaxResult add(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) {
|
||||||
{
|
|
||||||
String strClassId = schoolCommon.getClassId();
|
String strClassId = schoolCommon.getClassId();
|
||||||
//判断当前用户是否有班级
|
//判断当前用户是否有班级
|
||||||
if (!schoolCommon.isStringEmpty(strClassId)) {
|
if (!schoolCommon.isStringEmpty(strClassId)) {
|
||||||
@ -131,8 +125,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:edit')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:edit')")
|
||||||
@Log(title = "园历管理(班级)", businessType = BusinessType.UPDATE)
|
@Log(title = "园历管理(班级)", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody BySchoolcalendarClass bySchoolcalendarClass)
|
public AjaxResult edit(@RequestBody BySchoolcalendarClass bySchoolcalendarClass) {
|
||||||
{
|
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
||||||
return toAjax(bySchoolcalendarClassService.updateBySchoolcalendarClass(bySchoolcalendarClass));
|
return toAjax(bySchoolcalendarClassService.updateBySchoolcalendarClass(bySchoolcalendarClass));
|
||||||
} else {
|
} else {
|
||||||
@ -146,8 +139,7 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:remove')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:remove')")
|
||||||
@Log(title = "园历管理(班级)", businessType = BusinessType.DELETE)
|
@Log(title = "园历管理(班级)", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
//判断当前用户下是否有班级
|
//判断当前用户下是否有班级
|
||||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
||||||
return toAjax(bySchoolcalendarClassService.deleteBySchoolcalendarClassByIds(ids));
|
return toAjax(bySchoolcalendarClassService.deleteBySchoolcalendarClassByIds(ids));
|
||||||
|
@ -3,10 +3,7 @@ package com.ruoyi.project.common;
|
|||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.framework.security.LoginUser;
|
import com.ruoyi.framework.security.LoginUser;
|
||||||
import com.ruoyi.framework.web.domain.server.Sys;
|
import com.ruoyi.framework.web.domain.server.Sys;
|
||||||
import com.ruoyi.project.system.domain.ByClass;
|
import com.ruoyi.project.system.domain.*;
|
||||||
import com.ruoyi.project.system.domain.BySchool;
|
|
||||||
import com.ruoyi.project.system.domain.SysDept;
|
|
||||||
import com.ruoyi.project.system.domain.SysUser;
|
|
||||||
import com.ruoyi.project.system.service.IByClassService;
|
import com.ruoyi.project.system.service.IByClassService;
|
||||||
import com.ruoyi.project.system.service.IBySchoolService;
|
import com.ruoyi.project.system.service.IBySchoolService;
|
||||||
import com.ruoyi.project.system.service.ISysDeptService;
|
import com.ruoyi.project.system.service.ISysDeptService;
|
||||||
@ -101,6 +98,7 @@ public class SchoolCommon {
|
|||||||
* 判断当前用户是否拥有班级
|
* 判断当前用户是否拥有班级
|
||||||
**/
|
**/
|
||||||
public String getClassId() {
|
public String getClassId() {
|
||||||
|
String strClassId = "-1";
|
||||||
SysUser sysUser = getUser();
|
SysUser sysUser = getUser();
|
||||||
ByClass byClass = new ByClass();
|
ByClass byClass = new ByClass();
|
||||||
//根据用户id来设置主班教师,配班教师,助理教师的教师id
|
//根据用户id来设置主班教师,配班教师,助理教师的教师id
|
||||||
@ -114,8 +112,26 @@ public class SchoolCommon {
|
|||||||
//如果实体byclassnew不为空,那么取出它的班级编号
|
//如果实体byclassnew不为空,那么取出它的班级编号
|
||||||
return byClassNew.getBjbh();
|
return byClassNew.getBjbh();
|
||||||
} else {
|
} else {
|
||||||
return "";
|
// //如果为空 确认当前用户的角色是否为班长、配班、助理、实习教师
|
||||||
|
// List<SysRole> listRole = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||||
|
// if (listRole != null && listRole.size() > 0) {
|
||||||
|
// for (int i = 0; i < listRole.size(); i++) {
|
||||||
|
// System.out.println(listRole.get(i).getRoleId() == (102));
|
||||||
|
// //为班长、配班、助理、实习教师
|
||||||
|
// if (listRole.get(i).getRoleId() == 102 || listRole.get(i).getRoleId() == 104 || listRole.get(i).getRoleId() == 105 || listRole.get(i).getRoleId() == 105) {
|
||||||
|
// System.out.println("未设置当前账户所在班级");
|
||||||
|
// strClassId = "-1";
|
||||||
|
// } else {
|
||||||
|
// strClassId = "";
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// //没设置角色
|
||||||
|
// strClassId = "-1";
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCurrentXnXq() {
|
public String getCurrentXnXq() {
|
||||||
|
@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.project.benyi.domain.ByChild;
|
||||||
|
import com.ruoyi.project.benyi.service.IByChildService;
|
||||||
import com.ruoyi.project.common.SchoolCommon;
|
import com.ruoyi.project.common.SchoolCommon;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -38,6 +40,9 @@ public class ByClassController extends BaseController {
|
|||||||
private IByClassService byClassService;
|
private IByClassService byClassService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SchoolCommon schoolCommon;
|
private SchoolCommon schoolCommon;
|
||||||
|
@Autowired
|
||||||
|
private IByChildService byChildService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询班级信息列表
|
* 查询班级信息列表
|
||||||
@ -218,6 +223,19 @@ public class ByClassController extends BaseController {
|
|||||||
public AjaxResult remove(@PathVariable String[] bjbhs) {
|
public AjaxResult remove(@PathVariable String[] bjbhs) {
|
||||||
//首先判断 当前用户是否为学校
|
//首先判断 当前用户是否为学校
|
||||||
if (schoolCommon.isSchool()) {
|
if (schoolCommon.isSchool()) {
|
||||||
|
|
||||||
|
//判断班级下 是否存在幼儿信息
|
||||||
|
if (bjbhs.length > 0) {
|
||||||
|
for (int i = 0; i < bjbhs.length; i++) {
|
||||||
|
ByChild byChild = new ByChild();
|
||||||
|
byChild.setClassid(bjbhs[i]);
|
||||||
|
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
return AjaxResult.error("当前班级存在幼儿信息,无法删除班级");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return toAjax(byClassService.deleteByClassByIds(bjbhs));
|
return toAjax(byClassService.deleteByClassByIds(bjbhs));
|
||||||
}
|
}
|
||||||
return AjaxResult.error("当前用户非幼儿园,无法删除班级");
|
return AjaxResult.error("当前用户非幼儿园,无法删除班级");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user