diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java new file mode 100644 index 00000000..a5e19717 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.ktgl.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +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.common.util.oConvertUtils; +import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; +import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService; + +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.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +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.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +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-30 + * @Version: V1.0 + */ +@Api(tags="课程管理") +@RestController +@RequestMapping("/ktgl/kcKechengbiao") +@Slf4j +public class KcKechengbiaoController extends JeecgController { + @Autowired + private IKcKechengbiaoService kcKechengbiaoService; + + /** + * 分页列表查询 + * + * @param kcKechengbiao + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "课程管理-分页列表查询") + @ApiOperation(value="课程管理-分页列表查询", notes="课程管理-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(KcKechengbiao kcKechengbiao, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(kcKechengbiao, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = kcKechengbiaoService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param kcKechengbiao + * @return + */ + @AutoLog(value = "课程管理-添加") + @ApiOperation(value="课程管理-添加", notes="课程管理-添加") + @RequiresPermissions("ktgl:kc_kechengbiao:add") + @PostMapping(value = "/add") + public Result add(@RequestBody KcKechengbiao kcKechengbiao) { + kcKechengbiaoService.save(kcKechengbiao); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param kcKechengbiao + * @return + */ + @AutoLog(value = "课程管理-编辑") + @ApiOperation(value="课程管理-编辑", notes="课程管理-编辑") + @RequiresPermissions("ktgl:kc_kechengbiao:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcKechengbiao kcKechengbiao) { + kcKechengbiaoService.updateById(kcKechengbiao); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "课程管理-通过id删除") + @ApiOperation(value="课程管理-通过id删除", notes="课程管理-通过id删除") + @RequiresPermissions("ktgl:kc_kechengbiao:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcKechengbiaoService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "课程管理-批量删除") + @ApiOperation(value="课程管理-批量删除", notes="课程管理-批量删除") + @RequiresPermissions("ktgl:kc_kechengbiao:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.kcKechengbiaoService.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 queryById(@RequestParam(name="id",required=true) String id) { + KcKechengbiao kcKechengbiao = kcKechengbiaoService.getById(id); + if(kcKechengbiao==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(kcKechengbiao); + } + + /** + * 导出excel + * + * @param request + * @param kcKechengbiao + */ + @RequiresPermissions("ktgl:kc_kechengbiao:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, KcKechengbiao kcKechengbiao) { + return super.exportXls(request, kcKechengbiao, KcKechengbiao.class, "课程管理"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("ktgl:kc_kechengbiao:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, KcKechengbiao.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java new file mode 100644 index 00000000..edc7f84b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java @@ -0,0 +1,230 @@ +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-30 + * @Version: V1.0 + */ +@Data +@TableName("kc_kechengbiao") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="kc_kechengbiao对象", description="课程管理") +public class KcKechengbiao implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + 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 skjs; + /**职称*/ + @Excel(name = "职称", width = 15) + @ApiModelProperty(value = "职称") + private java.lang.String zc; + /**学科人数*/ + @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) + @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) + @ApiModelProperty(value = "节次") + private java.lang.String hh; + /**星期几*/ + @Excel(name = "星期几", width = 15) + @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) + @ApiModelProperty(value = "直播方式") + private java.lang.String zbfs; + /**会议号*/ + @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.String kkdwid; + /**未知*/ + @Excel(name = "未知", width = 15) + @ApiModelProperty(value = "未知") + private java.lang.String jrfs; + /**二维码文件*/ + @Excel(name = "二维码文件", width = 15) + @ApiModelProperty(value = "二维码文件") + private java.lang.String ewmwj; + /**群名称*/ + @Excel(name = "群名称", width = 15) + @ApiModelProperty(value = "群名称") + private java.lang.String qmc; + /**群类型*/ + @Excel(name = "群类型", width = 15) + @ApiModelProperty(value = "群类型") + private java.lang.String qlx; + /**类型*/ + @Excel(name = "类型", width = 15) + @ApiModelProperty(value = "类型") + private java.lang.String leixing; + /**是否需要群主验证*/ + @Excel(name = "是否需要群主验证", width = 15) + @ApiModelProperty(value = "是否需要群主验证") + private java.lang.String isqzyz; + /**教课周次1*/ + @Excel(name = "教课周次1", width = 15) + @ApiModelProperty(value = "教课周次1") + private java.lang.String jkzc1; + /**学分*/ + @Excel(name = "学分", width = 15) + @ApiModelProperty(value = "学分") + private java.lang.String xf; + /**校区*/ + @Excel(name = "校区", width = 15) + @ApiModelProperty(value = "校区") + private java.lang.String xq; + /**教工号*/ + @Excel(name = "教工号", width = 15) + @ApiModelProperty(value = "教工号") + private java.lang.String jgh; + /**学年学期*/ + @Excel(name = "学年学期", width = 15) + @ApiModelProperty(value = "学年学期") + private java.lang.String xnxq; + /**教职工类别*/ + @Excel(name = "教职工类别", width = 15) + @ApiModelProperty(value = "教职工类别") + private java.lang.String jzglb; + /**是否出镜,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.String sfzc; + /**备注*/ + @Excel(name = "备注", width = 15) + @ApiModelProperty(value = "备注") + private java.lang.String bz; + /**状态*/ + @Excel(name = "状态", width = 15) + @ApiModelProperty(value = "状态") + private java.lang.String zt; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/KcKechengbiaoMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/KcKechengbiaoMapper.java new file mode 100644 index 00000000..f29c2274 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/KcKechengbiaoMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.ktgl.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 课程管理 + * @Author: jeecg-boot + * @Date: 2023-03-30 + * @Version: V1.0 + */ +public interface KcKechengbiaoMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml new file mode 100644 index 00000000..dde2c9c2 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/service/IKcKechengbiaoService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/service/IKcKechengbiaoService.java new file mode 100644 index 00000000..ebbedccb --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/service/IKcKechengbiaoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.ktgl.service; + +import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 课程管理 + * @Author: jeecg-boot + * @Date: 2023-03-30 + * @Version: V1.0 + */ +public interface IKcKechengbiaoService extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/service/impl/KcKechengbiaoServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/service/impl/KcKechengbiaoServiceImpl.java new file mode 100644 index 00000000..b6e7d459 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/service/impl/KcKechengbiaoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.kc.ktgl.service.impl; + +import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; +import org.jeecg.modules.kc.ktgl.mapper.KcKechengbiaoMapper; +import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 课程管理 + * @Author: jeecg-boot + * @Date: 2023-03-30 + * @Version: V1.0 + */ +@Service +public class KcKechengbiaoServiceImpl extends ServiceImpl implements IKcKechengbiaoService { + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi index 344c89fc..b5272c92 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi @@ -5,13 +5,6 @@ import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ - { - title: '行号', - align: "center", - dataIndex: '$no', - width: '50px', - customRender: (r) => r.index + 1 - }, <#list columns as po> <#if po.isShowList =='Y' && po.fieldName !='id'> {