Commit 6207d955 by xuwenhao

8.30新增实验室管理

parent fb05804e
package yangtz.cs.liu.campus.controller.schoolLab;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import yangtz.cs.liu.campus.vo.schoolgrade.GradeTreeSelect;
import static yangtz.cs.liu.campus.constant.GradeConstant.NEWTERM;
import static yangtz.cs.liu.campus.constant.GradeConstant.UNNEW;
/**
* 实验计划Controller
*
* @author ruoyi
* @date 2023-08-29
*/
@RestController
@RequestMapping("/experimentPlan")
public class SchoolExperimentPlanController extends BaseController
{
@Autowired
private ISchoolExperimentPlanService schoolExperimentPlanService;
/**
* 查询实验计划列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolExperimentPlanVo schoolExperimentPlanVo)
{
startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
return getDataTable(list);
}
/**
* 导出实验计划列表
*/
@Log(title = "实验计划", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolExperimentPlanVo schoolExperimentPlanVo)
{
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
ExcelUtil<SchoolExperimentPlanVo> util = new ExcelUtil<SchoolExperimentPlanVo>(SchoolExperimentPlanVo.class);
util.exportExcel(response, list, "实验计划数据");
}
/**
* 获取实验计划详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolExperimentPlanService.selectSchoolExperimentPlanById(id));
}
/**
* 新增实验计划
*/
@Log(title = "实验计划", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolExperimentPlanVo schoolExperimentPlanVo)
{
return toAjax(schoolExperimentPlanService.insertSchoolExperimentPlan(schoolExperimentPlanVo));
}
/**
* 修改实验计划
*/
@Log(title = "实验计划", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolExperimentPlanVo schoolExperimentPlanVo)
{
return toAjax(schoolExperimentPlanService.updateSchoolExperimentPlan(schoolExperimentPlanVo));
}
/**
* 删除实验计划
*/
@Log(title = "实验计划", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolExperimentPlanService.deleteSchoolExperimentPlanByIds(ids));
}
/**
* 根据学年查询级部下拉框
*/
@GetMapping("/getGrade/{schoolYear}")
public AjaxResult getGrade(@PathVariable("schoolYear") int schoolYear){
return AjaxResult.success(schoolExperimentPlanService.getGrade(schoolYear));
}
/**
* 根据级部查询对应班级
*/
@GetMapping("/getClass/{gradeId}")
public AjaxResult getSchoolClass(@PathVariable("gradeId") Long gradeId){
return AjaxResult.success(schoolExperimentPlanService.getSchoolClass(gradeId));
}
/**
* 获取当前学期
*/
@GetMapping("/getSemester")
public AjaxResult getSemester(){
AjaxResult ajaxResult = AjaxResult.success();
Calendar cal = Calendar.getInstance();
//获取当前年月
int nowYear = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH) + 1;
//设置当前学期
String term = "1";
//2-7为第二学期,8-1为第一学期
//如果当前月份小于8月,则该学年应为当前年-1 到 当前年,例如当前年月为2023年7月,则该学年为2022-2023年的第二学期
if (month >= 2 && month < 8) {
term = "2";
}
ajaxResult.put("semester",term);
return ajaxResult;
}
}
package yangtz.cs.liu.campus.controller.schoolLab;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 年级实验室预约Controller
*
* @author ruoyi
* @date 2023-08-29
*/
@RestController
@RequestMapping("/schoolLabClassYear")
public class SchoolLabClassYearController extends BaseController
{
@Autowired
private ISchoolLabClassYearService schoolLabClassYearService;
/**
* 查询年级实验室预约列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolLabClassYear schoolLabClassYear)
{
startPage();
List<SchoolLabClassYear> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYear);
return getDataTable(list);
}
/**
* 导出年级实验室预约列表
*/
@Log(title = "年级实验室预约", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolLabClassYear schoolLabClassYear)
{
List<SchoolLabClassYear> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYear);
ExcelUtil<SchoolLabClassYear> util = new ExcelUtil<SchoolLabClassYear>(SchoolLabClassYear.class);
util.exportExcel(response, list, "年级实验室预约数据");
}
/**
* 获取年级实验室预约详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearById(id));
}
/**
* 新增年级实验室预约
*/
@Log(title = "年级实验室预约", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolLabClassYear schoolLabClassYear)
{
return toAjax(schoolLabClassYearService.insertSchoolLabClassYear(schoolLabClassYear));
}
/**
* 修改年级实验室预约
*/
@Log(title = "年级实验室预约", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolLabClassYear schoolLabClassYear)
{
return toAjax(schoolLabClassYearService.updateSchoolLabClassYear(schoolLabClassYear));
}
/**
* 删除年级实验室预约
*/
@Log(title = "年级实验室预约", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolLabClassYearService.deleteSchoolLabClassYearByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolLab;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabCompetitionService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 实验室竞赛Controller
*
* @author ruoyi
* @date 2023-08-29
*/
@RestController
@RequestMapping("/schoolLabCompetition")
public class SchoolLabCompetitionController extends BaseController
{
@Autowired
private ISchoolLabCompetitionService schoolLabCompetitionService;
/**
* 查询实验室竞赛列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolLabCompetition schoolLabCompetition)
{
startPage();
List<SchoolLabCompetition> list = schoolLabCompetitionService.selectSchoolLabCompetitionList(schoolLabCompetition);
return getDataTable(list);
}
/**
* 导出实验室竞赛列表
*/
@Log(title = "实验室竞赛", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolLabCompetition schoolLabCompetition)
{
List<SchoolLabCompetition> list = schoolLabCompetitionService.selectSchoolLabCompetitionList(schoolLabCompetition);
ExcelUtil<SchoolLabCompetition> util = new ExcelUtil<SchoolLabCompetition>(SchoolLabCompetition.class);
util.exportExcel(response, list, "实验室竞赛数据");
}
/**
* 获取实验室竞赛详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolLabCompetitionService.selectSchoolLabCompetitionById(id));
}
/**
* 新增实验室竞赛
*/
@Log(title = "实验室竞赛", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolLabCompetition schoolLabCompetition)
{
return toAjax(schoolLabCompetitionService.insertSchoolLabCompetition(schoolLabCompetition));
}
/**
* 修改实验室竞赛
*/
@Log(title = "实验室竞赛", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolLabCompetition schoolLabCompetition)
{
return toAjax(schoolLabCompetitionService.updateSchoolLabCompetition(schoolLabCompetition));
}
/**
* 删除实验室竞赛
*/
@Log(title = "实验室竞赛", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolLabCompetitionService.deleteSchoolLabCompetitionByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolLab;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 实验室Controller
*
* @author ruoyi
* @date 2023-08-29
*/
@RestController
@RequestMapping("/schoolLab")
public class SchoolLabController extends BaseController
{
@Autowired
private ISchoolLabService schoolLabService;
/**
* 查询实验室列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolLab schoolLab)
{
startPage();
List<SchoolLab> list = schoolLabService.selectSchoolLabList(schoolLab);
return getDataTable(list);
}
/**
* 导出实验室列表
*/
@Log(title = "实验室", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolLab schoolLab)
{
List<SchoolLab> list = schoolLabService.selectSchoolLabList(schoolLab);
ExcelUtil<SchoolLab> util = new ExcelUtil<SchoolLab>(SchoolLab.class);
util.exportExcel(response, list, "实验室数据");
}
/**
* 获取实验室详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolLabService.selectSchoolLabById(id));
}
/**
* 新增实验室
*/
@Log(title = "实验室", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolLab schoolLab)
{
return toAjax(schoolLabService.insertSchoolLab(schoolLab));
}
/**
* 修改实验室
*/
@Log(title = "实验室", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolLab schoolLab)
{
return toAjax(schoolLabService.updateSchoolLab(schoolLab));
}
/**
* 删除实验室
*/
@Log(title = "实验室", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolLabService.deleteSchoolLabByIds(ids));
}
/**
* 获取实验室负责人下拉框
* @return
*/
@GetMapping("/getLabAdmin")
public AjaxResult getLabAdmin(){
return AjaxResult.success(schoolLabService.getLabAdmin());
}
/**
* 获取学科下拉框
* @return
*/
@GetMapping("/getSub")
public AjaxResult getSub(){
return AjaxResult.success(schoolLabService.getSub());
}
}
package yangtz.cs.liu.campus.controller.schoolLab;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 教师个人实验申请Controller
*
* @author ruoyi
* @date 2023-08-29
*/
@RestController
@RequestMapping("/schoolTeacherExperimentApply")
public class SchoolTeacherExperimentApplyController extends BaseController
{
@Autowired
private ISchoolTeacherExperimentApplyService schoolTeacherExperimentApplyService;
/**
* 查询教师个人实验申请列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
startPage();
List<SchoolTeacherExperimentApply> list = schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApply);
return getDataTable(list);
}
/**
* 导出教师个人实验申请列表
*/
@Log(title = "教师个人实验申请", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
List<SchoolTeacherExperimentApply> list = schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApply);
ExcelUtil<SchoolTeacherExperimentApply> util = new ExcelUtil<SchoolTeacherExperimentApply>(SchoolTeacherExperimentApply.class);
util.exportExcel(response, list, "教师个人实验申请数据");
}
/**
* 获取教师个人实验申请详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolTeacherExperimentApplyService.selectSchoolTeacherExperimentApplyById(id));
}
/**
* 新增教师个人实验申请
*/
@Log(title = "教师个人实验申请", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
return toAjax(schoolTeacherExperimentApplyService.insertSchoolTeacherExperimentApply(schoolTeacherExperimentApply));
}
/**
* 修改教师个人实验申请
*/
@Log(title = "教师个人实验申请", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
return toAjax(schoolTeacherExperimentApplyService.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApply));
}
/**
* 删除教师个人实验申请
*/
@Log(title = "教师个人实验申请", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolTeacherExperimentApplyService.deleteSchoolTeacherExperimentApplyByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolLab;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 教师实验室申请Controller
*
* @author ruoyi
* @date 2023-08-29
*/
@RestController
@RequestMapping("/schoolTeacherLabApply")
public class SchoolTeacherLabApplyController extends BaseController
{
@Autowired
private ISchoolTeacherLabApplyService schoolTeacherLabApplyService;
/**
* 查询教师实验室申请列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolTeacherLabApply schoolTeacherLabApply)
{
startPage();
List<SchoolTeacherLabApply> list = schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApply);
return getDataTable(list);
}
/**
* 导出教师实验室申请列表
*/
@Log(title = "教师实验室申请", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolTeacherLabApply schoolTeacherLabApply)
{
List<SchoolTeacherLabApply> list = schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApply);
ExcelUtil<SchoolTeacherLabApply> util = new ExcelUtil<SchoolTeacherLabApply>(SchoolTeacherLabApply.class);
util.exportExcel(response, list, "教师实验室申请数据");
}
/**
* 获取教师实验室申请详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyById(id));
}
/**
* 新增教师实验室申请
*/
@Log(title = "教师实验室申请", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply)
{
return toAjax(schoolTeacherLabApplyService.insertSchoolTeacherLabApply(schoolTeacherLabApply));
}
/**
* 修改教师实验室申请
*/
@Log(title = "教师实验室申请", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolTeacherLabApply schoolTeacherLabApply)
{
return toAjax(schoolTeacherLabApplyService.updateSchoolTeacherLabApply(schoolTeacherLabApply));
}
/**
* 删除教师实验室申请
*/
@Log(title = "教师实验室申请", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolTeacherLabApplyService.deleteSchoolTeacherLabApplyByIds(ids));
}
}
......@@ -141,6 +141,7 @@ public class SchoolStudentController extends BaseController {
}
}
if (StringUtils.isNotBlank(schoolStudent.getProvincialNumber())){
LambdaQueryWrapper<SchoolStudent> lqw2 = new LambdaQueryWrapper<>();
lqw2
.eq(SchoolStudent::getProvincialNumber, schoolStudent.getProvincialNumber());
......@@ -150,7 +151,10 @@ public class SchoolStudentController extends BaseController {
throw new ServiceException("省学籍辅号已存在");
}
}
}
if (StringUtils.isNotBlank(schoolStudent.getNationalNumber())){
LambdaQueryWrapper<SchoolStudent> lqw3 = new LambdaQueryWrapper<>();
lqw3
.eq(SchoolStudent::getNationalNumber, schoolStudent.getNationalNumber());
......@@ -160,7 +164,10 @@ public class SchoolStudentController extends BaseController {
throw new ServiceException("全国学籍号已存在");
}
}
}
if (StringUtils.isNotBlank(schoolStudent.getOneCard())){
LambdaQueryWrapper<SchoolStudent> lqw4 = new LambdaQueryWrapper<>();
lqw4
.eq(SchoolStudent::getOneCard, schoolStudent.getOneCard());
......@@ -171,6 +178,7 @@ public class SchoolStudentController extends BaseController {
}
}
}
}
private void checkStudentUnique(SchoolStudent schoolStudent) {
// TODO 原代码
......@@ -235,6 +243,7 @@ public class SchoolStudentController extends BaseController {
}
}
if (StringUtils.isNotBlank(schoolStudent.getProvincialNumber())){
LambdaQueryWrapper<SchoolStudent> lqw2 = new LambdaQueryWrapper<>();
lqw2
.eq(SchoolStudent::getProvincialNumber, schoolStudent.getProvincialNumber())
......@@ -245,7 +254,9 @@ public class SchoolStudentController extends BaseController {
throw new ServiceException("省学籍辅号已存在");
}
}
}
if (StringUtils.isNotBlank(schoolStudent.getNationalNumber())){
LambdaQueryWrapper<SchoolStudent> lqw3 = new LambdaQueryWrapper<>();
lqw3
.eq(SchoolStudent::getNationalNumber, schoolStudent.getNationalNumber())
......@@ -256,7 +267,9 @@ public class SchoolStudentController extends BaseController {
throw new ServiceException("全国学籍号已存在");
}
}
}
if (StringUtils.isNotBlank(schoolStudent.getOneCard())){
LambdaQueryWrapper<SchoolStudent> lqw4 = new LambdaQueryWrapper<>();
lqw4
.eq(SchoolStudent::getOneCard, schoolStudent.getOneCard())
......@@ -268,6 +281,7 @@ public class SchoolStudentController extends BaseController {
}
}
}
}
//添加学生与班级关系表
private boolean addRelation(SchoolStudent schoolStudent) {
......
package yangtz.cs.liu.campus.domain.schoolLab;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.List;
/**
* 实验计划对象 school_experiment_plan
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolExperimentPlan extends OurBaseEntity
{
/** 学科(1物理,2化学,3生物) */
private String sub;
/** 级部id */
private Long gradeId;
/** 级部 */
private String grade;
/** 学年 */
private String schoolYear;
/** 学期(1上学期,2下学期) */
private String semester;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
private String experimentClassify;
/** 实验名称 */
private String experimentName;
/** 章节内容 */
private String chapterContent;
/** 是否已预约 */
private String isAppointment;
/** 计划开始时间 */
private String plannedStartTime;
/** 计划结束时间 */
private String plannedEndTime;
/** 实验用品 */
private String experimentUseGoods;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
* 实验计划与班级关系对象 school_experiment_plan_class
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolExperimentPlanClass
{
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 实验计划主键id */
private Long experimentPlanId;
/** 班级id */
private Long classId;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import com.core.domain.OurBaseEntity;
import lombok.Data;
/**
* 实验室对象 school_lab
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLab extends OurBaseEntity
{
/** 实验室名称 */
private String labName;
/** 实验室学科(1物理,2化学,3生物) */
private String labSub;
/** 负责人id */
private Long inChargeId;
/** 负责人 */
private String inChargeName;
/** 实验室状态(1良好,2正常,3待检查) */
private String labState;
/** 实验室用品 */
private String labUseGoods;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import java.util.List;
import java.util.Date;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
/**
* 年级实验室预约对象 school_lab_class_year
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLabClassYear extends OurBaseEntity
{
/** 实验计划id */
private String experimentPlanId;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期(1上学期,2下学期) */
@Excel(name = "学期", readConverterExp = "1=上学期,2=下学期")
private String semester;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 计划开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date plannedStartTime;
/** 计划结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date plannedEndTime;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
/** 申报状态(0未申报,1已申报,2已阅读,3已分配) */
@Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配")
private String declareState;
/** 申报人id */
@Excel(name = "申报人id")
private Long applyId;
/** 申报人 */
@Excel(name = "申报人")
private String applyName;
/** 申报时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 年级实验室预约和实验室关系信息 */
private List<SchoolLabClassYearRelation> schoolLabClassYearRelationList;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
* 年级实验室预约和实验室关系对象 school_lab_class_year_relation
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLabClassYearRelation
{
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 年级实验室预约主键id */
private Long labClassYearId;
/** 实验室id */
private Long labId;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 实验室竞赛对象 school_lab_competition
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLabCompetition extends OurBaseEntity
{
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 参赛教师id */
@Excel(name = "参赛教师id")
private String teacherId;
/** 参赛教师 */
@Excel(name = "参赛教师")
private String teacherName;
/** 参赛课题 */
@Excel(name = "参赛课题")
private String entrySubject;
/** 比赛项目名称 */
@Excel(name = "比赛项目名称")
private String competitionName;
/** 比赛类型(1说课比赛,2自制教具比赛,3实验教学能力大赛) */
@Excel(name = "比赛类型", readConverterExp = "1=说课比赛,2=自制教具比赛,3=实验教学能力大赛")
private String competitionType;
/** 比赛级别(1省级,2市级) */
@Excel(name = "比赛级别", readConverterExp = "1=省级,2=市级")
private String competitionLevel;
/** 备注1 */
@Excel(name = "备注1")
private String remark1;
/** 备注2 */
@Excel(name = "备注2")
private String remark2;
/** 备注3 */
@Excel(name = "备注3")
private String remark3;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import java.util.Date;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
/**
* 教师个人实验申请对象 school_teacher_experiment_apply
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolTeacherExperimentApply extends OurBaseEntity
{
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 级部id */
@Excel(name = "级部id")
private Long gradeId;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期 */
@Excel(name = "学期")
private String semester;
/** 规划时间 */
@Excel(name = "规划时间")
private String plannedTime;
/** 实验名称 */
@Excel(name = "实验名称")
private String experimentName;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
/** 实验室id */
@Excel(name = "实验室id")
private String labId;
/** 实验室名称 */
@Excel(name = "实验室名称")
private String labName;
/** 申报状态(0未申报,1已申报,2已阅读,3已分配) */
@Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配")
private String declareState;
/** 申报人id */
@Excel(name = "申报人id")
private Long applyId;
/** 申报人名称 */
@Excel(name = "申报人名称")
private String applyName;
/** 申报时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
}
package yangtz.cs.liu.campus.domain.schoolLab;
import java.util.Date;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
/**
* 教师实验室申请对象 school_teacher_lab_apply
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolTeacherLabApply extends OurBaseEntity
{
/** 年级实验室预约主键id */
@Excel(name = "年级实验室预约主键id")
private String labClassYearId;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期(1上学期,2下学期) */
@Excel(name = "学期", readConverterExp = "1=上学期,2=下学期")
private String semester;
/** 班级id */
@Excel(name = "班级id")
private String classId;
/** 班级名称 */
@Excel(name = "班级名称")
private String className;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 实验时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实验时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date experimentTime;
/** 节次 */
@Excel(name = "节次")
private String section;
/** 实验室id */
@Excel(name = "实验室id")
private Long labId;
/** 实验室名称 */
@Excel(name = "实验室名称")
private String labName;
/** 申请状态(1已确认,0未确认) */
@Excel(name = "申请状态", readConverterExp = "1=已确认,0=未确认")
private String applyState;
/** 申请人id */
@Excel(name = "申请人id")
private Long applyId;
/** 申请人 */
@Excel(name = "申请人")
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import java.util.List;
import java.util.Map;
/**
* 实验计划Mapper接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentPlan>
{
/**
* 查询实验计划
*
* @param id 实验计划主键
* @return 实验计划
*/
public SchoolExperimentPlanVo selectSchoolExperimentPlanById(Long id);
/**
* 查询实验计划列表
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 新增实验计划
*
* @param schoolExperimentPlan 实验计划
* @return 结果
*/
public int insertSchoolExperimentPlan(SchoolExperimentPlan schoolExperimentPlan);
/**
* 修改实验计划
*
* @param schoolExperimentPlan 实验计划
* @return 结果
*/
public int updateSchoolExperimentPlan(SchoolExperimentPlan schoolExperimentPlan);
/**
* 删除实验计划
*
* @param id 实验计划主键
* @return 结果
*/
public int deleteSchoolExperimentPlanById(Long id);
/**
* 批量删除实验计划
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolExperimentPlanByIds(Long[] ids);
/**
* 批量删除实验计划与班级关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolExperimentPlanClassByExperimentPlanIds(Long[] ids);
/**
* 批量新增实验计划与班级关系
*
* @param schoolExperimentPlanClassList 实验计划与班级关系列表
* @return 结果
*/
public int batchSchoolExperimentPlanClass(List<SchoolExperimentPlanClass> schoolExperimentPlanClassList);
/**
* 通过实验计划主键删除实验计划与班级关系信息
*
* @param id 实验计划ID
* @return 结果
*/
public int deleteSchoolExperimentPlanClassByExperimentPlanId(Long id);
/**
* 根据学年查询级部下拉框
* @param schoolYear
* @return
*/
List<Map<String, String>> getGrade(@Param("schoolYear") int schoolYear,@Param("userId") Long userId);
/**
* 根据级部查询对应班级
* @param gradeId
* @return
*/
List<Map<String, String>> getSchoolClass(@Param("gradeId") Long gradeId);
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import java.util.List;
/**
* 年级实验室预约Mapper接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear>
{
/**
* 查询年级实验室预约
*
* @param id 年级实验室预约主键
* @return 年级实验室预约
*/
public SchoolLabClassYear selectSchoolLabClassYearById(Long id);
/**
* 查询年级实验室预约列表
*
* @param schoolLabClassYear 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYear> selectSchoolLabClassYearList(SchoolLabClassYear schoolLabClassYear);
/**
* 新增年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
* @return 结果
*/
public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear);
/**
* 修改年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
* @return 结果
*/
public int updateSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear);
/**
* 删除年级实验室预约
*
* @param id 年级实验室预约主键
* @return 结果
*/
public int deleteSchoolLabClassYearById(Long id);
/**
* 批量删除年级实验室预约
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolLabClassYearByIds(Long[] ids);
/**
* 批量删除年级实验室预约和实验室关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolLabClassYearRelationByLabClassYearIds(Long[] ids);
/**
* 批量新增年级实验室预约和实验室关系
*
* @param schoolLabClassYearRelationList 年级实验室预约和实验室关系列表
* @return 结果
*/
public int batchSchoolLabClassYearRelation(List<SchoolLabClassYearRelation> schoolLabClassYearRelationList);
/**
* 通过年级实验室预约主键删除年级实验室预约和实验室关系信息
*
* @param id 年级实验室预约ID
* @return 结果
*/
public int deleteSchoolLabClassYearRelationByLabClassYearId(Long id);
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import java.util.List;
/**
* 实验室竞赛Mapper接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface SchoolLabCompetitionMapper extends BaseMapper<SchoolLabCompetition>
{
/**
* 查询实验室竞赛
*
* @param id 实验室竞赛主键
* @return 实验室竞赛
*/
public SchoolLabCompetition selectSchoolLabCompetitionById(Long id);
/**
* 查询实验室竞赛列表
*
* @param schoolLabCompetition 实验室竞赛
* @return 实验室竞赛集合
*/
public List<SchoolLabCompetition> selectSchoolLabCompetitionList(SchoolLabCompetition schoolLabCompetition);
/**
* 新增实验室竞赛
*
* @param schoolLabCompetition 实验室竞赛
* @return 结果
*/
public int insertSchoolLabCompetition(SchoolLabCompetition schoolLabCompetition);
/**
* 修改实验室竞赛
*
* @param schoolLabCompetition 实验室竞赛
* @return 结果
*/
public int updateSchoolLabCompetition(SchoolLabCompetition schoolLabCompetition);
/**
* 删除实验室竞赛
*
* @param id 实验室竞赛主键
* @return 结果
*/
public int deleteSchoolLabCompetitionById(Long id);
/**
* 批量删除实验室竞赛
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolLabCompetitionByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import java.util.List;
import java.util.Map;
/**
* 实验室Mapper接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface SchoolLabMapper extends BaseMapper<SchoolLab>
{
/**
* 查询实验室
*
* @param id 实验室主键
* @return 实验室
*/
public SchoolLab selectSchoolLabById(Long id);
/**
* 查询实验室列表
*
* @param schoolLab 实验室
* @return 实验室集合
*/
public List<SchoolLab> selectSchoolLabList(SchoolLab schoolLab);
/**
* 新增实验室
*
* @param schoolLab 实验室
* @return 结果
*/
public int insertSchoolLab(SchoolLab schoolLab);
/**
* 修改实验室
*
* @param schoolLab 实验室
* @return 结果
*/
public int updateSchoolLab(SchoolLab schoolLab);
/**
* 删除实验室
*
* @param id 实验室主键
* @return 结果
*/
public int deleteSchoolLabById(Long id);
/**
* 批量删除实验室
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolLabByIds(Long[] ids);
/**
* 查询所有实验室管理员
* @return
*/
public List<Map<String,String>> getLabAdminAll();
/**
* 查询指定实验室管理员
* @return
*/
public Map<String,String> getLabAdmin(@Param("roleKey") String roleKey);
/**
* 查询全部学科
* @return
*/
public List<Map<String, String>> getSubAll();
/**
* 查询指定学科
* @param dictValue
* @return
*/
Map<String, String> getSub(@Param("dictValue") String dictValue);
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import java.util.List;
/**
* 教师个人实验申请Mapper接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface SchoolTeacherExperimentApplyMapper extends BaseMapper<SchoolTeacherExperimentApply>
{
/**
* 查询教师个人实验申请
*
* @param id 教师个人实验申请主键
* @return 教师个人实验申请
*/
public SchoolTeacherExperimentApply selectSchoolTeacherExperimentApplyById(Long id);
/**
* 查询教师个人实验申请列表
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 教师个人实验申请集合
*/
public List<SchoolTeacherExperimentApply> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApply schoolTeacherExperimentApply);
/**
* 新增教师个人实验申请
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 结果
*/
public int insertSchoolTeacherExperimentApply(SchoolTeacherExperimentApply schoolTeacherExperimentApply);
/**
* 修改教师个人实验申请
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 结果
*/
public int updateSchoolTeacherExperimentApply(SchoolTeacherExperimentApply schoolTeacherExperimentApply);
/**
* 删除教师个人实验申请
*
* @param id 教师个人实验申请主键
* @return 结果
*/
public int deleteSchoolTeacherExperimentApplyById(Long id);
/**
* 批量删除教师个人实验申请
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherExperimentApplyByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import java.util.List;
/**
* 教师实验室申请Mapper接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface SchoolTeacherLabApplyMapper extends BaseMapper<SchoolTeacherLabApply>
{
/**
* 查询教师实验室申请
*
* @param id 教师实验室申请主键
* @return 教师实验室申请
*/
public SchoolTeacherLabApply selectSchoolTeacherLabApplyById(Long id);
/**
* 查询教师实验室申请列表
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 教师实验室申请集合
*/
public List<SchoolTeacherLabApply> selectSchoolTeacherLabApplyList(SchoolTeacherLabApply schoolTeacherLabApply);
/**
* 新增教师实验室申请
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 结果
*/
public int insertSchoolTeacherLabApply(SchoolTeacherLabApply schoolTeacherLabApply);
/**
* 修改教师实验室申请
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 结果
*/
public int updateSchoolTeacherLabApply(SchoolTeacherLabApply schoolTeacherLabApply);
/**
* 删除教师实验室申请
*
* @param id 教师实验室申请主键
* @return 结果
*/
public int deleteSchoolTeacherLabApplyById(Long id);
/**
* 批量删除教师实验室申请
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherLabApplyByIds(Long[] ids);
}
package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabClassYearMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
/**
* 年级实验室预约Service业务层处理
*
* @author ruoyi
* @date 2023-08-29
*/
@Service
public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYearMapper,SchoolLabClassYear> implements ISchoolLabClassYearService
{
@Autowired
private SchoolLabClassYearMapper schoolLabClassYearMapper;
/**
* 查询年级实验室预约
*
* @param id 年级实验室预约主键
* @return 年级实验室预约
*/
@Override
public SchoolLabClassYear selectSchoolLabClassYearById(Long id)
{
return schoolLabClassYearMapper.selectSchoolLabClassYearById(id);
}
/**
* 查询年级实验室预约列表
*
* @param schoolLabClassYear 年级实验室预约
* @return 年级实验室预约
*/
@Override
public List<SchoolLabClassYear> selectSchoolLabClassYearList(SchoolLabClassYear schoolLabClassYear)
{
return schoolLabClassYearMapper.selectSchoolLabClassYearList(schoolLabClassYear);
}
/**
* 新增年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
* @return 结果
*/
@Transactional
@Override
public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear)
{
schoolLabClassYear.setCreateTime(DateUtils.getNowDate());
int rows = schoolLabClassYearMapper.insertSchoolLabClassYear(schoolLabClassYear);
insertSchoolLabClassYearRelation(schoolLabClassYear);
return rows;
}
/**
* 修改年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
* @return 结果
*/
@Transactional
@Override
public int updateSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear)
{
schoolLabClassYear.setUpdateTime(DateUtils.getNowDate());
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(schoolLabClassYear.getId());
insertSchoolLabClassYearRelation(schoolLabClassYear);
return schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear);
}
/**
* 批量删除年级实验室预约
*
* @param ids 需要删除的年级实验室预约主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolLabClassYearByIds(Long[] ids)
{
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearIds(ids);
return schoolLabClassYearMapper.deleteSchoolLabClassYearByIds(ids);
}
/**
* 删除年级实验室预约信息
*
* @param id 年级实验室预约主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolLabClassYearById(Long id)
{
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id);
return schoolLabClassYearMapper.deleteSchoolLabClassYearById(id);
}
/**
* 新增年级实验室预约和实验室关系信息
*
* @param schoolLabClassYear 年级实验室预约对象
*/
public void insertSchoolLabClassYearRelation(SchoolLabClassYear schoolLabClassYear)
{
List<SchoolLabClassYearRelation> schoolLabClassYearRelationList = schoolLabClassYear.getSchoolLabClassYearRelationList();
Long id = schoolLabClassYear.getId();
if (StringUtils.isNotNull(schoolLabClassYearRelationList))
{
List<SchoolLabClassYearRelation> list = new ArrayList<SchoolLabClassYearRelation>();
for (SchoolLabClassYearRelation schoolLabClassYearRelation : schoolLabClassYearRelationList)
{
schoolLabClassYearRelation.setLabClassYearId(id);
list.add(schoolLabClassYearRelation);
}
if (list.size() > 0)
{
schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list);
}
}
}
}
package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabCompetitionMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabCompetitionService;
/**
* 实验室竞赛Service业务层处理
*
* @author ruoyi
* @date 2023-08-29
*/
@Service
public class SchoolLabCompetitionServiceImpl extends ServiceImpl<SchoolLabCompetitionMapper,SchoolLabCompetition> implements ISchoolLabCompetitionService
{
@Autowired
private SchoolLabCompetitionMapper schoolLabCompetitionMapper;
/**
* 查询实验室竞赛
*
* @param id 实验室竞赛主键
* @return 实验室竞赛
*/
@Override
public SchoolLabCompetition selectSchoolLabCompetitionById(Long id)
{
return schoolLabCompetitionMapper.selectSchoolLabCompetitionById(id);
}
/**
* 查询实验室竞赛列表
*
* @param schoolLabCompetition 实验室竞赛
* @return 实验室竞赛
*/
@Override
public List<SchoolLabCompetition> selectSchoolLabCompetitionList(SchoolLabCompetition schoolLabCompetition)
{
return schoolLabCompetitionMapper.selectSchoolLabCompetitionList(schoolLabCompetition);
}
/**
* 新增实验室竞赛
*
* @param schoolLabCompetition 实验室竞赛
* @return 结果
*/
@Override
public int insertSchoolLabCompetition(SchoolLabCompetition schoolLabCompetition)
{
schoolLabCompetition.setCreateTime(DateUtils.getNowDate());
return schoolLabCompetitionMapper.insertSchoolLabCompetition(schoolLabCompetition);
}
/**
* 修改实验室竞赛
*
* @param schoolLabCompetition 实验室竞赛
* @return 结果
*/
@Override
public int updateSchoolLabCompetition(SchoolLabCompetition schoolLabCompetition)
{
schoolLabCompetition.setUpdateTime(DateUtils.getNowDate());
return schoolLabCompetitionMapper.updateSchoolLabCompetition(schoolLabCompetition);
}
/**
* 批量删除实验室竞赛
*
* @param ids 需要删除的实验室竞赛主键
* @return 结果
*/
@Override
public int deleteSchoolLabCompetitionByIds(Long[] ids)
{
return schoolLabCompetitionMapper.deleteSchoolLabCompetitionByIds(ids);
}
/**
* 删除实验室竞赛信息
*
* @param id 实验室竞赛主键
* @return 结果
*/
@Override
public int deleteSchoolLabCompetitionById(Long id)
{
return schoolLabCompetitionMapper.deleteSchoolLabCompetitionById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolLab;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 实验室Service业务层处理
*
* @author ruoyi
* @date 2023-08-29
*/
@Service
public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> implements ISchoolLabService
{
@Autowired
private SchoolLabMapper schoolLabMapper;
/**
* 查询实验室
*
* @param id 实验室主键
* @return 实验室
*/
@Override
public SchoolLab selectSchoolLabById(Long id)
{
return schoolLabMapper.selectSchoolLabById(id);
}
/**
* 查询实验室列表
*
* @param schoolLab 实验室
* @return 实验室
*/
@Override
public List<SchoolLab> selectSchoolLabList(SchoolLab schoolLab)
{
List<SchoolLab> list = new ArrayList<>();
//获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//获取用户角色集合
List<SysRole> roles = user.getRoles();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
return schoolLabMapper.selectSchoolLabList(schoolLab);
}else if (role.getRoleKey().equals("phy_lab_admin") || role.getRoleKey().equals("che_lab_admin") || role.getRoleKey().equals("bio_lab_admin")){
schoolLab.setInChargeId(user.getUserId());
return schoolLabMapper.selectSchoolLabList(schoolLab);
}
}
if (user.isAdmin()){
return schoolLabMapper.selectSchoolLabList(schoolLab);
}
return list;
}
/**
* 新增实验室
*
* @param schoolLab 实验室
* @return 结果
*/
@Override
public int insertSchoolLab(SchoolLab schoolLab)
{
schoolLab.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolLab.setCreateTime(DateUtils.getNowDate());
return schoolLabMapper.insertSchoolLab(schoolLab);
}
/**
* 修改实验室
*
* @param schoolLab 实验室
* @return 结果
*/
@Override
public int updateSchoolLab(SchoolLab schoolLab)
{
schoolLab.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolLab.setUpdateTime(DateUtils.getNowDate());
return schoolLabMapper.updateSchoolLab(schoolLab);
}
/**
* 批量删除实验室
*
* @param ids 需要删除的实验室主键
* @return 结果
*/
@Override
public int deleteSchoolLabByIds(Long[] ids)
{
return schoolLabMapper.deleteSchoolLabByIds(ids);
}
/**
* 删除实验室信息
*
* @param id 实验室主键
* @return 结果
*/
@Override
public int deleteSchoolLabById(Long id)
{
return schoolLabMapper.deleteSchoolLabById(id);
}
/**
* 获取实验室管理员
*/
@Override
public List<Map<String, String>> getLabAdmin() {
List<Map<String, String>> list = new ArrayList<>();
//获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//获取用户角色集合
List<SysRole> roles = user.getRoles();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
return schoolLabMapper.getLabAdminAll();
}else if (role.getRoleKey().equals("phy_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey()));
}else if (role.getRoleKey().equals("che_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey()));
}else if (role.getRoleKey().equals("bio_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey()));
}
}
if (user.isAdmin()){
return schoolLabMapper.getLabAdminAll();
}
if (list.size() <= 0){
throw new ServiceException("为查询到您实验室管理员信息");
}
return list;
}
@Override
public List<Map<String, String>> getSub() {
List<Map<String, String>> list = new ArrayList<>();
//获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//获取用户角色集合
List<SysRole> roles = user.getRoles();
for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){
return schoolLabMapper.getSubAll();
}else if (role.getRoleKey().equals("phy_lab_admin")){
list.add(schoolLabMapper.getSub("1"));
}else if (role.getRoleKey().equals("che_lab_admin")){
list.add(schoolLabMapper.getSub("2"));
}else if (role.getRoleKey().equals("bio_lab_admin")){
list.add(schoolLabMapper.getSub("3"));
}
}
if (user.isAdmin()){
return schoolLabMapper.getSubAll();
}
if (list.size() <= 0){
throw new ServiceException("为查询到您管理的学科信息");
}
return list;
}
}
package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
/**
* 教师个人实验申请Service业务层处理
*
* @author ruoyi
* @date 2023-08-29
*/
@Service
public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolTeacherExperimentApplyMapper,SchoolTeacherExperimentApply> implements ISchoolTeacherExperimentApplyService
{
@Autowired
private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper;
/**
* 查询教师个人实验申请
*
* @param id 教师个人实验申请主键
* @return 教师个人实验申请
*/
@Override
public SchoolTeacherExperimentApply selectSchoolTeacherExperimentApplyById(Long id)
{
return schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyById(id);
}
/**
* 查询教师个人实验申请列表
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 教师个人实验申请
*/
@Override
public List<SchoolTeacherExperimentApply> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
return schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApply);
}
/**
* 新增教师个人实验申请
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 结果
*/
@Override
public int insertSchoolTeacherExperimentApply(SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
schoolTeacherExperimentApply.setCreateTime(DateUtils.getNowDate());
return schoolTeacherExperimentApplyMapper.insertSchoolTeacherExperimentApply(schoolTeacherExperimentApply);
}
/**
* 修改教师个人实验申请
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 结果
*/
@Override
public int updateSchoolTeacherExperimentApply(SchoolTeacherExperimentApply schoolTeacherExperimentApply)
{
schoolTeacherExperimentApply.setUpdateTime(DateUtils.getNowDate());
return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApply);
}
/**
* 批量删除教师个人实验申请
*
* @param ids 需要删除的教师个人实验申请主键
* @return 结果
*/
@Override
public int deleteSchoolTeacherExperimentApplyByIds(Long[] ids)
{
return schoolTeacherExperimentApplyMapper.deleteSchoolTeacherExperimentApplyByIds(ids);
}
/**
* 删除教师个人实验申请信息
*
* @param id 教师个人实验申请主键
* @return 结果
*/
@Override
public int deleteSchoolTeacherExperimentApplyById(Long id)
{
return schoolTeacherExperimentApplyMapper.deleteSchoolTeacherExperimentApplyById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
/**
* 教师实验室申请Service业务层处理
*
* @author ruoyi
* @date 2023-08-29
*/
@Service
public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherLabApplyMapper,SchoolTeacherLabApply> implements ISchoolTeacherLabApplyService
{
@Autowired
private SchoolTeacherLabApplyMapper schoolTeacherLabApplyMapper;
/**
* 查询教师实验室申请
*
* @param id 教师实验室申请主键
* @return 教师实验室申请
*/
@Override
public SchoolTeacherLabApply selectSchoolTeacherLabApplyById(Long id)
{
return schoolTeacherLabApplyMapper.selectSchoolTeacherLabApplyById(id);
}
/**
* 查询教师实验室申请列表
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 教师实验室申请
*/
@Override
public List<SchoolTeacherLabApply> selectSchoolTeacherLabApplyList(SchoolTeacherLabApply schoolTeacherLabApply)
{
return schoolTeacherLabApplyMapper.selectSchoolTeacherLabApplyList(schoolTeacherLabApply);
}
/**
* 新增教师实验室申请
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 结果
*/
@Override
public int insertSchoolTeacherLabApply(SchoolTeacherLabApply schoolTeacherLabApply)
{
schoolTeacherLabApply.setCreateTime(DateUtils.getNowDate());
return schoolTeacherLabApplyMapper.insertSchoolTeacherLabApply(schoolTeacherLabApply);
}
/**
* 修改教师实验室申请
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 结果
*/
@Override
public int updateSchoolTeacherLabApply(SchoolTeacherLabApply schoolTeacherLabApply)
{
schoolTeacherLabApply.setUpdateTime(DateUtils.getNowDate());
return schoolTeacherLabApplyMapper.updateSchoolTeacherLabApply(schoolTeacherLabApply);
}
/**
* 批量删除教师实验室申请
*
* @param ids 需要删除的教师实验室申请主键
* @return 结果
*/
@Override
public int deleteSchoolTeacherLabApplyByIds(Long[] ids)
{
return schoolTeacherLabApplyMapper.deleteSchoolTeacherLabApplyByIds(ids);
}
/**
* 删除教师实验室申请信息
*
* @param id 教师实验室申请主键
* @return 结果
*/
@Override
public int deleteSchoolTeacherLabApplyById(Long id)
{
return schoolTeacherLabApplyMapper.deleteSchoolTeacherLabApplyById(id);
}
}
......@@ -246,11 +246,11 @@ public class SchoolStudentServiceImpl extends ServiceImpl<SchoolStudentMapper, S
* */
@Override
public int deleteByIds(List<Long> ids) {
/** 学生综合素质评价 */
LambdaQueryWrapper<SchoolStudentEvaluate> evaluateLqw = new LambdaQueryWrapper<>();
evaluateLqw
.in(SchoolStudentEvaluate::getStudentId, ids)
;
// /** 学生综合素质评价 */
// LambdaQueryWrapper<SchoolStudentEvaluate> evaluateLqw = new LambdaQueryWrapper<>();
// evaluateLqw
// .in(SchoolStudentEvaluate::getStudentId, ids)
// ;
/** 学生班级管理 */
LambdaQueryWrapper<SchoolStudentClasses> classesLqw = new LambdaQueryWrapper<>();
......@@ -276,26 +276,26 @@ public class SchoolStudentServiceImpl extends ServiceImpl<SchoolStudentMapper, S
.in(SchoolStudentParent::getStudentId, ids)
;
/** 学校德育检查 */
LambdaQueryWrapper<SchoolEducation> educationLqw = new LambdaQueryWrapper<>();
educationLqw
.in(SchoolEducation::getStudentId, ids)
;
// /** 学校德育检查 */
// LambdaQueryWrapper<SchoolEducation> educationLqw = new LambdaQueryWrapper<>();
// educationLqw
// .in(SchoolEducation::getStudentId, ids)
// ;
//由于学校德育检查明细表中无studentID,只有educationid 所以先查找educationid,再删
List<Long> educationIdList = schoolEducationMapper.getIds(ids);
if (educationIdList.size() > 0) {
LambdaQueryWrapper<SchoolEducationDetails> educationDetailsLqw = new LambdaQueryWrapper<>();
educationDetailsLqw
.in(SchoolEducationDetails::getEducationId, educationIdList)
;
schoolEducationDetailsMapper.delete(educationDetailsLqw);
}
schoolEducationMapper.delete(educationLqw);
// List<Long> educationIdList = schoolEducationMapper.getIds(ids);
// if (educationIdList.size() > 0) {
// LambdaQueryWrapper<SchoolEducationDetails> educationDetailsLqw = new LambdaQueryWrapper<>();
// educationDetailsLqw
// .in(SchoolEducationDetails::getEducationId, educationIdList)
// ;
// schoolEducationDetailsMapper.delete(educationDetailsLqw);
// }
// schoolEducationMapper.delete(educationLqw);
schoolStudentParentMapper.delete(parentLqw);
schoolStudentLeaveMapper.delete(studentLeaveLqw);
schoolStudentClassesMapper.delete(classesLqw);
schoolStudentEvaluateMapper.delete(evaluateLqw);
// schoolStudentEvaluateMapper.delete(evaluateLqw);
return schoolStudentMapper.delete(lqw);
}
......
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
import java.util.List;
import java.util.Map;
/**
* 实验计划Service接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface ISchoolExperimentPlanService extends IService<SchoolExperimentPlan>
{
/**
* 查询实验计划
*
* @param id 实验计划主键
* @return 实验计划
*/
public SchoolExperimentPlanVo selectSchoolExperimentPlanById(Long id);
/**
* 查询实验计划列表
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 新增实验计划
*
* @param schoolExperimentPlanVo 实验计划
* @return 结果
*/
public int insertSchoolExperimentPlan(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 修改实验计划
*
* @param schoolExperimentPlanVo 实验计划
* @return 结果
*/
public int updateSchoolExperimentPlan(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 批量删除实验计划
*
* @param ids 需要删除的实验计划主键集合
* @return 结果
*/
public int deleteSchoolExperimentPlanByIds(Long[] ids);
/**
* 删除实验计划信息
*
* @param id 实验计划主键
* @return 结果
*/
public int deleteSchoolExperimentPlanById(Long id);
/**
* 根据学年查询级部下拉框
* @param schoolYear
* @return
*/
List<Map<String,String>> getGrade(int schoolYear);
/**
* 根据级部查询对应班级
* @param gradeId
* @return
*/
List<Map<String,String>> getSchoolClass(Long gradeId);
}
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import java.util.List;
/**
* 年级实验室预约Service接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear>
{
/**
* 查询年级实验室预约
*
* @param id 年级实验室预约主键
* @return 年级实验室预约
*/
public SchoolLabClassYear selectSchoolLabClassYearById(Long id);
/**
* 查询年级实验室预约列表
*
* @param schoolLabClassYear 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYear> selectSchoolLabClassYearList(SchoolLabClassYear schoolLabClassYear);
/**
* 新增年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
* @return 结果
*/
public int insertSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear);
/**
* 修改年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
* @return 结果
*/
public int updateSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear);
/**
* 批量删除年级实验室预约
*
* @param ids 需要删除的年级实验室预约主键集合
* @return 结果
*/
public int deleteSchoolLabClassYearByIds(Long[] ids);
/**
* 删除年级实验室预约信息
*
* @param id 年级实验室预约主键
* @return 结果
*/
public int deleteSchoolLabClassYearById(Long id);
}
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import java.util.List;
/**
* 实验室竞赛Service接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface ISchoolLabCompetitionService extends IService<SchoolLabCompetition>
{
/**
* 查询实验室竞赛
*
* @param id 实验室竞赛主键
* @return 实验室竞赛
*/
public SchoolLabCompetition selectSchoolLabCompetitionById(Long id);
/**
* 查询实验室竞赛列表
*
* @param schoolLabCompetition 实验室竞赛
* @return 实验室竞赛集合
*/
public List<SchoolLabCompetition> selectSchoolLabCompetitionList(SchoolLabCompetition schoolLabCompetition);
/**
* 新增实验室竞赛
*
* @param schoolLabCompetition 实验室竞赛
* @return 结果
*/
public int insertSchoolLabCompetition(SchoolLabCompetition schoolLabCompetition);
/**
* 修改实验室竞赛
*
* @param schoolLabCompetition 实验室竞赛
* @return 结果
*/
public int updateSchoolLabCompetition(SchoolLabCompetition schoolLabCompetition);
/**
* 批量删除实验室竞赛
*
* @param ids 需要删除的实验室竞赛主键集合
* @return 结果
*/
public int deleteSchoolLabCompetitionByIds(Long[] ids);
/**
* 删除实验室竞赛信息
*
* @param id 实验室竞赛主键
* @return 结果
*/
public int deleteSchoolLabCompetitionById(Long id);
}
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import java.util.List;
import java.util.Map;
/**
* 实验室Service接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface ISchoolLabService extends IService<SchoolLab>
{
/**
* 查询实验室
*
* @param id 实验室主键
* @return 实验室
*/
public SchoolLab selectSchoolLabById(Long id);
/**
* 查询实验室列表
*
* @param schoolLab 实验室
* @return 实验室集合
*/
public List<SchoolLab> selectSchoolLabList(SchoolLab schoolLab);
/**
* 新增实验室
*
* @param schoolLab 实验室
* @return 结果
*/
public int insertSchoolLab(SchoolLab schoolLab);
/**
* 修改实验室
*
* @param schoolLab 实验室
* @return 结果
*/
public int updateSchoolLab(SchoolLab schoolLab);
/**
* 批量删除实验室
*
* @param ids 需要删除的实验室主键集合
* @return 结果
*/
public int deleteSchoolLabByIds(Long[] ids);
/**
* 删除实验室信息
*
* @param id 实验室主键
* @return 结果
*/
public int deleteSchoolLabById(Long id);
/**
* 获获取实验室负责人下拉框
*/
List<Map<String, String>> getLabAdmin();
/**
* 获取学科下拉框
* @return
*/
List<Map<String, String>> getSub();
}
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import java.util.List;
/**
* 教师个人实验申请Service接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface ISchoolTeacherExperimentApplyService extends IService<SchoolTeacherExperimentApply>
{
/**
* 查询教师个人实验申请
*
* @param id 教师个人实验申请主键
* @return 教师个人实验申请
*/
public SchoolTeacherExperimentApply selectSchoolTeacherExperimentApplyById(Long id);
/**
* 查询教师个人实验申请列表
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 教师个人实验申请集合
*/
public List<SchoolTeacherExperimentApply> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApply schoolTeacherExperimentApply);
/**
* 新增教师个人实验申请
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 结果
*/
public int insertSchoolTeacherExperimentApply(SchoolTeacherExperimentApply schoolTeacherExperimentApply);
/**
* 修改教师个人实验申请
*
* @param schoolTeacherExperimentApply 教师个人实验申请
* @return 结果
*/
public int updateSchoolTeacherExperimentApply(SchoolTeacherExperimentApply schoolTeacherExperimentApply);
/**
* 批量删除教师个人实验申请
*
* @param ids 需要删除的教师个人实验申请主键集合
* @return 结果
*/
public int deleteSchoolTeacherExperimentApplyByIds(Long[] ids);
/**
* 删除教师个人实验申请信息
*
* @param id 教师个人实验申请主键
* @return 结果
*/
public int deleteSchoolTeacherExperimentApplyById(Long id);
}
package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import java.util.List;
/**
* 教师实验室申请Service接口
*
* @author ruoyi
* @date 2023-08-29
*/
public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLabApply>
{
/**
* 查询教师实验室申请
*
* @param id 教师实验室申请主键
* @return 教师实验室申请
*/
public SchoolTeacherLabApply selectSchoolTeacherLabApplyById(Long id);
/**
* 查询教师实验室申请列表
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 教师实验室申请集合
*/
public List<SchoolTeacherLabApply> selectSchoolTeacherLabApplyList(SchoolTeacherLabApply schoolTeacherLabApply);
/**
* 新增教师实验室申请
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 结果
*/
public int insertSchoolTeacherLabApply(SchoolTeacherLabApply schoolTeacherLabApply);
/**
* 修改教师实验室申请
*
* @param schoolTeacherLabApply 教师实验室申请
* @return 结果
*/
public int updateSchoolTeacherLabApply(SchoolTeacherLabApply schoolTeacherLabApply);
/**
* 批量删除教师实验室申请
*
* @param ids 需要删除的教师实验室申请主键集合
* @return 结果
*/
public int deleteSchoolTeacherLabApplyByIds(Long[] ids);
/**
* 删除教师实验室申请信息
*
* @param id 教师实验室申请主键
* @return 结果
*/
public int deleteSchoolTeacherLabApplyById(Long id);
}
package yangtz.cs.liu.campus.vo.schoolLab;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
/**
* 实验计划对象Vo
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolExperimentPlanVo extends BaseEntity
{
/** 实验计划主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 级部id */
@Excel(name = "级部id")
private Long gradeId;
private List<Long> gradeIds;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
private String schoolYear;
/** 学年+学期 */
private String schoolYearSemester;
/** 学期(1上学期,2下学期) */
private String semester;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 实验名称 */
@Excel(name = "实验名称")
private String experimentName;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 是否已预约 */
@Excel(name = "是否已预约", readConverterExp = "0=否,1=是")
private String isAppointment;
/** 计划开始时间 */
private String plannedStartTime;
/** 计划结束时间 */
private String plannedEndTime;
/** 计划时间 */
private String plannedTime;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
/** 实验计划与班级关系信息 */
private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
/**
* 年级实验室预约对象Vo
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLabClassYearVo extends BaseEntity
{
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 实验计划id */
private String experimentPlanId;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期(1上学期,2下学期) */
@Excel(name = "学期", readConverterExp = "1=上学期,2=下学期")
private String semester;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 计划开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date plannedStartTime;
/** 计划结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date plannedEndTime;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
/** 申报状态(0未申报,1已申报,2已阅读,3已分配) */
@Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配")
private String declareState;
/** 申报人id */
private Long applyId;
/** 申报人 */
@Excel(name = "申报人")
private String applyName;
/** 申报时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 删除状态 */
private String delFlag;
/** 年级实验室预约和实验室关系信息 */
private List<SchoolLabClassYearRelation> schoolLabClassYearRelationList;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 实验室竞赛对象Vo
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLabCompetitionVo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 实验室竞赛主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 参赛教师id */
@Excel(name = "参赛教师id")
private String teacherId;
/** 参赛教师 */
@Excel(name = "参赛教师")
private String teacherName;
/** 参赛课题 */
@Excel(name = "参赛课题")
private String entrySubject;
/** 比赛项目名称 */
@Excel(name = "比赛项目名称")
private String competitionName;
/** 比赛类型(1说课比赛,2自制教具比赛,3实验教学能力大赛) */
@Excel(name = "比赛类型", readConverterExp = "1=说课比赛,2=自制教具比赛,3=实验教学能力大赛")
private String competitionType;
/** 比赛级别(1省级,2市级) */
@Excel(name = "比赛级别", readConverterExp = "1=省级,2=市级")
private String competitionLevel;
/** 备注1 */
@Excel(name = "备注1")
private String remark1;
/** 备注2 */
@Excel(name = "备注2")
private String remark2;
/** 备注3 */
@Excel(name = "备注3")
private String remark3;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 实验室对象Vo
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolLabVo extends BaseEntity
{
/** 实验室主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 实验室名称 */
@Excel(name = "实验室名称")
private String labName;
/** 实验室学科(1物理,2化学,3生物) */
@Excel(name = "实验室学科", readConverterExp = "1=物理,2=化学,3=生物")
private String labSub;
/** 负责人id */
private Long inChargeId;
/** 负责人 */
@Excel(name = "负责人")
private String inChargeName;
/** 实验室状态(1良好,2正常,3待检查) */
@Excel(name = "实验室状态", readConverterExp = "1=良好,2=正常,3=待检查")
private String labState;
/** 实验室用品 */
@Excel(name = "实验室用品")
private String labUseGoods;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 教师个人实验申请对象Vo
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolTeacherExperimentApplyVo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 教师个人实验申请主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 级部id */
private Long gradeId;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期 */
@Excel(name = "学期")
private String semester;
/** 规划时间 */
@Excel(name = "规划时间")
private String plannedTime;
/** 实验名称 */
@Excel(name = "实验名称")
private String experimentName;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
/** 实验室id */
private String labId;
/** 实验室名称 */
@Excel(name = "实验室名称")
private String labName;
/** 申报状态(0未申报,1已申报,2已阅读,3已分配) */
@Excel(name = "申报状态", readConverterExp = "0=未申报,1=已申报,2=已阅读,3=已分配")
private String declareState;
/** 申报人id */
private Long applyId;
/** 申报人名称 */
@Excel(name = "申报人名称")
private String applyName;
/** 申报时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 教师实验室申请对象Vo
*
* @author ruoyi
* @date 2023-08-29
*/
@Data
public class SchoolTeacherLabApplyVo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 教师实验室申请主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 年级实验室预约主键id */
private String labClassYearId;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期(1上学期,2下学期) */
@Excel(name = "学期", readConverterExp = "1=上学期,2=下学期")
private String semester;
/** 班级id */
private String classId;
/** 班级名称 */
@Excel(name = "班级名称")
private String className;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 实验时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实验时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date experimentTime;
/** 节次 */
@Excel(name = "节次")
private String section;
/** 实验室id */
private Long labId;
/** 实验室名称 */
@Excel(name = "实验室名称")
private String labName;
/** 申请状态(1已确认,0未确认) */
@Excel(name = "申请状态", readConverterExp = "1=已确认,0=未确认")
private String applyState;
/** 申请人id */
private Long applyId;
/** 申请人 */
@Excel(name = "申请人")
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
}
<?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="yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabCompetitionMapper">
<resultMap type="SchoolLabCompetition" id="SchoolLabCompetitionResult">
<result property="id" column="id" />
<result property="schoolYear" column="school_year" />
<result property="teacherId" column="teacher_id" />
<result property="teacherName" column="teacher_name" />
<result property="entrySubject" column="entry_subject" />
<result property="competitionName" column="competition_name" />
<result property="competitionType" column="competition_type" />
<result property="competitionLevel" column="competition_level" />
<result property="remark1" column="remark1" />
<result property="remark2" column="remark2" />
<result property="remark3" column="remark3" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolLabCompetitionVo">
select id, school_year, teacher_id, teacher_name, entry_subject, competition_name, competition_type, competition_level, remark1, remark2, remark3, create_by, create_time, update_by, update_time, del_flag from school_lab_competition
</sql>
<select id="selectSchoolLabCompetitionList" parameterType="SchoolLabCompetition" resultMap="SchoolLabCompetitionResult">
<include refid="selectSchoolLabCompetitionVo"/>
<where>
del_flag = '0'
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="teacherId != null and teacherId != ''"> and teacher_id = #{teacherId}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
<if test="entrySubject != null and entrySubject != ''"> and entry_subject = #{entrySubject}</if>
<if test="competitionName != null and competitionName != ''"> and competition_name like concat('%', #{competitionName}, '%')</if>
<if test="competitionType != null and competitionType != ''"> and competition_type = #{competitionType}</if>
<if test="competitionLevel != null and competitionLevel != ''"> and competition_level = #{competitionLevel}</if>
<if test="remark1 != null and remark1 != ''"> and remark1 = #{remark1}</if>
<if test="remark2 != null and remark2 != ''"> and remark2 = #{remark2}</if>
<if test="remark3 != null and remark3 != ''"> and remark3 = #{remark3}</if>
</where>
</select>
<select id="selectSchoolLabCompetitionById" parameterType="Long" resultMap="SchoolLabCompetitionResult">
<include refid="selectSchoolLabCompetitionVo"/>
where id = #{id}
</select>
<insert id="insertSchoolLabCompetition" parameterType="SchoolLabCompetition" useGeneratedKeys="true" keyProperty="id">
insert into school_lab_competition
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">school_year,</if>
<if test="teacherId != null">teacher_id,</if>
<if test="teacherName != null">teacher_name,</if>
<if test="entrySubject != null">entry_subject,</if>
<if test="competitionName != null">competition_name,</if>
<if test="competitionType != null">competition_type,</if>
<if test="competitionLevel != null">competition_level,</if>
<if test="remark1 != null">remark1,</if>
<if test="remark2 != null">remark2,</if>
<if test="remark3 != null">remark3,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">#{schoolYear},</if>
<if test="teacherId != null">#{teacherId},</if>
<if test="teacherName != null">#{teacherName},</if>
<if test="entrySubject != null">#{entrySubject},</if>
<if test="competitionName != null">#{competitionName},</if>
<if test="competitionType != null">#{competitionType},</if>
<if test="competitionLevel != null">#{competitionLevel},</if>
<if test="remark1 != null">#{remark1},</if>
<if test="remark2 != null">#{remark2},</if>
<if test="remark3 != null">#{remark3},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolLabCompetition" parameterType="SchoolLabCompetition">
update school_lab_competition
<trim prefix="SET" suffixOverrides=",">
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="teacherId != null">teacher_id = #{teacherId},</if>
<if test="teacherName != null">teacher_name = #{teacherName},</if>
<if test="entrySubject != null">entry_subject = #{entrySubject},</if>
<if test="competitionName != null">competition_name = #{competitionName},</if>
<if test="competitionType != null">competition_type = #{competitionType},</if>
<if test="competitionLevel != null">competition_level = #{competitionLevel},</if>
<if test="remark1 != null">remark1 = #{remark1},</if>
<if test="remark2 != null">remark2 = #{remark2},</if>
<if test="remark3 != null">remark3 = #{remark3},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolLabCompetitionById" parameterType="Long">
update school_lab_competition set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolLabCompetitionByIds" parameterType="String">
update school_lab_competition set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
<?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="yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper">
<resultMap type="SchoolLab" id="SchoolLabResult">
<result property="id" column="id" />
<result property="labName" column="lab_name" />
<result property="labSub" column="lab_sub" />
<result property="inChargeId" column="in_charge_id" />
<result property="inChargeName" column="in_charge_name" />
<result property="labState" column="lab_state" />
<result property="labUseGoods" column="lab_use_goods" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolLabVo">
select id, lab_name, lab_sub, in_charge_id, in_charge_name, lab_state, lab_use_goods, create_by, create_time, update_by, update_time, del_flag from school_lab
</sql>
<select id="selectSchoolLabList" parameterType="SchoolLab" resultMap="SchoolLabResult">
<include refid="selectSchoolLabVo"/>
<where>
del_flag = '0'
<if test="labName != null and labName != ''"> and lab_name like concat('%', #{labName}, '%')</if>
<if test="labSub != null and labSub != ''"> and lab_sub = #{labSub}</if>
<if test="inChargeId != null "> and in_charge_id = #{inChargeId}</if>
<if test="inChargeName != null and inChargeName != ''"> and in_charge_name like concat('%', #{inChargeName}, '%')</if>
<if test="labState != null and labState != ''"> and lab_state = #{labState}</if>
<if test="labUseGoods != null and labUseGoods != ''"> and lab_use_goods = #{labUseGoods}</if>
</where>
</select>
<select id="selectSchoolLabById" parameterType="Long" resultMap="SchoolLabResult">
<include refid="selectSchoolLabVo"/>
where id = #{id}
</select>
<insert id="insertSchoolLab" parameterType="SchoolLab" useGeneratedKeys="true" keyProperty="id">
insert into school_lab
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="labName != null">lab_name,</if>
<if test="labSub != null">lab_sub,</if>
<if test="inChargeId != null">in_charge_id,</if>
<if test="inChargeName != null">in_charge_name,</if>
<if test="labState != null">lab_state,</if>
<if test="labUseGoods != null">lab_use_goods,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="labName != null">#{labName},</if>
<if test="labSub != null">#{labSub},</if>
<if test="inChargeId != null">#{inChargeId},</if>
<if test="inChargeName != null">#{inChargeName},</if>
<if test="labState != null">#{labState},</if>
<if test="labUseGoods != null">#{labUseGoods},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolLab" parameterType="SchoolLab">
update school_lab
<trim prefix="SET" suffixOverrides=",">
<if test="labName != null">lab_name = #{labName},</if>
<if test="labSub != null">lab_sub = #{labSub},</if>
<if test="inChargeId != null">in_charge_id = #{inChargeId},</if>
<if test="inChargeName != null">in_charge_name = #{inChargeName},</if>
<if test="labState != null">lab_state = #{labState},</if>
<if test="labUseGoods != null">lab_use_goods = #{labUseGoods},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolLabById" parameterType="Long">
update school_lab set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolLabByIds" parameterType="String">
update school_lab set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<select id="getLabAdminAll" resultType="Map">
select
u.user_id as userId,
u.user_name as userName
from
sys_user u
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on ur.role_id = r.role_id
where
r.role_key = "phy_lab_admin"
or r.role_key = "che_lab_admin"
or r.role_key = "bio_lab_admin"
</select>
<select id="getLabAdmin" parameterType="String" resultType="Map">
select
u.user_id as userId,
u.user_name as userName
from
sys_user u
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on ur.role_id = r.role_id
where
r.role_key = #{roleKey}
</select>
<select id="getSubAll" resultType="Map">
select
dict_label as dictLabel,
dict_value as dictValue
from
sys_dict_data
where
dict_type = "lab_sub"
</select>
<select id="getSub" parameterType="String" resultType="Map">
select
dict_label as dictLabel,
dict_value as dictValue
from
sys_dict_data
where
dict_type = "lab_sub"
and dict_value = #{dictValue}
</select>
</mapper>
\ No newline at end of file
<?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="yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper">
<resultMap type="SchoolTeacherExperimentApply" id="SchoolTeacherExperimentApplyResult">
<result property="id" column="id" />
<result property="sub" column="sub" />
<result property="gradeId" column="grade_id" />
<result property="grade" column="grade" />
<result property="schoolYear" column="school_year" />
<result property="semester" column="semester" />
<result property="plannedTime" column="planned_time" />
<result property="experimentName" column="experiment_name" />
<result property="experimentClassify" column="experiment_classify" />
<result property="experimentUseGoods" column="experiment_use_goods" />
<result property="labId" column="lab_id" />
<result property="labName" column="lab_name" />
<result property="declareState" column="declare_state" />
<result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolTeacherExperimentApplyVo">
select id, sub, grade_id, grade, school_year, semester, planned_time, experiment_name, experiment_classify, experiment_use_goods, lab_id, lab_name, declare_state, apply_id, apply_name, apply_time, create_by, create_time, update_by, update_time, del_flag from school_teacher_experiment_apply
</sql>
<select id="selectSchoolTeacherExperimentApplyList" parameterType="SchoolTeacherExperimentApply" resultMap="SchoolTeacherExperimentApplyResult">
<include refid="selectSchoolTeacherExperimentApplyVo"/>
<where>
del_flag = '0'
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="plannedTime != null and plannedTime != ''"> and planned_time = #{plannedTime}</if>
<if test="experimentName != null and experimentName != ''"> and experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and experiment_use_goods = #{experimentUseGoods}</if>
<if test="labId != null and labId != ''"> and lab_id = #{labId}</if>
<if test="labName != null and labName != ''"> and lab_name like concat('%', #{labName}, '%')</if>
<if test="declareState != null and declareState != ''"> and declare_state = #{declareState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
</where>
</select>
<select id="selectSchoolTeacherExperimentApplyById" parameterType="Long" resultMap="SchoolTeacherExperimentApplyResult">
<include refid="selectSchoolTeacherExperimentApplyVo"/>
where id = #{id}
</select>
<insert id="insertSchoolTeacherExperimentApply" parameterType="SchoolTeacherExperimentApply" useGeneratedKeys="true" keyProperty="id">
insert into school_teacher_experiment_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sub != null">sub,</if>
<if test="gradeId != null">grade_id,</if>
<if test="grade != null">grade,</if>
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="plannedTime != null">planned_time,</if>
<if test="experimentName != null">experiment_name,</if>
<if test="experimentClassify != null">experiment_classify,</if>
<if test="experimentUseGoods != null">experiment_use_goods,</if>
<if test="labId != null">lab_id,</if>
<if test="labName != null">lab_name,</if>
<if test="declareState != null">declare_state,</if>
<if test="applyId != null">apply_id,</if>
<if test="applyName != null">apply_name,</if>
<if test="applyTime != null">apply_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sub != null">#{sub},</if>
<if test="gradeId != null">#{gradeId},</if>
<if test="grade != null">#{grade},</if>
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="plannedTime != null">#{plannedTime},</if>
<if test="experimentName != null">#{experimentName},</if>
<if test="experimentClassify != null">#{experimentClassify},</if>
<if test="experimentUseGoods != null">#{experimentUseGoods},</if>
<if test="labId != null">#{labId},</if>
<if test="labName != null">#{labName},</if>
<if test="declareState != null">#{declareState},</if>
<if test="applyId != null">#{applyId},</if>
<if test="applyName != null">#{applyName},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolTeacherExperimentApply" parameterType="SchoolTeacherExperimentApply">
update school_teacher_experiment_apply
<trim prefix="SET" suffixOverrides=",">
<if test="sub != null">sub = #{sub},</if>
<if test="gradeId != null">grade_id = #{gradeId},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="plannedTime != null">planned_time = #{plannedTime},</if>
<if test="experimentName != null">experiment_name = #{experimentName},</if>
<if test="experimentClassify != null">experiment_classify = #{experimentClassify},</if>
<if test="experimentUseGoods != null">experiment_use_goods = #{experimentUseGoods},</if>
<if test="labId != null">lab_id = #{labId},</if>
<if test="labName != null">lab_name = #{labName},</if>
<if test="declareState != null">declare_state = #{declareState},</if>
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolTeacherExperimentApplyById" parameterType="Long">
update school_teacher_experiment_apply set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolTeacherExperimentApplyByIds" parameterType="String">
update school_teacher_experiment_apply set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
<?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="yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper">
<resultMap type="SchoolTeacherLabApply" id="SchoolTeacherLabApplyResult">
<result property="id" column="id" />
<result property="labClassYearId" column="lab_class_year_id" />
<result property="experimentClassify" column="experiment_classify" />
<result property="sub" column="sub" />
<result property="grade" column="grade" />
<result property="schoolYear" column="school_year" />
<result property="semester" column="semester" />
<result property="classId" column="class_id" />
<result property="className" column="class_name" />
<result property="chapterContent" column="chapter_content" />
<result property="experimentTime" column="experiment_time" />
<result property="section" column="section" />
<result property="labId" column="lab_id" />
<result property="labName" column="lab_name" />
<result property="applyState" column="apply_state" />
<result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolTeacherLabApplyVo">
select id, lab_class_year_id, experiment_classify, sub, grade, school_year, semester, class_id, class_name, chapter_content, experiment_time, section, lab_id, lab_name, apply_state, apply_id, apply_name, apply_time, remark, create_by, create_time, update_by, update_time, del_flag from school_teacher_lab_apply
</sql>
<select id="selectSchoolTeacherLabApplyList" parameterType="SchoolTeacherLabApply" resultMap="SchoolTeacherLabApplyResult">
<include refid="selectSchoolTeacherLabApplyVo"/>
<where>
del_flag = '0'
<if test="labClassYearId != null and labClassYearId != ''"> and lab_class_year_id = #{labClassYearId}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="classId != null and classId != ''"> and class_id = #{classId}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and chapter_content = #{chapterContent}</if>
<if test="experimentTime != null "> and experiment_time = #{experimentTime}</if>
<if test="section != null and section != ''"> and section = #{section}</if>
<if test="labId != null "> and lab_id = #{labId}</if>
<if test="labName != null and labName != ''"> and lab_name like concat('%', #{labName}, '%')</if>
<if test="applyState != null and applyState != ''"> and apply_state = #{applyState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
</where>
</select>
<select id="selectSchoolTeacherLabApplyById" parameterType="Long" resultMap="SchoolTeacherLabApplyResult">
<include refid="selectSchoolTeacherLabApplyVo"/>
where id = #{id}
</select>
<insert id="insertSchoolTeacherLabApply" parameterType="SchoolTeacherLabApply" useGeneratedKeys="true" keyProperty="id">
insert into school_teacher_lab_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="labClassYearId != null">lab_class_year_id,</if>
<if test="experimentClassify != null">experiment_classify,</if>
<if test="sub != null">sub,</if>
<if test="grade != null">grade,</if>
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="classId != null">class_id,</if>
<if test="className != null">class_name,</if>
<if test="chapterContent != null">chapter_content,</if>
<if test="experimentTime != null">experiment_time,</if>
<if test="section != null">section,</if>
<if test="labId != null">lab_id,</if>
<if test="labName != null">lab_name,</if>
<if test="applyState != null">apply_state,</if>
<if test="applyId != null">apply_id,</if>
<if test="applyName != null">apply_name,</if>
<if test="applyTime != null">apply_time,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="labClassYearId != null">#{labClassYearId},</if>
<if test="experimentClassify != null">#{experimentClassify},</if>
<if test="sub != null">#{sub},</if>
<if test="grade != null">#{grade},</if>
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="classId != null">#{classId},</if>
<if test="className != null">#{className},</if>
<if test="chapterContent != null">#{chapterContent},</if>
<if test="experimentTime != null">#{experimentTime},</if>
<if test="section != null">#{section},</if>
<if test="labId != null">#{labId},</if>
<if test="labName != null">#{labName},</if>
<if test="applyState != null">#{applyState},</if>
<if test="applyId != null">#{applyId},</if>
<if test="applyName != null">#{applyName},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolTeacherLabApply" parameterType="SchoolTeacherLabApply">
update school_teacher_lab_apply
<trim prefix="SET" suffixOverrides=",">
<if test="labClassYearId != null">lab_class_year_id = #{labClassYearId},</if>
<if test="experimentClassify != null">experiment_classify = #{experimentClassify},</if>
<if test="sub != null">sub = #{sub},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="classId != null">class_id = #{classId},</if>
<if test="className != null">class_name = #{className},</if>
<if test="chapterContent != null">chapter_content = #{chapterContent},</if>
<if test="experimentTime != null">experiment_time = #{experimentTime},</if>
<if test="section != null">section = #{section},</if>
<if test="labId != null">lab_id = #{labId},</if>
<if test="labName != null">lab_name = #{labName},</if>
<if test="applyState != null">apply_state = #{applyState},</if>
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolTeacherLabApplyById" parameterType="Long">
update school_teacher_lab_apply set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolTeacherLabApplyByIds" parameterType="String">
update school_teacher_lab_apply set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment