班级信息bug和月计划
This commit is contained in:
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
|
||||
import com.ruoyi.project.benyi.service.IByThemeMonthplanService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 主题整合月计划Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/thememonthplan")
|
||||
public class ByThemeMonthplanController extends BaseController {
|
||||
@Autowired
|
||||
private IByThemeMonthplanService byThemeMonthplanService;
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) {
|
||||
startPage();
|
||||
List<ByThemeMonthplan> list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出主题整合月计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')")
|
||||
@Log(title = "主题整合月计划", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByThemeMonthplan byThemeMonthplan) {
|
||||
List<ByThemeMonthplan> list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan);
|
||||
ExcelUtil<ByThemeMonthplan> util = new ExcelUtil<ByThemeMonthplan>(ByThemeMonthplan.class);
|
||||
return util.exportExcel(list, "thememonthplan");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主题整合月计划详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(byThemeMonthplanService.selectByThemeMonthplanById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增主题整合月计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')")
|
||||
@Log(title = "主题整合月计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByThemeMonthplan byThemeMonthplan) {
|
||||
return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主题整合月计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
|
||||
@Log(title = "主题整合月计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByThemeMonthplan byThemeMonthplan) {
|
||||
return toAjax(byThemeMonthplanService.updateByThemeMonthplan(byThemeMonthplan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除主题整合月计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')")
|
||||
@Log(title = "主题整合月计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(byThemeMonthplanService.deleteByThemeMonthplanByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 主题整合月计划对象 by_theme_monthplan
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-17
|
||||
*/
|
||||
public class ByThemeMonthplan extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 计划名称
|
||||
*/
|
||||
@Excel(name = "计划名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所属班级
|
||||
*/
|
||||
@Excel(name = "所属班级")
|
||||
private String classid;
|
||||
|
||||
/**
|
||||
* 学年学期
|
||||
*/
|
||||
@Excel(name = "学年学期")
|
||||
private String xnxq;
|
||||
|
||||
/**
|
||||
* 计划月份
|
||||
*/
|
||||
@Excel(name = "计划月份")
|
||||
private String month;
|
||||
|
||||
/**
|
||||
* 本月主题
|
||||
*/
|
||||
@Excel(name = "本月主题")
|
||||
private String themes;
|
||||
|
||||
/**
|
||||
* 本月自定义主题
|
||||
*/
|
||||
@Excel(name = "本月自定义主题")
|
||||
private String selfthemes;
|
||||
|
||||
/**
|
||||
* 家长支持
|
||||
*/
|
||||
@Excel(name = "家长支持")
|
||||
private String support;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setClassid(String classid) {
|
||||
this.classid = classid;
|
||||
}
|
||||
|
||||
public String getClassid() {
|
||||
return classid;
|
||||
}
|
||||
|
||||
public void setXnxq(String xnxq) {
|
||||
this.xnxq = xnxq;
|
||||
}
|
||||
|
||||
public String getXnxq() {
|
||||
return xnxq;
|
||||
}
|
||||
|
||||
public void setMonth(String month) {
|
||||
this.month = month;
|
||||
}
|
||||
|
||||
public String getMonth() {
|
||||
return month;
|
||||
}
|
||||
|
||||
public void setThemes(String themes) {
|
||||
this.themes = themes;
|
||||
}
|
||||
|
||||
public String getThemes() {
|
||||
return themes;
|
||||
}
|
||||
|
||||
public void setSelfthemes(String selfthemes) {
|
||||
this.selfthemes = selfthemes;
|
||||
}
|
||||
|
||||
public String getSelfthemes() {
|
||||
return selfthemes;
|
||||
}
|
||||
|
||||
public void setSupport(String support) {
|
||||
this.support = support;
|
||||
}
|
||||
|
||||
public String getSupport() {
|
||||
return support;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setCreateuserid(Long createuserid) {
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid() {
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("classid", getClassid())
|
||||
.append("xnxq", getXnxq())
|
||||
.append("month", getMonth())
|
||||
.append("themes", getThemes())
|
||||
.append("selfthemes", getSelfthemes())
|
||||
.append("support", getSupport())
|
||||
.append("remarks", getRemarks())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
|
||||
|
||||
/**
|
||||
* 主题整合月计划Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-17
|
||||
*/
|
||||
public interface ByThemeMonthplanMapper {
|
||||
/**
|
||||
* 查询主题整合月计划
|
||||
*
|
||||
* @param id 主题整合月计划ID
|
||||
* @return 主题整合月计划
|
||||
*/
|
||||
public ByThemeMonthplan selectByThemeMonthplanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划列表
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 主题整合月计划集合
|
||||
*/
|
||||
public List<ByThemeMonthplan> selectByThemeMonthplanList(ByThemeMonthplan byThemeMonthplan);
|
||||
|
||||
/**
|
||||
* 新增主题整合月计划
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByThemeMonthplan(ByThemeMonthplan byThemeMonthplan);
|
||||
|
||||
/**
|
||||
* 修改主题整合月计划
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByThemeMonthplan(ByThemeMonthplan byThemeMonthplan);
|
||||
|
||||
/**
|
||||
* 删除主题整合月计划
|
||||
*
|
||||
* @param id 主题整合月计划ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByThemeMonthplanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除主题整合月计划
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByThemeMonthplanByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
|
||||
|
||||
/**
|
||||
* 主题整合月计划Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-17
|
||||
*/
|
||||
public interface IByThemeMonthplanService {
|
||||
/**
|
||||
* 查询主题整合月计划
|
||||
*
|
||||
* @param id 主题整合月计划ID
|
||||
* @return 主题整合月计划
|
||||
*/
|
||||
public ByThemeMonthplan selectByThemeMonthplanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划列表
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 主题整合月计划集合
|
||||
*/
|
||||
public List<ByThemeMonthplan> selectByThemeMonthplanList(ByThemeMonthplan byThemeMonthplan);
|
||||
|
||||
/**
|
||||
* 新增主题整合月计划
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByThemeMonthplan(ByThemeMonthplan byThemeMonthplan);
|
||||
|
||||
/**
|
||||
* 修改主题整合月计划
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByThemeMonthplan(ByThemeMonthplan byThemeMonthplan);
|
||||
|
||||
/**
|
||||
* 批量删除主题整合月计划
|
||||
*
|
||||
* @param ids 需要删除的主题整合月计划ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByThemeMonthplanByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除主题整合月计划信息
|
||||
*
|
||||
* @param id 主题整合月计划ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByThemeMonthplanById(Long id);
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByThemeMonthplanMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByThemeMonthplan;
|
||||
import com.ruoyi.project.benyi.service.IByThemeMonthplanService;
|
||||
|
||||
/**
|
||||
* 主题整合月计划Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-17
|
||||
*/
|
||||
@Service
|
||||
public class ByThemeMonthplanServiceImpl implements IByThemeMonthplanService {
|
||||
@Autowired
|
||||
private ByThemeMonthplanMapper byThemeMonthplanMapper;
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划
|
||||
*
|
||||
* @param id 主题整合月计划ID
|
||||
* @return 主题整合月计划
|
||||
*/
|
||||
@Override
|
||||
public ByThemeMonthplan selectByThemeMonthplanById(Long id) {
|
||||
return byThemeMonthplanMapper.selectByThemeMonthplanById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询主题整合月计划列表
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 主题整合月计划
|
||||
*/
|
||||
@Override
|
||||
public List<ByThemeMonthplan> selectByThemeMonthplanList(ByThemeMonthplan byThemeMonthplan) {
|
||||
return byThemeMonthplanMapper.selectByThemeMonthplanList(byThemeMonthplan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增主题整合月计划
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByThemeMonthplan(ByThemeMonthplan byThemeMonthplan) {
|
||||
byThemeMonthplan.setCreateTime(DateUtils.getNowDate());
|
||||
return byThemeMonthplanMapper.insertByThemeMonthplan(byThemeMonthplan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主题整合月计划
|
||||
*
|
||||
* @param byThemeMonthplan 主题整合月计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByThemeMonthplan(ByThemeMonthplan byThemeMonthplan) {
|
||||
return byThemeMonthplanMapper.updateByThemeMonthplan(byThemeMonthplan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除主题整合月计划
|
||||
*
|
||||
* @param ids 需要删除的主题整合月计划ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByThemeMonthplanByIds(Long[] ids) {
|
||||
return byThemeMonthplanMapper.deleteByThemeMonthplanByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除主题整合月计划信息
|
||||
*
|
||||
* @param id 主题整合月计划ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByThemeMonthplanById(Long id) {
|
||||
return byThemeMonthplanMapper.deleteByThemeMonthplanById(id);
|
||||
}
|
||||
}
|
@ -42,7 +42,7 @@ public class ByClassController extends BaseController {
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:class:list')"+ "||@ss.hasPermi('system:school:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:class:list')"+ "||@ss.hasPermi('system:school:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByClass byClass) {
|
||||
startPage();
|
||||
@ -80,15 +80,48 @@ public class ByClassController extends BaseController {
|
||||
public AjaxResult add(@RequestBody ByClass byClass) {
|
||||
|
||||
//首先判断 当前用户是否为学校
|
||||
if(schoolCommon.isSchool()){
|
||||
String strBjbh = UUID.randomUUID().toString().replace("-","");
|
||||
System.out.println("bjbh:==" + strBjbh);
|
||||
byClass.setBjbh(strBjbh);
|
||||
byClass.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
byClass.setXn(schoolCommon.getCurrentXn());
|
||||
byClass.setCreatetime(new Date());
|
||||
return toAjax(byClassService.insertByClass(byClass));}
|
||||
else {
|
||||
if (schoolCommon.isSchool()) {
|
||||
|
||||
//首先检查教师是否已经是班长、配班、助教;为了限制一个账号多种班级权限
|
||||
if (byClass.getZbjs() != null) {
|
||||
ByClass byClassNew = new ByClass();
|
||||
byClassNew.setZbjs(byClass.getZbjs());
|
||||
byClassNew.setPbjs(byClass.getZbjs());
|
||||
byClassNew.setZljs(byClass.getZbjs());
|
||||
byClassNew = byClassService.selectByClassByUserId(byClassNew);
|
||||
if (byClassNew != null && !schoolCommon.isStringEmpty(byClassNew.getBjbh())) {
|
||||
return AjaxResult.error("当前主班教师已设置为其他班级教师,无法重复,创建班级失败");
|
||||
}
|
||||
}
|
||||
if (byClass.getPbjs() != null) {
|
||||
ByClass byClassNew = new ByClass();
|
||||
byClassNew.setZbjs(byClass.getPbjs());
|
||||
byClassNew.setPbjs(byClass.getPbjs());
|
||||
byClassNew.setZljs(byClass.getPbjs());
|
||||
byClassNew = byClassService.selectByClassByUserId(byClassNew);
|
||||
if (byClassNew != null && !schoolCommon.isStringEmpty(byClassNew.getBjbh())) {
|
||||
return AjaxResult.error("当前配班教师已设置为其他班级教师,无法重复,创建班级失败");
|
||||
}
|
||||
}
|
||||
if (byClass.getZljs() != null) {
|
||||
ByClass byClassNew = new ByClass();
|
||||
byClassNew.setZbjs(byClass.getZljs());
|
||||
byClassNew.setPbjs(byClass.getZljs());
|
||||
byClassNew.setZljs(byClass.getZljs());
|
||||
byClassNew = byClassService.selectByClassByUserId(byClassNew);
|
||||
if (byClassNew != null && !schoolCommon.isStringEmpty(byClassNew.getBjbh())) {
|
||||
return AjaxResult.error("当前助理教师已设置为其他班级教师,无法重复,创建班级失败");
|
||||
}
|
||||
}
|
||||
|
||||
String strBjbh = UUID.randomUUID().toString().replace("-", "");
|
||||
System.out.println("bjbh:==" + strBjbh);
|
||||
byClass.setBjbh(strBjbh);
|
||||
byClass.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
byClass.setXn(schoolCommon.getCurrentXn());
|
||||
byClass.setCreatetime(new Date());
|
||||
return toAjax(byClassService.insertByClass(byClass));
|
||||
} else {
|
||||
return AjaxResult.error("当前用户非幼儿园,无法创建班级");
|
||||
}
|
||||
}
|
||||
@ -101,12 +134,72 @@ public class ByClassController extends BaseController {
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByClass byClass) {
|
||||
//首先判断 当前用户是否为学校
|
||||
if(schoolCommon.isSchool()) {
|
||||
if (schoolCommon.isSchool()) {
|
||||
|
||||
//判断主班教师、配班教师、助理教师的值是否有变化
|
||||
ByClass byClassNew = byClassService.selectByClassById(byClass.getBjbh());
|
||||
if (byClass.getZbjs() != null) {
|
||||
if (byClassNew.getZbjs() == null || !byClassNew.getZbjs().equals(byClass.getZbjs())) {
|
||||
ByClass byClassInfoNew = new ByClass();
|
||||
byClassInfoNew.setZbjs(byClass.getZbjs());
|
||||
byClassInfoNew.setPbjs(byClass.getZbjs());
|
||||
byClassInfoNew.setZljs(byClass.getZbjs());
|
||||
byClassInfoNew = byClassService.selectByClassByUserId(byClassInfoNew);
|
||||
if (byClassInfoNew != null && !schoolCommon.isStringEmpty(byClassInfoNew.getBjbh())) {
|
||||
return AjaxResult.error("当前主班教师已设置为其他班级教师,无法重复,修改班级信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (byClass.getPbjs() != null) {
|
||||
if (byClassNew.getPbjs() == null || !byClassNew.getPbjs().equals(byClass.getPbjs())) {
|
||||
ByClass byClassInfoNew = new ByClass();
|
||||
byClassInfoNew.setZbjs(byClass.getPbjs());
|
||||
byClassInfoNew.setPbjs(byClass.getPbjs());
|
||||
byClassInfoNew.setZljs(byClass.getPbjs());
|
||||
byClassInfoNew = byClassService.selectByClassByUserId(byClassInfoNew);
|
||||
if (byClassInfoNew != null && !schoolCommon.isStringEmpty(byClassInfoNew.getBjbh())) {
|
||||
return AjaxResult.error("当前配班教师已设置为其他班级教师,无法重复,修改班级信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (byClass.getZljs() != null) {
|
||||
if (byClassNew.getZljs() == null || !byClassNew.getZljs().equals(byClass.getZljs())) {
|
||||
ByClass byClassInfoNew = new ByClass();
|
||||
byClassInfoNew.setZbjs(byClass.getZljs());
|
||||
byClassInfoNew.setPbjs(byClass.getZljs());
|
||||
byClassInfoNew.setZljs(byClass.getZljs());
|
||||
byClassInfoNew = byClassService.selectByClassByUserId(byClassInfoNew);
|
||||
if (byClassInfoNew != null && !schoolCommon.isStringEmpty(byClassInfoNew.getBjbh())) {
|
||||
return AjaxResult.error("当前助理教师已设置为其他班级教师,无法重复,修改班级信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return toAjax(byClassService.updateByClass(byClass));
|
||||
}
|
||||
return AjaxResult.error("当前用户非幼儿园,无法编辑班级");
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空班级教师信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:class:edit')")
|
||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
||||
@DeleteMapping("/deljs/{bjbhs}")
|
||||
public AjaxResult deljs(@PathVariable String bjbhs) {
|
||||
//首先判断 当前用户是否为学校
|
||||
if (schoolCommon.isSchool()) {
|
||||
ByClass byClass=byClassService.selectByClassById(bjbhs);
|
||||
byClass.setZbjs(null);
|
||||
byClass.setPbjs(null);
|
||||
byClass.setZljs(null);
|
||||
return toAjax(byClassService.updateByClass(byClass));
|
||||
}
|
||||
return AjaxResult.error("当前用户非幼儿园,无法删除班级");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级信息
|
||||
*/
|
||||
@ -115,7 +208,7 @@ public class ByClassController extends BaseController {
|
||||
@DeleteMapping("/{bjbhs}")
|
||||
public AjaxResult remove(@PathVariable String[] bjbhs) {
|
||||
//首先判断 当前用户是否为学校
|
||||
if(schoolCommon.isSchool()) {
|
||||
if (schoolCommon.isSchool()) {
|
||||
return toAjax(byClassService.deleteByClassByIds(bjbhs));
|
||||
}
|
||||
return AjaxResult.error("当前用户非幼儿园,无法删除班级");
|
||||
|
@ -65,7 +65,7 @@ public class ByTeacherJbxxController extends BaseController
|
||||
/**
|
||||
* 查询教师基本信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:teacher:list')"+ "||@ss.hasPermi('system:user:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:teacher:list')"+ "||@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/listgroupxw")
|
||||
public TableDataInfo listGroupXw(ByTeacherJbxx byTeacherJbxx)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ public class SysDeptController extends BaseController {
|
||||
/**
|
||||
* 根据用户获取部门列表信息-用于切换岗位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||
@GetMapping(value = {"/getDeptsInfo"})
|
||||
public TableDataInfo getDeptsInfo() {
|
||||
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
|
||||
@ -76,7 +76,7 @@ public class SysDeptController extends BaseController {
|
||||
/**
|
||||
* 切换岗位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||
@PostMapping(value = {"/changeDept/{deptId}"})
|
||||
public AjaxResult changeDept(@PathVariable Long deptId) {
|
||||
System.out.println("开始切换...");
|
||||
|
@ -66,7 +66,7 @@ public class SysUserController extends BaseController {
|
||||
/**
|
||||
* 获取用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysUser user) {
|
||||
startPage();
|
||||
|
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeMonthplanMapper">
|
||||
|
||||
<resultMap type="ByThemeMonthplan" id="ByThemeMonthplanResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="classid" column="classid"/>
|
||||
<result property="xnxq" column="xnxq"/>
|
||||
<result property="month" column="month"/>
|
||||
<result property="themes" column="themes"/>
|
||||
<result property="selfthemes" column="selfthemes"/>
|
||||
<result property="support" column="support"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="createuserid" column="createuserid"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByThemeMonthplanVo">
|
||||
select id, name, classid, xnxq, month, themes, selfthemes, support, remarks, createuserid, create_time from by_theme_monthplan
|
||||
</sql>
|
||||
|
||||
<select id="selectByThemeMonthplanList" parameterType="ByThemeMonthplan" resultMap="ByThemeMonthplanResult">
|
||||
<include refid="selectByThemeMonthplanVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
||||
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
|
||||
<if test="month != null and month != ''">and month = #{month}</if>
|
||||
<if test="themes != null and themes != ''">and themes = #{themes}</if>
|
||||
<if test="selfthemes != null and selfthemes != ''">and selfthemes = #{selfthemes}</if>
|
||||
<if test="support != null and support != ''">and support = #{support}</if>
|
||||
<if test="remarks != null and remarks != ''">and remarks = #{remarks}</if>
|
||||
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByThemeMonthplanById" parameterType="Long" resultMap="ByThemeMonthplanResult">
|
||||
<include refid="selectByThemeMonthplanVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByThemeMonthplan" parameterType="ByThemeMonthplan" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_theme_monthplan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="classid != null and classid != ''">classid,</if>
|
||||
<if test="xnxq != null and xnxq != ''">xnxq,</if>
|
||||
<if test="month != null and month != ''">month,</if>
|
||||
<if test="themes != null and themes != ''">themes,</if>
|
||||
<if test="selfthemes != null and selfthemes != ''">selfthemes,</if>
|
||||
<if test="support != null and support != ''">support,</if>
|
||||
<if test="remarks != null and remarks != ''">remarks,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="classid != null and classid != ''">#{classid},</if>
|
||||
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
|
||||
<if test="month != null and month != ''">#{month},</if>
|
||||
<if test="themes != null and themes != ''">#{themes},</if>
|
||||
<if test="selfthemes != null and selfthemes != ''">#{selfthemes},</if>
|
||||
<if test="support != null and support != ''">#{support},</if>
|
||||
<if test="remarks != null and remarks != ''">#{remarks},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByThemeMonthplan" parameterType="ByThemeMonthplan">
|
||||
update by_theme_monthplan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="classid != null and classid != ''">classid = #{classid},</if>
|
||||
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
|
||||
<if test="month != null and month != ''">month = #{month},</if>
|
||||
<if test="themes != null and themes != ''">themes = #{themes},</if>
|
||||
<if test="selfthemes != null and selfthemes != ''">selfthemes = #{selfthemes},</if>
|
||||
<if test="support != null and support != ''">support = #{support},</if>
|
||||
<if test="remarks != null and remarks != ''">remarks = #{remarks},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByThemeMonthplanById" parameterType="Long">
|
||||
delete from by_theme_monthplan where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByThemeMonthplanByIds" parameterType="String">
|
||||
delete from by_theme_monthplan where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -44,9 +44,9 @@
|
||||
<if test="zbjs != null ">and zbjs = #{zbjs}</if>
|
||||
<if test="pbjs != null ">and pbjs = #{pbjs}</if>
|
||||
<if test="zljs != null ">and zljs = #{zljs}</if>
|
||||
<if test="zbjsxm != null and zbjsxm != ''" >and zbjsxm like concat('%', #{zbjsxm}, '%')</if>
|
||||
<if test="pbjsxm != null and pbjsxm != ''" >and pbjsxm like concat('%', #{pbjsxm}, '%')</if>
|
||||
<if test="zljsxm != null and zljsxm != ''" >and zljsxm like concat('%', #{zljsxm}, '%')</if>
|
||||
<if test="zbjsxm != null and zbjsxm != ''">and zbjsxm like concat('%', #{zbjsxm}, '%')</if>
|
||||
<if test="pbjsxm != null and pbjsxm != ''">and pbjsxm like concat('%', #{pbjsxm}, '%')</if>
|
||||
<if test="zljsxm != null and zljsxm != ''">and zljsxm like concat('%', #{zljsxm}, '%')</if>
|
||||
<if test="isdel != null and isdel != ''">and isdel = #{isdel}</if>
|
||||
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
@ -60,13 +60,26 @@
|
||||
where bjbh = #{bjbh}
|
||||
</select>
|
||||
|
||||
<!--<select id="selectByClassByUserId" parameterType="ByClass" resultMap="ByClassResult">-->
|
||||
<!--<include refid="selectByClassVo"/>-->
|
||||
<!--<where>-->
|
||||
<!--<if test="zbjs != null ">or zbjs = #{zbjs}</if>-->
|
||||
<!--<if test="pbjs != null ">or pbjs = #{pbjs}</if>-->
|
||||
<!--<if test="zljs != null ">or zljs = #{zljs}</if>-->
|
||||
<!--and isdel = 0-->
|
||||
<!--</where>-->
|
||||
<!--<!– 数据范围过滤 –>-->
|
||||
<!--${dataScope}-->
|
||||
<!--</select>-->
|
||||
|
||||
<select id="selectByClassByUserId" parameterType="ByClass" resultMap="ByClassResult">
|
||||
<include refid="selectByClassVo"/>
|
||||
<where>
|
||||
<if test="zbjs != null ">or zbjs = #{zbjs}</if>
|
||||
<if test="pbjs != null ">or pbjs = #{pbjs}</if>
|
||||
<if test="zljs != null ">or zljs = #{zljs}</if>
|
||||
</where>
|
||||
where
|
||||
(zbjs = #{zbjs}
|
||||
or pbjs = #{pbjs}
|
||||
or zljs = #{zljs}
|
||||
)
|
||||
and isdel = 0
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
</select>
|
||||
@ -115,9 +128,9 @@
|
||||
<if test="bjmc != null and bjmc != ''">bjmc = #{bjmc},</if>
|
||||
<if test="bjrych != null and bjrych != ''">bjrych = #{bjrych},</if>
|
||||
<if test="jbny != null ">jbny = #{jbny},</if>
|
||||
<if test="zbjs != null ">zbjs = #{zbjs},</if>
|
||||
<if test="pbjs != null ">pbjs = #{pbjs},</if>
|
||||
<if test="zljs != null ">zljs = #{zljs},</if>
|
||||
zbjs = #{zbjs},
|
||||
pbjs = #{pbjs},
|
||||
zljs = #{zljs},
|
||||
<if test="isdel != null and isdel != ''">isdel = #{isdel},</if>
|
||||
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||
</trim>
|
||||
|
Reference in New Issue
Block a user