2023年3月29日 添加课堂管理
This commit is contained in:
parent
89b1d9171f
commit
17f863122c
|
@ -0,0 +1,163 @@
|
|||
package org.jeecg.modules.kc.ktgl.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 org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
|
||||
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.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: 2023-03-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课堂")
|
||||
@RestController
|
||||
@RequestMapping("/ktgl/kcKetangbiao")
|
||||
@Slf4j
|
||||
public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKetangbiaoService> {
|
||||
@Autowired
|
||||
private IKcKetangbiaoService kcKetangbiaoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课堂-分页列表查询")
|
||||
@ApiOperation(value="课堂-分页列表查询", notes="课堂-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcKetangbiao>> queryPageList(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKetangbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKetangbiao, req.getParameterMap());
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂-添加")
|
||||
@ApiOperation(value="课堂-添加", notes="课堂-添加")
|
||||
@RequiresPermissions("ktgl:kc_ketangbiao:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcKetangbiao kcKetangbiao) {
|
||||
kcKetangbiaoService.save(kcKetangbiao);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂-编辑")
|
||||
@ApiOperation(value="课堂-编辑", notes="课堂-编辑")
|
||||
@RequiresPermissions("ktgl:kc_ketangbiao:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcKetangbiao kcKetangbiao) {
|
||||
kcKetangbiaoService.updateById(kcKetangbiao);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂-通过id删除")
|
||||
@ApiOperation(value="课堂-通过id删除", notes="课堂-通过id删除")
|
||||
@RequiresPermissions("ktgl:kc_ketangbiao:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcKetangbiaoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂-批量删除")
|
||||
@ApiOperation(value="课堂-批量删除", notes="课堂-批量删除")
|
||||
@RequiresPermissions("ktgl:kc_ketangbiao:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcKetangbiaoService.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<KcKetangbiao> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcKetangbiao kcKetangbiao = kcKetangbiaoService.getById(id);
|
||||
if(kcKetangbiao==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcKetangbiao);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcKetangbiao
|
||||
*/
|
||||
@RequiresPermissions("ktgl:kc_ketangbiao:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcKetangbiao kcKetangbiao) {
|
||||
return super.exportXls(request, kcKetangbiao, KcKetangbiao.class, "课堂");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("ktgl:kc_ketangbiao:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcKetangbiao.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,243 @@
|
|||
package org.jeecg.modules.kc.ktgl.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 课堂
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-03-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_ketangbiao")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_ketangbiao对象", description="课堂")
|
||||
public class KcKetangbiao implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人登录名称*/
|
||||
@ApiModelProperty(value = "创建人登录名称")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人登录名称*/
|
||||
@ApiModelProperty(value = "更新人登录名称")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**课程编号*/
|
||||
@Excel(name = "课程编号", width = 15)
|
||||
@ApiModelProperty(value = "课程编号")
|
||||
private java.lang.String kcbh;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**学分*/
|
||||
@Excel(name = "学分", width = 15)
|
||||
@ApiModelProperty(value = "学分")
|
||||
private java.lang.String xf;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**职称*/
|
||||
@Excel(name = "职称", width = 15)
|
||||
@ApiModelProperty(value = "职称")
|
||||
private java.lang.String zc;
|
||||
/**教职工类别*/
|
||||
@Excel(name = "教职工类别", width = 15)
|
||||
@ApiModelProperty(value = "教职工类别")
|
||||
private java.lang.String jzglb;
|
||||
/**选课人数*/
|
||||
@Excel(name = "选课人数", width = 15)
|
||||
@ApiModelProperty(value = "选课人数")
|
||||
private java.lang.String xkrs;
|
||||
/**评课人数*/
|
||||
@Excel(name = "评课人数", width = 15)
|
||||
@ApiModelProperty(value = "评课人数")
|
||||
private java.lang.String pkrs;
|
||||
/**任务编号*/
|
||||
@Excel(name = "任务编号", width = 15)
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
private java.lang.String rwbh;
|
||||
/**开课单位*/
|
||||
@Excel(name = "开课单位", width = 15)
|
||||
@ApiModelProperty(value = "开课单位")
|
||||
private java.lang.String kkdw;
|
||||
/**课程性质*/
|
||||
@Excel(name = "课程性质", width = 15, dicCode = "kcxz")
|
||||
@Dict(dicCode = "kcxz")
|
||||
@ApiModelProperty(value = "课程性质")
|
||||
private java.lang.String kcxz;
|
||||
/**上课地点*/
|
||||
@Excel(name = "上课地点", width = 15)
|
||||
@ApiModelProperty(value = "上课地点")
|
||||
private java.lang.String skdd;
|
||||
/**上课时间*/
|
||||
@Excel(name = "上课时间", width = 15)
|
||||
@ApiModelProperty(value = "上课时间")
|
||||
private java.lang.String sksj;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.String jkzc;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15, dicCode = "skjc")
|
||||
@Dict(dicCode = "skjc")
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String hh;
|
||||
/**周几*/
|
||||
@Excel(name = "周几", width = 15, dicCode = "week")
|
||||
@Dict(dicCode = "week")
|
||||
@ApiModelProperty(value = "周几")
|
||||
private java.lang.String week;
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.lang.String hhks;
|
||||
/**结束时间*/
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.lang.String hhjs;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.String dsz;
|
||||
/**课堂开始日期*/
|
||||
@Excel(name = "课堂开始日期", width = 15)
|
||||
@ApiModelProperty(value = "课堂开始日期")
|
||||
private java.lang.String wwks;
|
||||
/**课堂结束日期*/
|
||||
@Excel(name = "课堂结束日期", width = 15)
|
||||
@ApiModelProperty(value = "课堂结束日期")
|
||||
private java.lang.String wwjs;
|
||||
/**直播方式*/
|
||||
@Excel(name = "直播方式", width = 15, dicCode = "skpt")
|
||||
@Dict(dicCode = "skpt")
|
||||
@ApiModelProperty(value = "直播方式")
|
||||
private java.lang.String zbfs;
|
||||
/**会议id*/
|
||||
@Excel(name = "会议id", width = 15)
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private java.lang.String hyid;
|
||||
/**会议号*/
|
||||
@Excel(name = "会议号", width = 15)
|
||||
@ApiModelProperty(value = "会议号")
|
||||
private java.lang.String hyh;
|
||||
/**会议密码*/
|
||||
@Excel(name = "会议密码", width = 15)
|
||||
@ApiModelProperty(value = "会议密码")
|
||||
private java.lang.String hymm;
|
||||
/**课程链接*/
|
||||
@Excel(name = "课程链接", width = 15)
|
||||
@ApiModelProperty(value = "课程链接")
|
||||
private java.lang.String kclj;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String beizhu;
|
||||
/**直播平台*/
|
||||
@Excel(name = "直播平台", width = 15)
|
||||
@ApiModelProperty(value = "直播平台")
|
||||
private java.lang.String zbpx;
|
||||
/**开课单位id*/
|
||||
@Excel(name = "开课单位id", width = 15)
|
||||
@ApiModelProperty(value = "开课单位id")
|
||||
private java.lang.Integer kkdwid;
|
||||
/**上课日期*/
|
||||
@Excel(name = "上课日期", width = 15)
|
||||
@ApiModelProperty(value = "上课日期")
|
||||
private java.lang.String skrq;
|
||||
/**课程表id*/
|
||||
@Excel(name = "课程表id", width = 15)
|
||||
@ApiModelProperty(value = "课程表id")
|
||||
private java.lang.Integer kechengbiaoid;
|
||||
/**听课次数*/
|
||||
@Excel(name = "听课次数", width = 15)
|
||||
@ApiModelProperty(value = "听课次数")
|
||||
private java.lang.Integer tingkecishu;
|
||||
/**开课周次*/
|
||||
@Excel(name = "开课周次", width = 15, dicCode = "skzc")
|
||||
@Dict(dicCode = "skzc")
|
||||
@ApiModelProperty(value = "开课周次")
|
||||
private java.lang.String kkzc;
|
||||
/**第几周*/
|
||||
@Excel(name = "第几周", width = 15)
|
||||
@ApiModelProperty(value = "第几周")
|
||||
private java.lang.Integer dijizhou;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.String jkzc1;
|
||||
/**是否停课*/
|
||||
@Excel(name = "是否停课", width = 15)
|
||||
@ApiModelProperty(value = "是否停课")
|
||||
private java.lang.Integer sftk;
|
||||
/**停课原因*/
|
||||
@Excel(name = "停课原因", width = 15)
|
||||
@ApiModelProperty(value = "停课原因")
|
||||
private java.lang.String tkyy;
|
||||
/**补课计划*/
|
||||
@Excel(name = "补课计划", width = 15)
|
||||
@ApiModelProperty(value = "补课计划")
|
||||
private java.lang.String bkjh;
|
||||
/**是否出镜,0-出镜,1-不出镜*/
|
||||
@Excel(name = "是否出镜,0-出镜,1-不出镜", width = 15)
|
||||
@ApiModelProperty(value = "是否出镜,0-出镜,1-不出镜")
|
||||
private java.lang.Integer sfcj;
|
||||
/**上课形式,0-线上,1-线下,2-线上线下混合*/
|
||||
@Excel(name = "上课形式,0-线上,1-线下,2-线上线下混合", width = 15)
|
||||
@ApiModelProperty(value = "上课形式,0-线上,1-线下,2-线上线下混合")
|
||||
private java.lang.Integer skxs;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.Integer kechengbiao1;
|
||||
/**是否新生课 0 = 是*/
|
||||
@Excel(name = "是否新生课 0 = 是", width = 15)
|
||||
@ApiModelProperty(value = "是否新生课 0 = 是")
|
||||
private java.lang.String sfxsk;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String bz;
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String zt;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.ktgl.mapper;
|
||||
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课堂
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-03-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
||||
|
||||
}
|
|
@ -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.kc.ktgl.mapper.KcKetangbiaoMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.ktgl.service;
|
||||
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课堂
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-03-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.ktgl.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.mapper.KcKetangbiaoMapper;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 课堂
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-03-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcKetangbiao> implements IKcKetangbiaoService {
|
||||
|
||||
}
|
Loading…
Reference in New Issue