分组、教室初始化
This commit is contained in:
parent
98340d6742
commit
be2ae25b5c
|
@ -0,0 +1,163 @@
|
||||||
|
package org.jeecg.modules.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.jeecg.modules.entity.CetGroup;
|
||||||
|
import org.jeecg.modules.service.ICetGroupService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分组数据表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-12
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="分组数据表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cet/cetGroup")
|
||||||
|
@Slf4j
|
||||||
|
public class CetGroupController extends JeecgController<CetGroup, ICetGroupService> {
|
||||||
|
@Autowired
|
||||||
|
private ICetGroupService cetGroupService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param cetGroup
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "分组数据表-分页列表查询")
|
||||||
|
@ApiOperation(value="分组数据表-分页列表查询", notes="分组数据表-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<CetGroup>> queryPageList(CetGroup cetGroup,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<CetGroup> queryWrapper = QueryGenerator.initQueryWrapper(cetGroup, req.getParameterMap());
|
||||||
|
Page<CetGroup> page = new Page<CetGroup>(pageNo, pageSize);
|
||||||
|
IPage<CetGroup> pageList = cetGroupService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param cetGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "分组数据表-添加")
|
||||||
|
@ApiOperation(value="分组数据表-添加", notes="分组数据表-添加")
|
||||||
|
@RequiresPermissions("cet:cet_group:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody CetGroup cetGroup) {
|
||||||
|
cetGroupService.save(cetGroup);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param cetGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "分组数据表-编辑")
|
||||||
|
@ApiOperation(value="分组数据表-编辑", notes="分组数据表-编辑")
|
||||||
|
@RequiresPermissions("cet:cet_group:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody CetGroup cetGroup) {
|
||||||
|
cetGroupService.updateById(cetGroup);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "分组数据表-通过id删除")
|
||||||
|
@ApiOperation(value="分组数据表-通过id删除", notes="分组数据表-通过id删除")
|
||||||
|
@RequiresPermissions("cet:cet_group:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
cetGroupService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "分组数据表-批量删除")
|
||||||
|
@ApiOperation(value="分组数据表-批量删除", notes="分组数据表-批量删除")
|
||||||
|
@RequiresPermissions("cet:cet_group:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.cetGroupService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "分组数据表-通过id查询")
|
||||||
|
@ApiOperation(value="分组数据表-通过id查询", notes="分组数据表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<CetGroup> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
CetGroup cetGroup = cetGroupService.getById(id);
|
||||||
|
if(cetGroup==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(cetGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param cetGroup
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("cet:cet_group:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, CetGroup cetGroup) {
|
||||||
|
return super.exportXls(request, cetGroup, CetGroup.class, "分组数据表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("cet:cet_group:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, CetGroup.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.modules.entity.CetInvigilateData;
|
import org.jeecg.modules.entity.CetInvigilateData;
|
||||||
import org.jeecg.modules.service.ICetInvigilateDataService;
|
import org.jeecg.modules.service.ICetInvigilateDataService;
|
||||||
|
import org.jeecg.modules.service.ICetTeachersService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
@ -35,6 +36,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
public class CetInvigilateDataController extends JeecgController<CetInvigilateData, ICetInvigilateDataService> {
|
public class CetInvigilateDataController extends JeecgController<CetInvigilateData, ICetInvigilateDataService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICetInvigilateDataService cetInvigilateDataService;
|
private ICetInvigilateDataService cetInvigilateDataService;
|
||||||
|
@Autowired
|
||||||
|
private ICetTeachersService cetTeachersService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
@ -66,7 +69,7 @@ public class CetInvigilateDataController extends JeecgController<CetInvigilateDa
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "数据总表-添加")
|
@AutoLog(value = "数据总表-添加")
|
||||||
@ApiOperation(value="数据总表-添加", notes="数据总表-添加")
|
@ApiOperation(value="数据总表-添加", notes="数据总表-添加")
|
||||||
// @RequiresPermissions("cet:cet_invigilate_data:add")
|
@RequiresPermissions("cet:cet_invigilate_data:add")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody CetInvigilateData cetInvigilateData) {
|
public Result<String> add(@RequestBody CetInvigilateData cetInvigilateData) {
|
||||||
cetInvigilateDataService.add(cetInvigilateData);
|
cetInvigilateDataService.add(cetInvigilateData);
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class CetTeachersController extends JeecgController<CetTeachers, ICetTeac
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "教师数据表-添加")
|
@AutoLog(value = "教师数据表-添加")
|
||||||
@ApiOperation(value="教师数据表-添加", notes="教师数据表-添加")
|
@ApiOperation(value="教师数据表-添加", notes="教师数据表-添加")
|
||||||
// @RequiresPermissions("data:cet_teachers:add")
|
@RequiresPermissions("data:cet_teachers:add")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody CetTeachers cetTeachers) {
|
public Result<String> add(@RequestBody CetTeachers cetTeachers) {
|
||||||
cetTeachersService.add(cetTeachers);
|
cetTeachersService.add(cetTeachers);
|
||||||
|
|
|
@ -0,0 +1,162 @@
|
||||||
|
package org.jeecg.modules.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.jeecg.modules.entity.ClassRoom;
|
||||||
|
import org.jeecg.modules.service.IClassRoomService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 教室表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="教室表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cet/classRoom")
|
||||||
|
@Slf4j
|
||||||
|
public class ClassRoomController extends JeecgController<ClassRoom, IClassRoomService> {
|
||||||
|
@Autowired
|
||||||
|
private IClassRoomService classRoomService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param classRoom
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "教室表-分页列表查询")
|
||||||
|
@ApiOperation(value="教室表-分页列表查询", notes="教室表-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<ClassRoom>> queryPageList(ClassRoom classRoom,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ClassRoom> queryWrapper = QueryGenerator.initQueryWrapper(classRoom, req.getParameterMap());
|
||||||
|
Page<ClassRoom> page = new Page<ClassRoom>(pageNo, pageSize);
|
||||||
|
IPage<ClassRoom> pageList = classRoomService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param classRoom
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "教室表-添加")
|
||||||
|
@ApiOperation(value="教室表-添加", notes="教室表-添加")
|
||||||
|
@RequiresPermissions("cet:class_room:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody ClassRoom classRoom) {
|
||||||
|
return classRoomService.add(classRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param classRoom
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "教室表-编辑")
|
||||||
|
@ApiOperation(value="教室表-编辑", notes="教室表-编辑")
|
||||||
|
@RequiresPermissions("cet:class_room:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody ClassRoom classRoom) {
|
||||||
|
classRoomService.updateById(classRoom);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "教室表-通过id删除")
|
||||||
|
@ApiOperation(value="教室表-通过id删除", notes="教室表-通过id删除")
|
||||||
|
@RequiresPermissions("cet:class_room:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
classRoomService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "教室表-批量删除")
|
||||||
|
@ApiOperation(value="教室表-批量删除", notes="教室表-批量删除")
|
||||||
|
@RequiresPermissions("cet:class_room:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.classRoomService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "教室表-通过id查询")
|
||||||
|
@ApiOperation(value="教室表-通过id查询", notes="教室表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<ClassRoom> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ClassRoom classRoom = classRoomService.getById(id);
|
||||||
|
if(classRoom==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(classRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param classRoom
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("cet:class_room:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ClassRoom classRoom) {
|
||||||
|
return super.exportXls(request, classRoom, ClassRoom.class, "教室表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("cet:class_room:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ClassRoom.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分组数据表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-12
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cet_group")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="cet_group对象", description="分组数据表")
|
||||||
|
public class CetGroup implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**分组名称*/
|
||||||
|
@Excel(name = "分组名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "分组名称")
|
||||||
|
private java.lang.String groupName;
|
||||||
|
/**教室ID*/
|
||||||
|
@Excel(name = "教室ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "教室ID")
|
||||||
|
private java.lang.String roomId;
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 教室表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("class_room")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="class_room对象", description="教室表")
|
||||||
|
public class ClassRoom implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**教学楼名,如“理工一”、“崇师楼”*/
|
||||||
|
@Excel(name = "教学楼名", width = 15)
|
||||||
|
@ApiModelProperty(value = "教学楼名,如“理工一”、“崇师楼”")
|
||||||
|
private java.lang.String building;
|
||||||
|
/**区域,如“A区”、“B区”,无则为空*/
|
||||||
|
@Excel(name = "区域", width = 15)
|
||||||
|
@ApiModelProperty(value = "区域,如“A区”、“B区”,无则为空")
|
||||||
|
private java.lang.String area;
|
||||||
|
/**楼层号,如 5楼、2楼 等*/
|
||||||
|
@Excel(name = "楼层号", width = 15)
|
||||||
|
@ApiModelProperty(value = "楼层号,如 5楼、2楼 等")
|
||||||
|
private java.lang.String floor;
|
||||||
|
/**房间编号,如“511教室”*/
|
||||||
|
@Excel(name = "教室”", width = 15)
|
||||||
|
@ApiModelProperty(value = "房间编号,如“511教室”")
|
||||||
|
private java.lang.String roomNumber;
|
||||||
|
/**完整名称,如“崇师楼B区511教室”*/
|
||||||
|
@Excel(name = "完整名称,如“崇师楼B区511教室”", width = 15)
|
||||||
|
@ApiModelProperty(value = "完整名称,如“崇师楼B区511教室”")
|
||||||
|
private java.lang.String fullName;
|
||||||
|
/** 备注*/
|
||||||
|
@Excel(name = " 备注", width = 15)
|
||||||
|
@ApiModelProperty(value = " 备注")
|
||||||
|
private java.lang.String remarks;
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.CetGroup;
|
||||||
|
/**
|
||||||
|
* @Description: 分组数据表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-12
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface CetGroupMapper extends BaseMapper<CetGroup> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.ClassRoom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 教室表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ClassRoomMapper extends BaseMapper<ClassRoom> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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="org.jeecg.modules.demo.cet.mapper.CetGroupMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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="org.jeecg.modules.demo.cet.mapper.ClassRoomMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.entity.CetGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分组数据表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-12
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ICetGroupService extends IService<CetGroup> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.modules.entity.ClassRoom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 教室表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IClassRoomService extends IService<ClassRoom> {
|
||||||
|
|
||||||
|
Result<String> add(ClassRoom classRoom);
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jeecg.modules.entity.CetGroup;
|
||||||
|
import org.jeecg.modules.mapper.CetGroupMapper;
|
||||||
|
import org.jeecg.modules.service.ICetGroupService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分组数据表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-12
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CetGroupServiceImpl extends ServiceImpl<CetGroupMapper, CetGroup> implements ICetGroupService {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
import org.jeecg.modules.entity.ClassRoom;
|
||||||
|
import org.jeecg.modules.mapper.ClassRoomMapper;
|
||||||
|
import org.jeecg.modules.service.IClassRoomService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 教室表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ClassRoomServiceImpl extends ServiceImpl<ClassRoomMapper, ClassRoom> implements IClassRoomService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<String> add(ClassRoom classRoom) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
//完善
|
||||||
|
classRoom.setCreateTime(new Date());
|
||||||
|
classRoom.setUpdateTime(new Date());
|
||||||
|
classRoom.setUpdateBy(sysUser.getUsername());
|
||||||
|
classRoom.setCreateBy(sysUser.getUsername());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue