添加新功能
This commit is contained in:
parent
ed8f6c44e9
commit
73fcaa2026
|
|
@ -89,6 +89,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/smsCheckCaptcha", "anon"); //短信次数发送太多验证码排除
|
||||
filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除
|
||||
filterChainDefinitionMap.put("/sys/qhlogin", "anon"); //登录接口排除
|
||||
filterChainDefinitionMap.put("/sys/mLogin", "anon"); //登录接口排除
|
||||
filterChainDefinitionMap.put("/sys/logout", "anon"); //登出接口排除
|
||||
filterChainDefinitionMap.put("/sys/thirdLogin/**", "anon"); //第三方登录
|
||||
|
|
|
|||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.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.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.service.IKcDetectionDetailedService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="人流识别")
|
||||
@RestController
|
||||
@RequestMapping("/kcDetectionDetailed/kcDetectionDetailed")
|
||||
@Slf4j
|
||||
public class KcDetectionDetailedController extends JeecgController<KcDetectionDetailed, IKcDetectionDetailedService> {
|
||||
@Autowired
|
||||
private IKcDetectionDetailedService kcDetectionDetailedService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcDetectionDetailed
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "人流识别-分页列表查询")
|
||||
@ApiOperation(value="人流识别-分页列表查询", notes="人流识别-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcDetectionDetailed>> queryPageList(KcDetectionDetailed kcDetectionDetailed,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcDetectionDetailed> queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionDetailed, req.getParameterMap());
|
||||
Page<KcDetectionDetailed> page = new Page<KcDetectionDetailed>(pageNo, pageSize);
|
||||
IPage<KcDetectionDetailed> pageList = kcDetectionDetailedService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcDetectionDetailed
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-添加")
|
||||
@ApiOperation(value="人流识别-添加", notes="人流识别-添加")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcDetectionDetailed kcDetectionDetailed) {
|
||||
kcDetectionDetailedService.save(kcDetectionDetailed);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcDetectionDetailed
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-编辑")
|
||||
@ApiOperation(value="人流识别-编辑", notes="人流识别-编辑")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcDetectionDetailed kcDetectionDetailed) {
|
||||
kcDetectionDetailedService.updateById(kcDetectionDetailed);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-通过id删除")
|
||||
@ApiOperation(value="人流识别-通过id删除", notes="人流识别-通过id删除")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcDetectionDetailedService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-批量删除")
|
||||
@ApiOperation(value="人流识别-批量删除", notes="人流识别-批量删除")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcDetectionDetailedService.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<KcDetectionDetailed> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcDetectionDetailed kcDetectionDetailed = kcDetectionDetailedService.getById(id);
|
||||
if(kcDetectionDetailed==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcDetectionDetailed);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcDetectionDetailed
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcDetectionDetailed kcDetectionDetailed) {
|
||||
return super.exportXls(request, kcDetectionDetailed, KcDetectionDetailed.class, "人流识别");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcDetectionDetailed.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_detection_detailed")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_detection_detailed对象", description="人流识别")
|
||||
public class KcDetectionDetailed implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建时间*/
|
||||
@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;
|
||||
/**更新时间*/
|
||||
@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;
|
||||
/**教室人数检测-主表ID[kc_detection_main.id]*/
|
||||
@Excel(name = "教室人数检测-主表ID[kc_detection_main.id]", width = 15)
|
||||
@ApiModelProperty(value = "教室人数检测-主表ID[kc_detection_main.id]")
|
||||
private java.lang.String pid;
|
||||
/**任务编号(课堂)*/
|
||||
@Excel(name = "任务编号(课堂)", width = 15)
|
||||
@ApiModelProperty(value = "任务编号(课堂)")
|
||||
private java.lang.String rwbh;
|
||||
/**课程编号*/
|
||||
@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 jsbh;
|
||||
/**学年学期内部用*/
|
||||
@Excel(name = "学年学期内部用", width = 15)
|
||||
@ApiModelProperty(value = "学年学期内部用")
|
||||
private java.lang.String xnxq;
|
||||
/**检测url*/
|
||||
@Excel(name = "检测url", width = 15)
|
||||
@ApiModelProperty(value = "检测url")
|
||||
private java.lang.String detectionUrl;
|
||||
/**截取图片结果URL*/
|
||||
@Excel(name = "截取图片结果URL", width = 15)
|
||||
@ApiModelProperty(value = "截取图片结果URL")
|
||||
private java.lang.String detectionOutImgUrl;
|
||||
/**截取图片计算人数返回结果*/
|
||||
@Excel(name = "截取图片计算人数返回结果", width = 15)
|
||||
@ApiModelProperty(value = "截取图片计算人数返回结果")
|
||||
private java.lang.String detectionOutImgRes;
|
||||
/**检测次数(当前是第几次)*/
|
||||
@Excel(name = "检测次数(当前是第几次)", width = 15)
|
||||
@ApiModelProperty(value = "检测次数(当前是第几次)")
|
||||
private java.lang.Integer detectionNum;
|
||||
/**当次检测人数*/
|
||||
@Excel(name = "当次检测人数", width = 15)
|
||||
@ApiModelProperty(value = "当次检测人数")
|
||||
private java.lang.Integer num;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcDetectionDetailedMapper extends BaseMapper<KcDetectionDetailed> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcDetectionDetailed.mapper.KcDetectionDetailedMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcDetectionDetailedService extends IService<KcDetectionDetailed> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.mapper.KcDetectionDetailedMapper;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.service.IKcDetectionDetailedService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetailedMapper, KcDetectionDetailed> implements IKcDetectionDetailedService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.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.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.service.IKcDetectionMainService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="人流识别")
|
||||
@RestController
|
||||
@RequestMapping("/kcDetectionMain/kcDetectionMain")
|
||||
@Slf4j
|
||||
public class KcDetectionMainController extends JeecgController<KcDetectionMain, IKcDetectionMainService> {
|
||||
@Autowired
|
||||
private IKcDetectionMainService kcDetectionMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcDetectionMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "人流识别-分页列表查询")
|
||||
@ApiOperation(value="人流识别-分页列表查询", notes="人流识别-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcDetectionMain>> queryPageList(KcDetectionMain kcDetectionMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcDetectionMain> queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionMain, req.getParameterMap());
|
||||
Page<KcDetectionMain> page = new Page<KcDetectionMain>(pageNo, pageSize);
|
||||
IPage<KcDetectionMain> pageList = kcDetectionMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcDetectionMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-添加")
|
||||
@ApiOperation(value="人流识别-添加", notes="人流识别-添加")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcDetectionMain kcDetectionMain) {
|
||||
kcDetectionMainService.save(kcDetectionMain);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcDetectionMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-编辑")
|
||||
@ApiOperation(value="人流识别-编辑", notes="人流识别-编辑")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcDetectionMain kcDetectionMain) {
|
||||
kcDetectionMainService.updateById(kcDetectionMain);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-通过id删除")
|
||||
@ApiOperation(value="人流识别-通过id删除", notes="人流识别-通过id删除")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcDetectionMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-批量删除")
|
||||
@ApiOperation(value="人流识别-批量删除", notes="人流识别-批量删除")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcDetectionMainService.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<KcDetectionMain> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcDetectionMain kcDetectionMain = kcDetectionMainService.getById(id);
|
||||
if(kcDetectionMain==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcDetectionMain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcDetectionMain
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcDetectionMain kcDetectionMain) {
|
||||
return super.exportXls(request, kcDetectionMain, KcDetectionMain.class, "人流识别");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcDetectionMain.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_detection_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_detection_main对象", description="人流识别")
|
||||
public class KcDetectionMain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建时间*/
|
||||
@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;
|
||||
/**更新时间*/
|
||||
@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;
|
||||
/**任务编号(课堂)*/
|
||||
@Excel(name = "任务编号(课堂)", width = 15)
|
||||
@ApiModelProperty(value = "任务编号(课堂)")
|
||||
private java.lang.String rwbh;
|
||||
/**课程编号*/
|
||||
@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 jsbh;
|
||||
/**学年学期内部用*/
|
||||
@Excel(name = "学年学期内部用", width = 15)
|
||||
@ApiModelProperty(value = "学年学期内部用")
|
||||
private java.lang.String xnxq;
|
||||
/**检测url*/
|
||||
@Excel(name = "检测url", width = 15)
|
||||
@ApiModelProperty(value = "检测url")
|
||||
private java.lang.String detectionUrl;
|
||||
/**检测次数*/
|
||||
@Excel(name = "检测次数", width = 15)
|
||||
@ApiModelProperty(value = "检测次数")
|
||||
private java.lang.Integer detectionNum;
|
||||
/**人数(累加)*/
|
||||
@Excel(name = "人数(累加)", width = 15)
|
||||
@ApiModelProperty(value = "人数(累加)")
|
||||
private java.lang.Integer allNum;
|
||||
/**平均数*/
|
||||
@Excel(name = "平均数", width = 15)
|
||||
@ApiModelProperty(value = "平均数")
|
||||
private java.lang.Integer averageNum;
|
||||
/**课堂信息*/
|
||||
@Excel(name = "课堂信息", width = 15)
|
||||
@ApiModelProperty(value = "课堂信息")
|
||||
private java.lang.String ketangbiaoInfo;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcDetectionMainMapper extends BaseMapper<KcDetectionMain> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcDetectionMain.mapper.KcDetectionMainMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcDetectionMainService extends IService<KcDetectionMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.mapper.KcDetectionMainMapper;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.service.IKcDetectionMainService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcDetectionMainServiceImpl extends ServiceImpl<KcDetectionMainMapper, KcDetectionMain> implements IKcDetectionMainService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
package org.jeecg.modules.demo.kcJieci.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.demo.kcJieci.entity.KcJieci;
|
||||
import org.jeecg.modules.demo.kcJieci.service.IKcJieciService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="上课节次")
|
||||
@RestController
|
||||
@RequestMapping("/kcJieci/kcJieci")
|
||||
@Slf4j
|
||||
public class KcJieciController extends JeecgController<KcJieci, IKcJieciService> {
|
||||
@Autowired
|
||||
private IKcJieciService kcJieciService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcJieci
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "上课节次-分页列表查询")
|
||||
@ApiOperation(value="上课节次-分页列表查询", notes="上课节次-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcJieci>> queryPageList(KcJieci kcJieci,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcJieci> queryWrapper = QueryGenerator.initQueryWrapper(kcJieci, req.getParameterMap());
|
||||
Page<KcJieci> page = new Page<KcJieci>(pageNo, pageSize);
|
||||
IPage<KcJieci> pageList = kcJieciService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcJieci
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-添加")
|
||||
@ApiOperation(value="上课节次-添加", notes="上课节次-添加")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcJieci kcJieci) {
|
||||
kcJieciService.save(kcJieci);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcJieci
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-编辑")
|
||||
@ApiOperation(value="上课节次-编辑", notes="上课节次-编辑")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcJieci kcJieci) {
|
||||
kcJieciService.updateById(kcJieci);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-通过id删除")
|
||||
@ApiOperation(value="上课节次-通过id删除", notes="上课节次-通过id删除")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcJieciService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-批量删除")
|
||||
@ApiOperation(value="上课节次-批量删除", notes="上课节次-批量删除")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcJieciService.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<KcJieci> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcJieci kcJieci = kcJieciService.getById(id);
|
||||
if(kcJieci==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcJieci);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcJieci
|
||||
*/
|
||||
@RequiresPermissions("kcJieci:kc_jieci:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcJieci kcJieci) {
|
||||
return super.exportXls(request, kcJieci, KcJieci.class, "上课节次");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcJieci:kc_jieci:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcJieci.class);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="kc_jieci-首页获取节次信息", notes="kc_jieci-首页获取节次信息")
|
||||
@GetMapping(value = "/getIndexJcList")
|
||||
public Result<List<KcJieci>> getIndexJcList(KcJieci kcJieci) {
|
||||
List<KcJieci> pageList = kcJieciService.getIndexJcList(kcJieci);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="可线上听课课堂-提前半小时", notes="可线上听课课堂-提前半小时")
|
||||
@GetMapping(value = "/getIndexJcXskcList")
|
||||
public Result<List<KcJieci>> getIndexJcXskcList(KcJieci kcJieci) {
|
||||
List<KcJieci> pageList = kcJieciService.getIndexJcXskcList(kcJieci);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package org.jeecg.modules.demo.kcJieci.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_jieci")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_jieci对象", description="上课节次")
|
||||
public class KcJieci implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Integer id;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15)
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String jieci;
|
||||
/**节次开始时间*/
|
||||
@Excel(name = "节次开始时间", width = 15)
|
||||
@ApiModelProperty(value = "节次开始时间")
|
||||
private java.lang.String hhks;
|
||||
/**节次结束时间*/
|
||||
@Excel(name = "节次结束时间", width = 15)
|
||||
@ApiModelProperty(value = "节次结束时间")
|
||||
private java.lang.String hhjs;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kssj;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
@TableField(exist = false)
|
||||
private String sjsksj;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.kcJieci.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcJieci.entity.KcJieci;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcJieciMapper extends BaseMapper<KcJieci> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcJieci.mapper.KcJieciMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.demo.kcJieci.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcJieci.entity.KcJieci;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcJieciService extends IService<KcJieci> {
|
||||
|
||||
List<KcJieci> getIndexJcList(KcJieci kcJieci);
|
||||
|
||||
List<KcJieci> getIndexJcXskcList(KcJieci kcJieci);
|
||||
}
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
package org.jeecg.modules.demo.kcJieci.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.demo.kcJieci.entity.KcJieci;
|
||||
import org.jeecg.modules.demo.kcJieci.mapper.KcJieciMapper;
|
||||
import org.jeecg.modules.demo.kcJieci.service.IKcJieciService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcJieciServiceImpl extends ServiceImpl<KcJieciMapper, KcJieci> implements IKcJieciService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<KcJieci> getIndexJcList(KcJieci kcJieci) {
|
||||
QueryWrapper<KcJieci> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("LENGTH(jieci)>2");
|
||||
queryWrapper.orderByAsc("id");
|
||||
List<KcJieci> list = baseMapper.selectList(queryWrapper);
|
||||
List<KcJieci> resList = new ArrayList<>();
|
||||
String dqsj = DateUtils.getDate("HHmm");//获取当前时间的小时和分钟
|
||||
String sjkssj = "";//实际开始时间 用于判断正在上课和即将上课的文字切换
|
||||
String minDate = list.get(0).getHhks();//最小开始时间
|
||||
String maxDate = list.get(5).getHhjs();//最大结束时间
|
||||
String dqkssj = DateUtils.getDate("yyyy-MM-dd");//当前开始时间
|
||||
String dqjc = "";//当前节次
|
||||
String xyjkssj = "";//当前开始时间
|
||||
String xyjjc = "";//当前节次
|
||||
Calendar calendarMin = Calendar.getInstance();
|
||||
calendarMin.setTime(DateUtil.parse(dqkssj+" "+minDate.substring(0,2)+":"+minDate.substring(2,4)+":00","yyyy-MM-dd HH:mm:ss"));
|
||||
//从当前日期减去30分钟
|
||||
calendarMin.add(Calendar.MINUTE, -30);
|
||||
minDate = DateUtil.format(calendarMin.getTime(),"HHmm") ;
|
||||
|
||||
if(Integer.parseInt(dqsj)<Integer.parseInt(minDate)){
|
||||
//如果当前时间小于第一节开始时间则当前时间赋值为昨天,节次为最后一节
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = "";
|
||||
//下一节赋值为当天第一节
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
if(Integer.parseInt(dqsj)>Integer.parseInt(maxDate)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = "";
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
for(int i=0;i<list.size();i++){
|
||||
String kssj = "";
|
||||
String jssj = "";
|
||||
|
||||
kssj = list.get(i).getHhks();
|
||||
jssj = list.get(i).getHhjs();
|
||||
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.setTime(DateUtil.parse(dqkssj+" "+kssj.substring(0,2)+":"+kssj.substring(2,4)+":00","yyyy-MM-dd HH:mm:ss"));
|
||||
//从当前日期减去15分钟
|
||||
calendar2.add(Calendar.MINUTE, -30);
|
||||
kssj = DateUtil.format(calendar2.getTime(),"HHmm") ;
|
||||
sjkssj = list.get(i).getHhks();
|
||||
//
|
||||
// if(i==list.size()-1){
|
||||
// kssj = list.get(i).getHhks();
|
||||
// jssj = list.get(i).getHhjs();
|
||||
// }else{
|
||||
// kssj = list.get(i).getHhks();
|
||||
// jssj = list.get(i+1).getHhks();
|
||||
// }
|
||||
if(Integer.parseInt(dqsj)>=Integer.parseInt(kssj)&&Integer.parseInt(dqsj)<Integer.parseInt(jssj)){
|
||||
dqjc = list.get(i).getJieci();
|
||||
if(i==list.size()-1){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqjc = list.get(i).getJieci();
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(i+1).getJieci();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(Integer.parseInt(dqsj)>=1130&&Integer.parseInt(dqsj)<=1300){
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = "05、06";
|
||||
}
|
||||
if(Integer.parseInt(dqsj)>=1645&&Integer.parseInt(dqsj)<=1730){
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = "09、10";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
KcJieci kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(dqkssj);
|
||||
kcJieciRes.setJieci(dqjc);
|
||||
kcJieciRes.setType("1");
|
||||
if(StringUtils.isNotBlank(sjkssj)){
|
||||
kcJieciRes.setSjsksj(dqkssj+" "+sjkssj.substring(0,2)+":"+sjkssj.substring(2,4)+":00");
|
||||
}
|
||||
resList.add(kcJieciRes);
|
||||
kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(xyjkssj);
|
||||
kcJieciRes.setJieci(xyjjc);
|
||||
kcJieciRes.setType("2");
|
||||
resList.add(kcJieciRes);
|
||||
return resList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcJieci> getIndexJcXskcList(KcJieci kcJieci) {
|
||||
QueryWrapper<KcJieci> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("LENGTH(jieci)>2");
|
||||
queryWrapper.orderByAsc("id");
|
||||
List<KcJieci> list = baseMapper.selectList(queryWrapper);
|
||||
List<KcJieci> resList = new ArrayList<>();
|
||||
String dqsj = DateUtils.getDate("HHmm");//获取当前时间的小时和分钟
|
||||
String minDate = list.get(0).getHhks();//最小开始时间
|
||||
String maxDate = list.get(5).getHhjs();//最大结束时间
|
||||
String dqkssj = "";//当前开始时间
|
||||
String dqjc = "";//当前节次
|
||||
String xyjkssj = "";//当前开始时间
|
||||
String xyjjc = "";//当前节次
|
||||
if(Integer.parseInt(dqsj)<Integer.parseInt(minDate)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间小于第一节开始时间则当前时间赋值为昨天,节次为最后一节
|
||||
dqkssj = simpleDateFormat.format(calendar.getTime());
|
||||
dqjc = "";
|
||||
//下一节赋值为当天第一节
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
if(Integer.parseInt(dqsj)>Integer.parseInt(maxDate)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = "";
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
for(int i=0;i<list.size();i++){
|
||||
String kssj = "";
|
||||
String jssj = "";
|
||||
kssj = list.get(i).getHhks();
|
||||
jssj = list.get(i).getHhjs();
|
||||
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.setTime(DateUtil.parse(dqkssj+" "+kssj.substring(0,2)+":"+kssj.substring(2,4)+":00","yyyy-MM-dd HH:mm:ss"));
|
||||
//从当前日期减去15分钟
|
||||
calendar2.add(Calendar.MINUTE, -15);
|
||||
kssj = DateUtil.format(calendar2.getTime(),"HHmm") ;
|
||||
|
||||
// if(i==0){
|
||||
// kssj = list.get(i).getHhks();
|
||||
// jssj = list.get(i).getHhjs();
|
||||
// }else{
|
||||
// kssj = list.get(i-1).getHhjs();
|
||||
// jssj = list.get(i).getHhjs();
|
||||
// }
|
||||
if(Integer.parseInt(dqsj)>=Integer.parseInt(kssj)&&Integer.parseInt(dqsj)<Integer.parseInt(jssj)){
|
||||
|
||||
dqjc = list.get(i).getJieci();
|
||||
if(i==list.size()-1){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = list.get(i).getJieci();
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(i+1).getJieci();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
KcJieci kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(dqkssj);
|
||||
kcJieciRes.setJieci(dqjc);
|
||||
kcJieciRes.setType("1");
|
||||
resList.add(kcJieciRes);
|
||||
kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(xyjkssj);
|
||||
kcJieciRes.setJieci(xyjjc);
|
||||
kcJieciRes.setType("2");
|
||||
resList.add(kcJieciRes);
|
||||
return resList;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.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.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.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.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课堂表")
|
||||
@RestController
|
||||
@RequestMapping("/kcKetangbiao/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);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="课堂表-分页列表查询", notes="课堂表-分页列表查询")
|
||||
@GetMapping(value = "/getKclblist")
|
||||
public Result<IPage<KcKetangbiao>> getKclblist(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getKclblist(page, kcKetangbiao);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂表-添加")
|
||||
@ApiOperation(value="课堂表-添加", notes="课堂表-添加")
|
||||
@RequiresPermissions("kcKetangbiao: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("kcKetangbiao: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("kcKetangbiao: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("kcKetangbiao: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("kcKetangbiao: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("kcKetangbiao:kc_ketangbiao:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcKetangbiao.class);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="课堂管理-子表-通过id查询", notes="课堂管理-子表-通过id查询")
|
||||
@GetMapping(value = "/queryAllDataById")
|
||||
public Result<KcKetangbiao> queryAllDataById(@RequestParam(name="id",required=true) String id) {
|
||||
KcKetangbiao kcKetangbiao = kcKetangbiaoService.queryAllDataById(id);
|
||||
return Result.OK(kcKetangbiao);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,354 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
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: 2024-09-02
|
||||
* @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 = "创建日期")
|
||||
@TableField(exist = false)
|
||||
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, dicCode = "tkrszdw_view,college,college")
|
||||
// @Dict(dicCode = "tkrszdw_view,college,college")
|
||||
@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)
|
||||
private String jsbh;
|
||||
/**上课地点*/
|
||||
@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 = "是否停课")
|
||||
@Dict(dicCode = "sftk_kc")
|
||||
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-线上线下混合")
|
||||
@Dict(dicCode = "sftk_kc")
|
||||
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:未删除,1:已删除)*/
|
||||
@Excel(name = "是否删除(0:未删除,1:已删除)", width = 15)
|
||||
@ApiModelProperty(value = "是否删除(0:未删除,1:已删除)")
|
||||
private java.lang.Integer isDelete;
|
||||
private java.lang.String xnxq;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String jssj;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywmc;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywTime;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywskxs;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String sfyy;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String userid;
|
||||
@TableField(exist = false)
|
||||
private java.lang.Integer isdeleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String startTime;
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
@TableField(exist = false)
|
||||
private String xh;
|
||||
@TableField(exist = false)
|
||||
private String xjkssj;
|
||||
@TableField(exist = false)
|
||||
private String stars;
|
||||
@TableField(exist = false)
|
||||
private String ts;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String zhjsId;
|
||||
@TableField(exist = false)
|
||||
private String sfyzhjs;
|
||||
@TableField(exist = false)
|
||||
private String jzwh;
|
||||
@TableField(exist = false)
|
||||
private String szkc;
|
||||
|
||||
@TableField(exist = false)
|
||||
private boolean searchByNowXqxn;
|
||||
@TableField(exist = false)
|
||||
private String score;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String jspjPjf;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String xspjPjf;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sbType;
|
||||
@TableField(exist = false)
|
||||
private String title;
|
||||
@TableField(exist = false)
|
||||
private String notes;
|
||||
@TableField(exist = false)
|
||||
private String sftkb;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String tksy;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String num;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String zhjs;
|
||||
@TableField(exist = false)
|
||||
private String bmdId;
|
||||
@TableField(exist = false)
|
||||
private String a1;
|
||||
@TableField(exist = false)
|
||||
private String a2;
|
||||
@TableField(exist = false)
|
||||
private String a3;
|
||||
@TableField(exist = false)
|
||||
private String a4;
|
||||
@TableField(exist = false)
|
||||
private String a5;
|
||||
@TableField(exist = false)
|
||||
private String a6;
|
||||
@TableField(exist = false)
|
||||
private String a7;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String flag;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private KcDetectionMain detectionMain;
|
||||
@TableField(exist = false)
|
||||
private KcDetectionDetailed kcDetectionDetailed;
|
||||
@TableField(exist = false)
|
||||
private List<KcDetectionDetailed> zqrsList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课堂表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
||||
|
||||
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?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.kcKetangbiao.mapper.KcKetangbiaoMapper">
|
||||
|
||||
<select id="getKclblist" parameterType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao" resultType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao">
|
||||
select ktb.*,if(yy.id is null,0,1) as sfyy,yy.isdeleted, case when js.jsbh is NULL then 0 else 1 end sfyzhjs,
|
||||
if(jc.hhks is null,'00:00:00',concat(substr(jc.hhks,1,2),':',substr(jc.hhks,3,4),':00')) as xjkssj,
|
||||
if(jc.hhjs is null,'00:00:00',concat(substr(jc.hhjs,1,2),':',substr(jc.hhjs,3,4),':00')) as jssj,
|
||||
kcb.szkc,IF(tkxx.kcmc is null,'0','1') as sftkb,tkxx.tksy
|
||||
from kc_ketangbiao ktb
|
||||
left join (select * from kc_yuyue where userid = #{kcKetangbiao.userid}) yy on ktb.kcmc = yy.kcmc and ktb.skjs = yy.skjs and ktb.rwbh = yy.rwbh and ktb.xnxq and yy.xqxn
|
||||
LEFT JOIN (SELECT DISTINCT jsbh, jsmc from kc_zhihuijiaoshi where sfyx=0) js on ktb.jsbh = js.jsbh
|
||||
left join xxhbjsjbxx jsjbxx on jsjbxx.jsmc = ktb.skdd
|
||||
left join xxhbjxljbxx jxljbxx on jsjbxx.jxlh = jxljbxx.jzwh
|
||||
left join kc_jieci jc on ktb.hh = jc.jieci
|
||||
left join kc_kechengbiao kcb on kcb.kcmc = ktb.kcmc and kcb.kcxz = ktb.kcxz and kcb.skjs = ktb.skjs and kcb.skdd=ktb.skdd and kcb.kkdw = ktb.kkdw and kcb.kcbh = ktb.kcbh and kcb.id = ktb.kechengbiaoid
|
||||
left join (select distinct tkxx.xm,tkxx.kcmc,concat(substring(tkxx.skrq,1,4),'-',substring(tkxx.skrq,5,2),'-',substring(tkxx.skrq,7,2)) as skrq,tkxx.skjs,tkxx.tksy from xxhbtkxx tkxx where tkxx.tklx != '3' and tkxx.skrq is not null) tkxx
|
||||
on ktb.kcmc =tkxx.kcmc and ktb.skrq = tkxx.skrq and ktb.skdd=tkxx.skjs and ktb.skjs = tkxx.xm
|
||||
left join kc_kkdw kkdw on ktb.kkdw = kkdw.kkdw
|
||||
<where>
|
||||
and ktb.is_delete = 0
|
||||
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
|
||||
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )
|
||||
</if>
|
||||
<if test="kcKetangbiao.skxs!=null and kcKetangbiao.skxs!=''">
|
||||
and ktb.skxs = #{kcKetangbiao.skxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skrq!=null and kcKetangbiao.skrq!=''">
|
||||
and ktb.skrq = #{kcKetangbiao.skrq}
|
||||
</if>
|
||||
<if test="kcKetangbiao.hh!=null and kcKetangbiao.hh!=''">
|
||||
and ktb.hh in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.hh.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<if test="kcKetangbiao.zbpx!=null and kcKetangbiao.zbpx!=''">
|
||||
and ktb.zbpx = #{kcKetangbiao.zbpx}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.kcxz!=null and kcKetangbiao.kcxz!=''">
|
||||
and ktb.kcxz = #{kcKetangbiao.kcxz}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skdd!=null and kcKetangbiao.skdd!=''">
|
||||
and ktb.skdd like concat('%',#{kcKetangbiao.skdd},'%')
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<if test="kcKetangbiao.sfyzhjs!=null and kcKetangbiao.sfyzhjs!=''">
|
||||
and js.jsbh is not NULL
|
||||
</if>
|
||||
<if test='kcKetangbiao.zhjs!=null and kcKetangbiao.zhjs!="" and kcKetangbiao.zhjs=="1"'>
|
||||
and js.jsbh is not NULL
|
||||
</if>
|
||||
<if test='kcKetangbiao.zhjs!=null and kcKetangbiao.zhjs!="" and kcKetangbiao.zhjs=="0"'>
|
||||
and js.jsbh is NULL
|
||||
</if>
|
||||
<if test="kcKetangbiao.jzwh!=null and kcKetangbiao.jzwh!=''">
|
||||
and jxljbxx.jzwh = #{kcKetangbiao.jzwh}
|
||||
</if>
|
||||
<if test="kcKetangbiao.sftkb!=null and kcKetangbiao.sftkb!=''">
|
||||
and IF(tkxx.kcmc is null,'0','1') = 0
|
||||
</if>
|
||||
<if test="kcKetangbiao.bmdId !=null and kcKetangbiao.bmdId !=''">
|
||||
and (ktb.kcmc,ktb.skjs,ktb.skdd,ktb.hh,ktb.skrq) in (select kcmc,skjs,skdd,hh,skrq from kc_tingke_bmd_kcxx where bmd_id in (${kcKetangbiao.bmdId}))
|
||||
</if>
|
||||
</where>
|
||||
order by ktb.hh asc,kkdw.id asc,IF(tkxx.kcmc is null,'0','1') asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课堂表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
||||
|
||||
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
KcKetangbiao queryAllDataById(String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.mapper.KcDetectionDetailedMapper;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.mapper.KcDetectionMainMapper;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.mapper.KcKetangbiaoMapper;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.service.IKcKetangbiaoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 课堂表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcKetangbiao> implements IKcKetangbiaoService {
|
||||
|
||||
|
||||
@Autowired
|
||||
public KcDetectionMainMapper kcDetectionMainMapper;
|
||||
@Autowired
|
||||
public KcDetectionDetailedMapper kcDetectionDetailedMapper;
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getKclblist(page, kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KcKetangbiao queryAllDataById(String id) {
|
||||
KcKetangbiao kcKetangbiao = baseMapper.selectById(id);
|
||||
//查询对应教室数据
|
||||
// QueryWrapper<KcJiaoshirongliang> jiaoshirongliangQw = new QueryWrapper<>();
|
||||
// jiaoshirongliangQw.eq("jsbh",kcKetangbiao.getJsbh());
|
||||
// jiaoshirongliangQw.last("limit 1");
|
||||
// KcJiaoshirongliang jiaoshirongliang = kcJiaoshirongliangService.getOne(jiaoshirongliangQw);
|
||||
// kcKetangbiao.setJiaoshirongliang(jiaoshirongliang);
|
||||
|
||||
//查询教学大纲
|
||||
String rwbh = kcKetangbiao.getRwbh();
|
||||
String xqxn = kcKetangbiao.getXnxq();
|
||||
// QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>();
|
||||
// queryWrapper.eq("rwbh",rwbh);
|
||||
// queryWrapper.eq("xqxn",xqxn);
|
||||
// queryWrapper.last("limit 1");
|
||||
// ZyJxdg zyJxdg = zyJxdgService.getOne(queryWrapper);
|
||||
// kcKetangbiao.setZyJxdg(zyJxdg);
|
||||
|
||||
//查询
|
||||
DateTime now = DateTime.now();
|
||||
String nowStr = now.toString("yyyy-MM-dd");
|
||||
QueryWrapper<KcDetectionMain> kdmQw = new QueryWrapper<>();
|
||||
kdmQw.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
|
||||
kdmQw.lambda().eq(KcDetectionMain::getRwbh, rwbh);
|
||||
kdmQw.lambda().eq(KcDetectionMain::getXnxq, xqxn);
|
||||
|
||||
kdmQw.last("limit 1");
|
||||
KcDetectionMain detectionMain = kcDetectionMainMapper.selectOne(kdmQw);
|
||||
kcKetangbiao.setDetectionMain(detectionMain);
|
||||
|
||||
try {
|
||||
if (detectionMain != null) {
|
||||
QueryWrapper<KcDetectionDetailed> rsQw = new QueryWrapper<>();
|
||||
rsQw.eq("pid", detectionMain.getId());
|
||||
rsQw.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
|
||||
rsQw.orderByDesc("create_time");
|
||||
rsQw.last("limit 1");
|
||||
KcDetectionDetailed kcDetectionDetailed = kcDetectionDetailedMapper.selectOne(rsQw);
|
||||
kcKetangbiao.setKcDetectionDetailed(kcDetectionDetailed);
|
||||
QueryWrapper<KcDetectionDetailed> rsQwList = new QueryWrapper<>();
|
||||
rsQwList.eq("pid", detectionMain.getId());
|
||||
rsQwList.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
|
||||
rsQwList.orderByDesc("create_time");
|
||||
List<KcDetectionDetailed> zqrsList = kcDetectionDetailedMapper.selectList(rsQwList);
|
||||
kcKetangbiao.setZqrsList(zqrsList);
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return kcKetangbiao;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.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.demo.kcYuyue.entity.KcYuyue;
|
||||
import org.jeecg.modules.demo.kcYuyue.service.IKcYuyueService;
|
||||
|
||||
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: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="预约")
|
||||
@RestController
|
||||
@RequestMapping("/kcYuyue/kcYuyue")
|
||||
@Slf4j
|
||||
public class KcYuyueController extends JeecgController<KcYuyue, IKcYuyueService> {
|
||||
@Autowired
|
||||
private IKcYuyueService kcYuyueService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "预约-分页列表查询")
|
||||
@ApiOperation(value="预约-分页列表查询", notes="预约-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcYuyue>> queryPageList(KcYuyue kcYuyue,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcYuyue> queryWrapper = QueryGenerator.initQueryWrapper(kcYuyue, req.getParameterMap());
|
||||
Page<KcYuyue> page = new Page<KcYuyue>(pageNo, pageSize);
|
||||
IPage<KcYuyue> pageList = kcYuyueService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-添加")
|
||||
@ApiOperation(value="预约-添加", notes="预约-添加")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.save(kcYuyue);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "预约-添加")
|
||||
@ApiOperation(value="预约-添加", notes="预约-添加")
|
||||
@PostMapping(value = "/addNew")
|
||||
public Result<String> addNew(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.addNew(kcYuyue);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-编辑")
|
||||
@ApiOperation(value="预约-编辑", notes="预约-编辑")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.updateById(kcYuyue);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-通过id删除")
|
||||
@ApiOperation(value="预约-通过id删除", notes="预约-通过id删除")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcYuyueService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-批量删除")
|
||||
@ApiOperation(value="预约-批量删除", notes="预约-批量删除")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcYuyueService.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<KcYuyue> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcYuyue kcYuyue = kcYuyueService.getById(id);
|
||||
if(kcYuyue==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcYuyue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcYuyue
|
||||
*/
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcYuyue kcYuyue) {
|
||||
return super.exportXls(request, kcYuyue, KcYuyue.class, "预约");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcYuyue.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.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: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_yuyue")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_yuyue对象", description="预约")
|
||||
public class KcYuyue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**课堂表id*/
|
||||
@Excel(name = "课堂表id", width = 15)
|
||||
@ApiModelProperty(value = "课堂表id")
|
||||
private java.lang.String ketangbiaoid;
|
||||
/**账号*/
|
||||
@Excel(name = "账号", width = 15)
|
||||
@ApiModelProperty(value = "账号")
|
||||
private java.lang.String userid;
|
||||
/**用户名*/
|
||||
@Excel(name = "用户名", width = 15)
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private java.lang.String username;
|
||||
/**授课日期*/
|
||||
@Excel(name = "授课日期", width = 15)
|
||||
@ApiModelProperty(value = "授课日期")
|
||||
private java.lang.String skrq;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15)
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String hh;
|
||||
/**直播平台*/
|
||||
@Excel(name = "直播平台", width = 15)
|
||||
@ApiModelProperty(value = "直播平台")
|
||||
private java.lang.String zbpx;
|
||||
/**链接*/
|
||||
@Excel(name = "链接", width = 15)
|
||||
@ApiModelProperty(value = "链接")
|
||||
private java.lang.String link;
|
||||
/**是否删除*/
|
||||
@Excel(name = "是否删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private java.lang.Integer isdeleted;
|
||||
/**预约时间*/
|
||||
@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;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**任务编号*/
|
||||
@Excel(name = "任务编号", width = 15)
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
private java.lang.String rwbh;
|
||||
/**学期学年*/
|
||||
@Excel(name = "学期学年", width = 15)
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
private java.lang.String xqxn;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcYuyue.entity.KcYuyue;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 预约
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcYuyueMapper extends BaseMapper<KcYuyue> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcYuyue.mapper.KcYuyueMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcYuyue.entity.KcYuyue;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 预约
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcYuyueService extends IService<KcYuyue> {
|
||||
|
||||
void addNew(KcYuyue kcYuyue);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.demo.kcYuyue.entity.KcYuyue;
|
||||
import org.jeecg.modules.demo.kcYuyue.mapper.KcYuyueMapper;
|
||||
import org.jeecg.modules.demo.kcYuyue.service.IKcYuyueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 预约
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class KcYuyueServiceImpl extends ServiceImpl<KcYuyueMapper, KcYuyue> implements IKcYuyueService {
|
||||
|
||||
@Override
|
||||
public void addNew(KcYuyue kcYuyue) {
|
||||
baseMapper.insert(kcYuyue);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.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.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.service.IKcZhihuijiaoshiService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="智慧教师")
|
||||
@RestController
|
||||
@RequestMapping("/kcZhihuijiaoshi/kcZhihuijiaoshi")
|
||||
@Slf4j
|
||||
public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi, IKcZhihuijiaoshiService> {
|
||||
@Autowired
|
||||
private IKcZhihuijiaoshiService kcZhihuijiaoshiService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcZhihuijiaoshi
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "智慧教师-分页列表查询")
|
||||
@ApiOperation(value="智慧教师-分页列表查询", notes="智慧教师-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcZhihuijiaoshi>> queryPageList(KcZhihuijiaoshi kcZhihuijiaoshi,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcZhihuijiaoshi> queryWrapper = QueryGenerator.initQueryWrapper(kcZhihuijiaoshi, req.getParameterMap());
|
||||
Page<KcZhihuijiaoshi> page = new Page<KcZhihuijiaoshi>(pageNo, pageSize);
|
||||
IPage<KcZhihuijiaoshi> pageList = kcZhihuijiaoshiService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcZhihuijiaoshi
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-添加")
|
||||
@ApiOperation(value="智慧教师-添加", notes="智慧教师-添加")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcZhihuijiaoshi kcZhihuijiaoshi) {
|
||||
kcZhihuijiaoshiService.save(kcZhihuijiaoshi);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcZhihuijiaoshi
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-编辑")
|
||||
@ApiOperation(value="智慧教师-编辑", notes="智慧教师-编辑")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcZhihuijiaoshi kcZhihuijiaoshi) {
|
||||
kcZhihuijiaoshiService.updateById(kcZhihuijiaoshi);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-通过id删除")
|
||||
@ApiOperation(value="智慧教师-通过id删除", notes="智慧教师-通过id删除")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcZhihuijiaoshiService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-批量删除")
|
||||
@ApiOperation(value="智慧教师-批量删除", notes="智慧教师-批量删除")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcZhihuijiaoshiService.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<KcZhihuijiaoshi> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcZhihuijiaoshi kcZhihuijiaoshi = kcZhihuijiaoshiService.getById(id);
|
||||
if(kcZhihuijiaoshi==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcZhihuijiaoshi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcZhihuijiaoshi
|
||||
*/
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcZhihuijiaoshi kcZhihuijiaoshi) {
|
||||
return super.exportXls(request, kcZhihuijiaoshi, KcZhihuijiaoshi.class, "智慧教师");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcZhihuijiaoshi.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_zhihuijiaoshi")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_zhihuijiaoshi对象", description="智慧教师")
|
||||
public class KcZhihuijiaoshi implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Integer id;
|
||||
/**创建人登录名称*/
|
||||
@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;
|
||||
/**校区*/
|
||||
@Excel(name = "校区", width = 15)
|
||||
@ApiModelProperty(value = "校区")
|
||||
private java.lang.String xq;
|
||||
/**教学楼ID*/
|
||||
@Excel(name = "教学楼ID", width = 15)
|
||||
@ApiModelProperty(value = "教学楼ID")
|
||||
private java.lang.String jxlId;
|
||||
/**教学楼名称*/
|
||||
@Excel(name = "教学楼名称", width = 15)
|
||||
@ApiModelProperty(value = "教学楼名称")
|
||||
private java.lang.String jxlName;
|
||||
/**教室编号*/
|
||||
@Excel(name = "教室编号", width = 15)
|
||||
@ApiModelProperty(value = "教室编号")
|
||||
private java.lang.String jsbh;
|
||||
/**教室名称*/
|
||||
@Excel(name = "教室名称", width = 15)
|
||||
@ApiModelProperty(value = "教室名称")
|
||||
private java.lang.String jsmc;
|
||||
/**项目*/
|
||||
@Excel(name = "项目", width = 15)
|
||||
@ApiModelProperty(value = "项目")
|
||||
private java.lang.String xm;
|
||||
/**新ip*/
|
||||
@Excel(name = "新ip", width = 15)
|
||||
@ApiModelProperty(value = "新ip")
|
||||
private java.lang.String ip;
|
||||
/**播放地址(http)*/
|
||||
@Excel(name = "播放地址(http)", width = 15)
|
||||
@ApiModelProperty(value = "播放地址(http)")
|
||||
private java.lang.String pullUrl;
|
||||
/**推流地址(rtmp)*/
|
||||
@Excel(name = "推流地址(rtmp)", width = 15)
|
||||
@ApiModelProperty(value = "推流地址(rtmp)")
|
||||
private java.lang.String pushUrl;
|
||||
/**账号*/
|
||||
@Excel(name = "账号", width = 15)
|
||||
@ApiModelProperty(value = "账号")
|
||||
private java.lang.String user;
|
||||
/**密码*/
|
||||
@Excel(name = "密码", width = 15)
|
||||
@ApiModelProperty(value = "密码")
|
||||
private java.lang.String mima;
|
||||
/**厂商名称*/
|
||||
@Excel(name = "厂商名称", width = 15)
|
||||
@ApiModelProperty(value = "厂商名称")
|
||||
private java.lang.String changshang;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String bz;
|
||||
/**是否有效 0-有效 1-无效*/
|
||||
@Excel(name = "是否有效 0-有效 1-无效", width = 15)
|
||||
@ApiModelProperty(value = "是否有效 0-有效 1-无效")
|
||||
private java.lang.String sfyx;
|
||||
/**sort*/
|
||||
@Excel(name = "sort", width = 15)
|
||||
@ApiModelProperty(value = "sort")
|
||||
private java.lang.Integer sort;
|
||||
/**开放听课后台统计状态*/
|
||||
@Excel(name = "开放听课后台统计状态", width = 15)
|
||||
@ApiModelProperty(value = "开放听课后台统计状态")
|
||||
private java.lang.String tjKftkzt;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 智慧教师
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcZhihuijiaoshiMapper extends BaseMapper<KcZhihuijiaoshi> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcZhihuijiaoshi.mapper.KcZhihuijiaoshiMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 智慧教师
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcZhihuijiaoshiService extends IService<KcZhihuijiaoshi> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.mapper.KcZhihuijiaoshiMapper;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.service.IKcZhihuijiaoshiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 智慧教师
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class KcZhihuijiaoshiServiceImpl extends ServiceImpl<KcZhihuijiaoshiMapper, KcZhihuijiaoshi> implements IKcZhihuijiaoshiService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package org.jeecg.modules.demo.sync;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.alibaba.druid.support.json.JSONParser;
|
||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public abstract class BaseSync implements Job {
|
||||
|
||||
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
private String parameter;
|
||||
|
||||
public void setParameter(String parameter) {
|
||||
this.parameter = parameter;
|
||||
}
|
||||
|
||||
private Map<String,Object> paramMap;
|
||||
|
||||
public Map<String,Object> getParamMap(){
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
public
|
||||
|
||||
long startTime = 0;
|
||||
|
||||
public long start(){
|
||||
log.info("-------------------------------------------开始辣----------------------------------------------------");
|
||||
startTime = System.currentTimeMillis();
|
||||
initParam();
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void end(){
|
||||
log.info("-------------------------------------------结束辣----------------------------------------------------");
|
||||
long end = System.currentTimeMillis();
|
||||
log.info(String.valueOf(end));
|
||||
log.info("耗时:【"+(end - startTime)/1000 + "】秒【"+(end - startTime) + "】毫秒");
|
||||
}
|
||||
|
||||
public void initParam() {
|
||||
if(this.parameter != null && StringUtils.isNotBlank(this.parameter)){
|
||||
JSONParser parser = new JSONParser(this.parameter);
|
||||
paramMap = parser.parseMap();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void run(Map<String, Object> param) throws Exception;
|
||||
|
||||
public abstract void run();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package org.jeecg.modules.demo.sync;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.JwxtJxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.IXxhbjwxtjxrwService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.JwxtJxrwService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.JwxtScwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.JwxtscwjxxService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.JwxtXsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.IXxhbjwxtxsmdService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.JwxtXsmdService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class SyncJwxt extends BaseSync {
|
||||
|
||||
@Autowired
|
||||
private JwxtJxrwService expJxrwService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtjxrwService impJxrwService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private JwxtscwjxxService expScwjxxService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtscwjxxService impScwjxxService;
|
||||
|
||||
@Autowired
|
||||
private JwxtXsmdService expXsmdService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtxsmdService impXsmdService;
|
||||
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
run(getParamMap());
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 有参定时任务实现
|
||||
* @param param
|
||||
*/
|
||||
public void run(Map<String, Object> param){
|
||||
//查询数据
|
||||
List<JwxtJxrw> inDataList = expJxrwService.list();
|
||||
List<Xxhbjwxtjxrw> outDataList = Lists.newArrayList();
|
||||
|
||||
//查询数据
|
||||
List<JwxtScwjxx> in1DataList = expScwjxxService.list();
|
||||
List<Xxhbjwxtscwjxx> out1DataList = Lists.newArrayList();
|
||||
|
||||
//查询数据
|
||||
List<JwxtXsmd> in2DataList = expXsmdService.list();
|
||||
List<Xxhbjwxtxsmd> out2DataList = Lists.newArrayList();
|
||||
|
||||
//清洗数据
|
||||
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbjwxtjxrw.class)));
|
||||
in1DataList.forEach(x -> out1DataList.add(BeanUtil.toBean(x, Xxhbjwxtscwjxx.class)));
|
||||
in2DataList.forEach(x -> out2DataList.add(BeanUtil.toBean(x, Xxhbjwxtxsmd.class)));
|
||||
|
||||
//保存到胃
|
||||
try {
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
impJxrwService.remove(dqw);
|
||||
impJxrwService.syncList(outDataList);
|
||||
|
||||
QueryWrapper dqw1 = new QueryWrapper();
|
||||
impScwjxxService.remove(dqw1);
|
||||
impScwjxxService.syncList(out1DataList);
|
||||
|
||||
QueryWrapper dqw2 = new QueryWrapper();
|
||||
impXsmdService.remove(dqw2);
|
||||
impXsmdService.syncList(out2DataList);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参定时任务实现
|
||||
*/
|
||||
public void run(){
|
||||
run(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.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.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.IXxhbjwxtjxrwService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="教务系统教学任务")
|
||||
@RestController
|
||||
@RequestMapping("/xxhbjwxtjxrw/xxhbjwxtjxrw")
|
||||
@Slf4j
|
||||
public class XxhbjwxtjxrwController extends JeecgController<Xxhbjwxtjxrw, IXxhbjwxtjxrwService> {
|
||||
@Autowired
|
||||
private IXxhbjwxtjxrwService xxhbjwxtjxrwService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param xxhbjwxtjxrw
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "教务系统教学任务-分页列表查询")
|
||||
@ApiOperation(value="教务系统教学任务-分页列表查询", notes="教务系统教学任务-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Xxhbjwxtjxrw>> queryPageList(Xxhbjwxtjxrw xxhbjwxtjxrw,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Xxhbjwxtjxrw> queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtjxrw, req.getParameterMap());
|
||||
Page<Xxhbjwxtjxrw> page = new Page<Xxhbjwxtjxrw>(pageNo, pageSize);
|
||||
IPage<Xxhbjwxtjxrw> pageList = xxhbjwxtjxrwService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param xxhbjwxtjxrw
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统教学任务-添加")
|
||||
@ApiOperation(value="教务系统教学任务-添加", notes="教务系统教学任务-添加")
|
||||
@RequiresPermissions("xxhbjwxtjxrw:xxhbjwxtjxrw:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Xxhbjwxtjxrw xxhbjwxtjxrw) {
|
||||
xxhbjwxtjxrwService.save(xxhbjwxtjxrw);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param xxhbjwxtjxrw
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统教学任务-编辑")
|
||||
@ApiOperation(value="教务系统教学任务-编辑", notes="教务系统教学任务-编辑")
|
||||
@RequiresPermissions("xxhbjwxtjxrw:xxhbjwxtjxrw:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Xxhbjwxtjxrw xxhbjwxtjxrw) {
|
||||
xxhbjwxtjxrwService.updateById(xxhbjwxtjxrw);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统教学任务-通过id删除")
|
||||
@ApiOperation(value="教务系统教学任务-通过id删除", notes="教务系统教学任务-通过id删除")
|
||||
@RequiresPermissions("xxhbjwxtjxrw:xxhbjwxtjxrw:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
xxhbjwxtjxrwService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统教学任务-批量删除")
|
||||
@ApiOperation(value="教务系统教学任务-批量删除", notes="教务系统教学任务-批量删除")
|
||||
@RequiresPermissions("xxhbjwxtjxrw:xxhbjwxtjxrw:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.xxhbjwxtjxrwService.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<Xxhbjwxtjxrw> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Xxhbjwxtjxrw xxhbjwxtjxrw = xxhbjwxtjxrwService.getById(id);
|
||||
if(xxhbjwxtjxrw==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(xxhbjwxtjxrw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param xxhbjwxtjxrw
|
||||
*/
|
||||
@RequiresPermissions("xxhbjwxtjxrw:xxhbjwxtjxrw:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Xxhbjwxtjxrw xxhbjwxtjxrw) {
|
||||
return super.exportXls(request, xxhbjwxtjxrw, Xxhbjwxtjxrw.class, "教务系统教学任务");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("xxhbjwxtjxrw:xxhbjwxtjxrw:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Xxhbjwxtjxrw.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("v_jwxt_jxrw")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="v_jwxt_jxrw对象", description="教务系统教学任务")
|
||||
public class JwxtJxrw implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**xnxqdm*/
|
||||
@Excel(name = "xnxqdm", width = 15)
|
||||
@ApiModelProperty(value = "xnxqdm")
|
||||
private String xnxqdm;
|
||||
/**kcmc*/
|
||||
@Excel(name = "kcmc", width = 15)
|
||||
@ApiModelProperty(value = "kcmc")
|
||||
private String kcmc;
|
||||
/**kcrwdm*/
|
||||
@Excel(name = "kcrwdm", width = 15)
|
||||
@ApiModelProperty(value = "kcrwdm")
|
||||
private String kcrwdm;
|
||||
/**kclb*/
|
||||
@Excel(name = "kclb", width = 15)
|
||||
@ApiModelProperty(value = "kclb")
|
||||
private String kclb;
|
||||
/**xf*/
|
||||
@Excel(name = "xf", width = 15)
|
||||
@ApiModelProperty(value = "xf")
|
||||
private String xf;
|
||||
/**zxs*/
|
||||
@Excel(name = "zxs", width = 15)
|
||||
@ApiModelProperty(value = "zxs")
|
||||
private String zxs;
|
||||
/**kkyxmc*/
|
||||
@Excel(name = "kkyxmc", width = 15)
|
||||
@ApiModelProperty(value = "kkyxmc")
|
||||
private String kkyxmc;
|
||||
/**teaxm*/
|
||||
@Excel(name = "teaxm", width = 15)
|
||||
@ApiModelProperty(value = "teaxm")
|
||||
private String teaxm;
|
||||
/**bjxx*/
|
||||
@Excel(name = "bjxx", width = 15)
|
||||
@ApiModelProperty(value = "bjxx")
|
||||
private String bjxx;
|
||||
/**xn*/
|
||||
@Excel(name = "xn", width = 15)
|
||||
@ApiModelProperty(value = "xn")
|
||||
private String xn;
|
||||
/**xqmc*/
|
||||
@Excel(name = "xqmc", width = 15)
|
||||
@ApiModelProperty(value = "xqmc")
|
||||
private String xqmc;
|
||||
/**sjfs*/
|
||||
@Excel(name = "sjfs", width = 15)
|
||||
@ApiModelProperty(value = "sjfs")
|
||||
private String sjfs;
|
||||
/**khfsmc*/
|
||||
@Excel(name = "khfsmc", width = 15)
|
||||
@ApiModelProperty(value = "khfsmc")
|
||||
private String khfsmc;
|
||||
/**isUploadSj*/
|
||||
@Excel(name = "isUploadSj", width = 15)
|
||||
@ApiModelProperty(value = "isUploadSj")
|
||||
private String isUploadSj;
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("xxhbjwxtjxrw")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="xxhbjwxtjxrw对象", description="教务系统教学任务")
|
||||
public class Xxhbjwxtjxrw implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**xnxqdm*/
|
||||
@Excel(name = "xnxqdm", width = 15)
|
||||
@ApiModelProperty(value = "xnxqdm")
|
||||
private java.lang.String xnxqdm;
|
||||
/**kcmc*/
|
||||
@Excel(name = "kcmc", width = 15)
|
||||
@ApiModelProperty(value = "kcmc")
|
||||
private java.lang.String kcmc;
|
||||
/**kcrwdm*/
|
||||
@Excel(name = "kcrwdm", width = 15)
|
||||
@ApiModelProperty(value = "kcrwdm")
|
||||
private java.lang.String kcrwdm;
|
||||
/**kclb*/
|
||||
@Excel(name = "kclb", width = 15)
|
||||
@ApiModelProperty(value = "kclb")
|
||||
private java.lang.String kclb;
|
||||
/**xf*/
|
||||
@Excel(name = "xf", width = 15)
|
||||
@ApiModelProperty(value = "xf")
|
||||
private java.lang.String xf;
|
||||
/**zxs*/
|
||||
@Excel(name = "zxs", width = 15)
|
||||
@ApiModelProperty(value = "zxs")
|
||||
private java.lang.String zxs;
|
||||
/**kkyxmc*/
|
||||
@Excel(name = "kkyxmc", width = 15)
|
||||
@ApiModelProperty(value = "kkyxmc")
|
||||
private java.lang.String kkyxmc;
|
||||
/**teaxm*/
|
||||
@Excel(name = "teaxm", width = 15)
|
||||
@ApiModelProperty(value = "teaxm")
|
||||
private java.lang.String teaxm;
|
||||
/**bjxx*/
|
||||
@Excel(name = "bjxx", width = 15)
|
||||
@ApiModelProperty(value = "bjxx")
|
||||
private java.lang.String bjxx;
|
||||
/**xn*/
|
||||
@Excel(name = "xn", width = 15)
|
||||
@ApiModelProperty(value = "xn")
|
||||
private java.lang.String xn;
|
||||
/**xqmc*/
|
||||
@Excel(name = "xqmc", width = 15)
|
||||
@ApiModelProperty(value = "xqmc")
|
||||
private java.lang.String xqmc;
|
||||
/**sjfs*/
|
||||
@Excel(name = "sjfs", width = 15)
|
||||
@ApiModelProperty(value = "sjfs")
|
||||
private java.lang.String sjfs;
|
||||
/**khfsmc*/
|
||||
@Excel(name = "khfsmc", width = 15)
|
||||
@ApiModelProperty(value = "khfsmc")
|
||||
private java.lang.String khfsmc;
|
||||
/**isUploadSj*/
|
||||
@Excel(name = "isUploadSj", width = 15)
|
||||
@ApiModelProperty(value = "isUploadSj")
|
||||
private java.lang.String isUploadSj;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.JwxtJxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface JwxtJxrwMapper extends BaseMapper<JwxtJxrw> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface XxhbjwxtjxrwMapper extends BaseMapper<Xxhbjwxtjxrw> {
|
||||
|
||||
}
|
||||
|
|
@ -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.xxhbjwxtjxrw.mapper.JwxtJxrwMapper">
|
||||
|
||||
</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.xxhbjwxtjxrw.mapper.XxhbjwxtjxrwMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.service;
|
||||
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IXxhbjwxtjxrwService extends IService<Xxhbjwxtjxrw> {
|
||||
|
||||
void syncList(List<Xxhbjwxtjxrw> outDataList);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.JwxtJxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface JwxtJxrwService extends IService<JwxtJxrw> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.JwxtJxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.mapper.JwxtJxrwMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.mapper.XxhbjwxtjxrwMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.IXxhbjwxtjxrwService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.JwxtJxrwService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class JwxtJxrwServiceImpl extends ServiceImpl<JwxtJxrwMapper, JwxtJxrw> implements JwxtJxrwService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtjxrw.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.mapper.XxhbjwxtjxrwMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.IXxhbjwxtjxrwService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统教学任务
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class XxhbjwxtjxrwServiceImpl extends ServiceImpl<XxhbjwxtjxrwMapper, Xxhbjwxtjxrw> implements IXxhbjwxtjxrwService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public void syncList(List<Xxhbjwxtjxrw> entityList) {
|
||||
syncList(entityList, true);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<Xxhbjwxtjxrw> entityList, boolean isDelete) {
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
if(isDelete){
|
||||
baseMapper.delete(dqw);
|
||||
}
|
||||
return this.saveBatch(entityList, 1000);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.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.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="教务系统上传文件信息")
|
||||
@RestController
|
||||
@RequestMapping("/xxhbjwxtscwjxx/xxhbjwxtscwjxx")
|
||||
@Slf4j
|
||||
public class XxhbjwxtscwjxxController extends JeecgController<Xxhbjwxtscwjxx, IXxhbjwxtscwjxxService> {
|
||||
@Autowired
|
||||
private IXxhbjwxtscwjxxService xxhbjwxtscwjxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param xxhbjwxtscwjxx
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "教务系统上传文件信息-分页列表查询")
|
||||
@ApiOperation(value="教务系统上传文件信息-分页列表查询", notes="教务系统上传文件信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Xxhbjwxtscwjxx>> queryPageList(Xxhbjwxtscwjxx xxhbjwxtscwjxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Xxhbjwxtscwjxx> queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtscwjxx, req.getParameterMap());
|
||||
Page<Xxhbjwxtscwjxx> page = new Page<Xxhbjwxtscwjxx>(pageNo, pageSize);
|
||||
IPage<Xxhbjwxtscwjxx> pageList = xxhbjwxtscwjxxService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param xxhbjwxtscwjxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统上传文件信息-添加")
|
||||
@ApiOperation(value="教务系统上传文件信息-添加", notes="教务系统上传文件信息-添加")
|
||||
@RequiresPermissions("xxhbjwxtscwjxx:xxhbjwxtscwjxx:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Xxhbjwxtscwjxx xxhbjwxtscwjxx) {
|
||||
xxhbjwxtscwjxxService.save(xxhbjwxtscwjxx);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param xxhbjwxtscwjxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统上传文件信息-编辑")
|
||||
@ApiOperation(value="教务系统上传文件信息-编辑", notes="教务系统上传文件信息-编辑")
|
||||
@RequiresPermissions("xxhbjwxtscwjxx:xxhbjwxtscwjxx:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Xxhbjwxtscwjxx xxhbjwxtscwjxx) {
|
||||
xxhbjwxtscwjxxService.updateById(xxhbjwxtscwjxx);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统上传文件信息-通过id删除")
|
||||
@ApiOperation(value="教务系统上传文件信息-通过id删除", notes="教务系统上传文件信息-通过id删除")
|
||||
@RequiresPermissions("xxhbjwxtscwjxx:xxhbjwxtscwjxx:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
xxhbjwxtscwjxxService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统上传文件信息-批量删除")
|
||||
@ApiOperation(value="教务系统上传文件信息-批量删除", notes="教务系统上传文件信息-批量删除")
|
||||
@RequiresPermissions("xxhbjwxtscwjxx:xxhbjwxtscwjxx:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.xxhbjwxtscwjxxService.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<Xxhbjwxtscwjxx> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Xxhbjwxtscwjxx xxhbjwxtscwjxx = xxhbjwxtscwjxxService.getById(id);
|
||||
if(xxhbjwxtscwjxx==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(xxhbjwxtscwjxx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param xxhbjwxtscwjxx
|
||||
*/
|
||||
@RequiresPermissions("xxhbjwxtscwjxx:xxhbjwxtscwjxx:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Xxhbjwxtscwjxx xxhbjwxtscwjxx) {
|
||||
return super.exportXls(request, xxhbjwxtscwjxx, Xxhbjwxtscwjxx.class, "教务系统上传文件信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("xxhbjwxtscwjxx:xxhbjwxtscwjxx:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Xxhbjwxtscwjxx.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("v_jwxt_scwjxx")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="v_jwxt_scwjxx对象", description="教务系统上传文件信息")
|
||||
public class JwxtScwjxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**name*/
|
||||
@Excel(name = "name", width = 15)
|
||||
@ApiModelProperty(value = "name")
|
||||
private String name;
|
||||
/**path*/
|
||||
@Excel(name = "path", width = 15)
|
||||
@ApiModelProperty(value = "path")
|
||||
private String path;
|
||||
/**cjr*/
|
||||
@Excel(name = "cjr", width = 15)
|
||||
@ApiModelProperty(value = "cjr")
|
||||
private String cjr;
|
||||
/**cjsj*/
|
||||
@Excel(name = "cjsj", width = 15)
|
||||
@ApiModelProperty(value = "cjsj")
|
||||
private String cjsj;
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("xxhbjwxtscwjxx")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="xxhbjwxtscwjxx对象", description="教务系统上传文件信息")
|
||||
public class Xxhbjwxtscwjxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**name*/
|
||||
@Excel(name = "name", width = 15)
|
||||
@ApiModelProperty(value = "name")
|
||||
private java.lang.String name;
|
||||
/**path*/
|
||||
@Excel(name = "path", width = 15)
|
||||
@ApiModelProperty(value = "path")
|
||||
private java.lang.String path;
|
||||
/**cjr*/
|
||||
@Excel(name = "cjr", width = 15)
|
||||
@ApiModelProperty(value = "cjr")
|
||||
private java.lang.String cjr;
|
||||
/**cjsj*/
|
||||
@Excel(name = "cjsj", width = 15)
|
||||
@ApiModelProperty(value = "cjsj")
|
||||
private java.lang.String cjsj;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.JwxtScwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface JwxtscwjxxMapper extends BaseMapper<JwxtScwjxx> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface XxhbjwxtscwjxxMapper extends BaseMapper<Xxhbjwxtscwjxx> {
|
||||
|
||||
}
|
||||
|
|
@ -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.xxhbjwxtscwjxx.mapper.JwxtscwjxxMapper">
|
||||
|
||||
</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.xxhbjwxtscwjxx.mapper.XxhbjwxtscwjxxMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.service;
|
||||
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IXxhbjwxtscwjxxService extends IService<Xxhbjwxtscwjxx> {
|
||||
|
||||
void syncList(List<Xxhbjwxtscwjxx> outDataList);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.JwxtScwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface JwxtscwjxxService extends IService<JwxtScwjxx> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.JwxtScwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.mapper.JwxtscwjxxMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.mapper.XxhbjwxtscwjxxMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.JwxtscwjxxService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class JwxtscwjxxServiceImpl extends ServiceImpl<JwxtscwjxxMapper, JwxtScwjxx> implements JwxtscwjxxService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtscwjxx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.mapper.XxhbjwxtscwjxxMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统上传文件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class XxhbjwxtscwjxxServiceImpl extends ServiceImpl<XxhbjwxtscwjxxMapper, Xxhbjwxtscwjxx> implements IXxhbjwxtscwjxxService {
|
||||
|
||||
@Override
|
||||
public void syncList(List<Xxhbjwxtscwjxx> entityList) {
|
||||
|
||||
syncList(entityList, true);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<Xxhbjwxtscwjxx> entityList, boolean isDelete) {
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
if(isDelete){
|
||||
baseMapper.delete(dqw);
|
||||
}
|
||||
return this.saveBatch(entityList, 1000);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.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.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.IXxhbjwxtxsmdService;
|
||||
|
||||
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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="教务系统学生名单")
|
||||
@RestController
|
||||
@RequestMapping("/xxhbjwxtxsmd/xxhbjwxtxsmd")
|
||||
@Slf4j
|
||||
public class XxhbjwxtxsmdController extends JeecgController<Xxhbjwxtxsmd, IXxhbjwxtxsmdService> {
|
||||
@Autowired
|
||||
private IXxhbjwxtxsmdService xxhbjwxtxsmdService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param xxhbjwxtxsmd
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "教务系统学生名单-分页列表查询")
|
||||
@ApiOperation(value="教务系统学生名单-分页列表查询", notes="教务系统学生名单-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Xxhbjwxtxsmd>> queryPageList(Xxhbjwxtxsmd xxhbjwxtxsmd,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Xxhbjwxtxsmd> queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtxsmd, req.getParameterMap());
|
||||
Page<Xxhbjwxtxsmd> page = new Page<Xxhbjwxtxsmd>(pageNo, pageSize);
|
||||
IPage<Xxhbjwxtxsmd> pageList = xxhbjwxtxsmdService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param xxhbjwxtxsmd
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统学生名单-添加")
|
||||
@ApiOperation(value="教务系统学生名单-添加", notes="教务系统学生名单-添加")
|
||||
@RequiresPermissions("xxhbjwxtxsmd:xxhbjwxtxsmd:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Xxhbjwxtxsmd xxhbjwxtxsmd) {
|
||||
xxhbjwxtxsmdService.save(xxhbjwxtxsmd);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param xxhbjwxtxsmd
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统学生名单-编辑")
|
||||
@ApiOperation(value="教务系统学生名单-编辑", notes="教务系统学生名单-编辑")
|
||||
@RequiresPermissions("xxhbjwxtxsmd:xxhbjwxtxsmd:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Xxhbjwxtxsmd xxhbjwxtxsmd) {
|
||||
xxhbjwxtxsmdService.updateById(xxhbjwxtxsmd);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统学生名单-通过id删除")
|
||||
@ApiOperation(value="教务系统学生名单-通过id删除", notes="教务系统学生名单-通过id删除")
|
||||
@RequiresPermissions("xxhbjwxtxsmd:xxhbjwxtxsmd:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
xxhbjwxtxsmdService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "教务系统学生名单-批量删除")
|
||||
@ApiOperation(value="教务系统学生名单-批量删除", notes="教务系统学生名单-批量删除")
|
||||
@RequiresPermissions("xxhbjwxtxsmd:xxhbjwxtxsmd:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.xxhbjwxtxsmdService.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<Xxhbjwxtxsmd> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Xxhbjwxtxsmd xxhbjwxtxsmd = xxhbjwxtxsmdService.getById(id);
|
||||
if(xxhbjwxtxsmd==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(xxhbjwxtxsmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param xxhbjwxtxsmd
|
||||
*/
|
||||
@RequiresPermissions("xxhbjwxtxsmd:xxhbjwxtxsmd:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Xxhbjwxtxsmd xxhbjwxtxsmd) {
|
||||
return super.exportXls(request, xxhbjwxtxsmd, Xxhbjwxtxsmd.class, "教务系统学生名单");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("xxhbjwxtxsmd:xxhbjwxtxsmd:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Xxhbjwxtxsmd.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("v_jwxt_xsmd")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="v_jwxt_xsmd对象", description="教务系统学生名单")
|
||||
public class JwxtXsmd {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**kcrwdm*/
|
||||
@Excel(name = "kcrwdm", width = 15)
|
||||
@ApiModelProperty(value = "kcrwdm")
|
||||
private String kcrwdm;
|
||||
/**nj*/
|
||||
@Excel(name = "nj", width = 15)
|
||||
@ApiModelProperty(value = "nj")
|
||||
private String nj;
|
||||
/**xsztmc*/
|
||||
@Excel(name = "xsztmc", width = 15)
|
||||
@ApiModelProperty(value = "xsztmc")
|
||||
private String xsztmc;
|
||||
/**zymc*/
|
||||
@Excel(name = "zymc", width = 15)
|
||||
@ApiModelProperty(value = "zymc")
|
||||
private String zymc;
|
||||
/**xsbh*/
|
||||
@Excel(name = "xsbh", width = 15)
|
||||
@ApiModelProperty(value = "xsbh")
|
||||
private String xsbh;
|
||||
/**xsxm*/
|
||||
@Excel(name = "xsxm", width = 15)
|
||||
@ApiModelProperty(value = "xsxm")
|
||||
private String xsxm;
|
||||
/**kcmc*/
|
||||
@Excel(name = "kcmc", width = 15)
|
||||
@ApiModelProperty(value = "kcmc")
|
||||
private String kcmc;
|
||||
/**kclb*/
|
||||
@Excel(name = "kclb", width = 15)
|
||||
@ApiModelProperty(value = "kclb")
|
||||
private String kclb;
|
||||
/**teaxm*/
|
||||
@Excel(name = "teaxm", width = 15)
|
||||
@ApiModelProperty(value = "teaxm")
|
||||
private String teaxm;
|
||||
/**cj1*/
|
||||
@Excel(name = "cj1", width = 15)
|
||||
@ApiModelProperty(value = "cj1")
|
||||
private String cj1;
|
||||
/**cj2*/
|
||||
@Excel(name = "cj2", width = 15)
|
||||
@ApiModelProperty(value = "cj2")
|
||||
private String cj2;
|
||||
/**cj3*/
|
||||
@Excel(name = "cj3", width = 15)
|
||||
@ApiModelProperty(value = "cj3")
|
||||
private String cj3;
|
||||
/**cj4*/
|
||||
@Excel(name = "cj4", width = 15)
|
||||
@ApiModelProperty(value = "cj4")
|
||||
private String cj4;
|
||||
/**cj5*/
|
||||
@Excel(name = "cj5", width = 15)
|
||||
@ApiModelProperty(value = "cj5")
|
||||
private String cj5;
|
||||
/**cj1mc*/
|
||||
@Excel(name = "cj1mc", width = 15)
|
||||
@ApiModelProperty(value = "cj1mc")
|
||||
private String cj1mc;
|
||||
/**cj2mc*/
|
||||
@Excel(name = "cj2mc", width = 15)
|
||||
@ApiModelProperty(value = "cj2mc")
|
||||
private String cj2mc;
|
||||
/**cj3mc*/
|
||||
@Excel(name = "cj3mc", width = 15)
|
||||
@ApiModelProperty(value = "cj3mc")
|
||||
private String cj3mc;
|
||||
/**cj4mc*/
|
||||
@Excel(name = "cj4mc", width = 15)
|
||||
@ApiModelProperty(value = "cj4mc")
|
||||
private String cj4mc;
|
||||
/**cj5mc*/
|
||||
@Excel(name = "cj5mc", width = 15)
|
||||
@ApiModelProperty(value = "cj5mc")
|
||||
private String cj5mc;
|
||||
/**zcj*/
|
||||
@Excel(name = "zcj", width = 15)
|
||||
@ApiModelProperty(value = "zcj")
|
||||
private String zcj;
|
||||
/**cjfsmc*/
|
||||
@Excel(name = "cjfsmc", width = 15)
|
||||
@ApiModelProperty(value = "cjfsmc")
|
||||
private String cjfsmc;
|
||||
/**xdfsmc*/
|
||||
@Excel(name = "xdfsmc", width = 15)
|
||||
@ApiModelProperty(value = "xdfsmc")
|
||||
private String xdfsmc;
|
||||
/**ksxzmc*/
|
||||
@Excel(name = "ksxzmc", width = 15)
|
||||
@ApiModelProperty(value = "ksxzmc")
|
||||
private String ksxzmc;
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.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: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("xxhbjwxtxsmd")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="xxhbjwxtxsmd对象", description="教务系统学生名单")
|
||||
public class Xxhbjwxtxsmd implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**kcrwdm*/
|
||||
@Excel(name = "kcrwdm", width = 15)
|
||||
@ApiModelProperty(value = "kcrwdm")
|
||||
private java.lang.String kcrwdm;
|
||||
/**nj*/
|
||||
@Excel(name = "nj", width = 15)
|
||||
@ApiModelProperty(value = "nj")
|
||||
private java.lang.String nj;
|
||||
/**xsztmc*/
|
||||
@Excel(name = "xsztmc", width = 15)
|
||||
@ApiModelProperty(value = "xsztmc")
|
||||
private java.lang.String xsztmc;
|
||||
/**zymc*/
|
||||
@Excel(name = "zymc", width = 15)
|
||||
@ApiModelProperty(value = "zymc")
|
||||
private java.lang.String zymc;
|
||||
/**xsbh*/
|
||||
@Excel(name = "xsbh", width = 15)
|
||||
@ApiModelProperty(value = "xsbh")
|
||||
private java.lang.String xsbh;
|
||||
/**xsxm*/
|
||||
@Excel(name = "xsxm", width = 15)
|
||||
@ApiModelProperty(value = "xsxm")
|
||||
private java.lang.String xsxm;
|
||||
/**kcmc*/
|
||||
@Excel(name = "kcmc", width = 15)
|
||||
@ApiModelProperty(value = "kcmc")
|
||||
private java.lang.String kcmc;
|
||||
/**kclb*/
|
||||
@Excel(name = "kclb", width = 15)
|
||||
@ApiModelProperty(value = "kclb")
|
||||
private java.lang.String kclb;
|
||||
/**teaxm*/
|
||||
@Excel(name = "teaxm", width = 15)
|
||||
@ApiModelProperty(value = "teaxm")
|
||||
private java.lang.String teaxm;
|
||||
/**cj1*/
|
||||
@Excel(name = "cj1", width = 15)
|
||||
@ApiModelProperty(value = "cj1")
|
||||
private java.lang.String cj1;
|
||||
/**cj2*/
|
||||
@Excel(name = "cj2", width = 15)
|
||||
@ApiModelProperty(value = "cj2")
|
||||
private java.lang.String cj2;
|
||||
/**cj3*/
|
||||
@Excel(name = "cj3", width = 15)
|
||||
@ApiModelProperty(value = "cj3")
|
||||
private java.lang.String cj3;
|
||||
/**cj4*/
|
||||
@Excel(name = "cj4", width = 15)
|
||||
@ApiModelProperty(value = "cj4")
|
||||
private java.lang.String cj4;
|
||||
/**cj5*/
|
||||
@Excel(name = "cj5", width = 15)
|
||||
@ApiModelProperty(value = "cj5")
|
||||
private java.lang.String cj5;
|
||||
/**cj1mc*/
|
||||
@Excel(name = "cj1mc", width = 15)
|
||||
@ApiModelProperty(value = "cj1mc")
|
||||
private java.lang.String cj1mc;
|
||||
/**cj2mc*/
|
||||
@Excel(name = "cj2mc", width = 15)
|
||||
@ApiModelProperty(value = "cj2mc")
|
||||
private java.lang.String cj2mc;
|
||||
/**cj3mc*/
|
||||
@Excel(name = "cj3mc", width = 15)
|
||||
@ApiModelProperty(value = "cj3mc")
|
||||
private java.lang.String cj3mc;
|
||||
/**cj4mc*/
|
||||
@Excel(name = "cj4mc", width = 15)
|
||||
@ApiModelProperty(value = "cj4mc")
|
||||
private java.lang.String cj4mc;
|
||||
/**cj5mc*/
|
||||
@Excel(name = "cj5mc", width = 15)
|
||||
@ApiModelProperty(value = "cj5mc")
|
||||
private java.lang.String cj5mc;
|
||||
/**zcj*/
|
||||
@Excel(name = "zcj", width = 15)
|
||||
@ApiModelProperty(value = "zcj")
|
||||
private java.lang.String zcj;
|
||||
/**cjfsmc*/
|
||||
@Excel(name = "cjfsmc", width = 15)
|
||||
@ApiModelProperty(value = "cjfsmc")
|
||||
private java.lang.String cjfsmc;
|
||||
/**xdfsmc*/
|
||||
@Excel(name = "xdfsmc", width = 15)
|
||||
@ApiModelProperty(value = "xdfsmc")
|
||||
private java.lang.String xdfsmc;
|
||||
/**ksxzmc*/
|
||||
@Excel(name = "ksxzmc", width = 15)
|
||||
@ApiModelProperty(value = "ksxzmc")
|
||||
private java.lang.String ksxzmc;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.JwxtXsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface JwxtXsmdMapper extends BaseMapper<JwxtXsmd> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface XxhbjwxtxsmdMapper extends BaseMapper<Xxhbjwxtxsmd> {
|
||||
|
||||
}
|
||||
|
|
@ -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.xxhbjwxtxsmd.mapper.JwxtXsmdMapper">
|
||||
|
||||
</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.xxhbjwxtxsmd.mapper.XxhbjwxtxsmdMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.service;
|
||||
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IXxhbjwxtxsmdService extends IService<Xxhbjwxtxsmd> {
|
||||
|
||||
void syncList(List<Xxhbjwxtxsmd> outDataList);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.JwxtXsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface JwxtXsmdService extends IService<JwxtXsmd> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.JwxtXsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.mapper.JwxtXsmdMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.mapper.XxhbjwxtxsmdMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.IXxhbjwxtxsmdService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.JwxtXsmdService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class JwxtXsmdServiceImpl extends ServiceImpl<JwxtXsmdMapper, JwxtXsmd> implements JwxtXsmdService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.mapper.XxhbjwxtxsmdMapper;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.IXxhbjwxtxsmdService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教务系统学生名单
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class XxhbjwxtxsmdServiceImpl extends ServiceImpl<XxhbjwxtxsmdMapper, Xxhbjwxtxsmd> implements IXxhbjwxtxsmdService {
|
||||
|
||||
@Override
|
||||
public void syncList(List<Xxhbjwxtxsmd> entityList) {
|
||||
|
||||
syncList(entityList, true);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<Xxhbjwxtxsmd> entityList, boolean isDelete) {
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
if(isDelete){
|
||||
baseMapper.delete(dqw);
|
||||
}
|
||||
return this.saveBatch(entityList, 1000);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.zyHuizong.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.demo.zyHuizong.entity.ZyHuizong;
|
||||
import org.jeecg.modules.demo.zyHuizong.service.IZyHuizongService;
|
||||
|
||||
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: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="作业汇总")
|
||||
@RestController
|
||||
@RequestMapping("/zyHuizong/zyHuizong")
|
||||
@Slf4j
|
||||
public class ZyHuizongController extends JeecgController<ZyHuizong, IZyHuizongService> {
|
||||
@Autowired
|
||||
private IZyHuizongService zyHuizongService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param zyHuizong
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "作业汇总-分页列表查询")
|
||||
@ApiOperation(value="作业汇总-分页列表查询", notes="作业汇总-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ZyHuizong>> queryPageList(ZyHuizong zyHuizong,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ZyHuizong> queryWrapper = QueryGenerator.initQueryWrapper(zyHuizong, req.getParameterMap());
|
||||
Page<ZyHuizong> page = new Page<ZyHuizong>(pageNo, pageSize);
|
||||
IPage<ZyHuizong> pageList = zyHuizongService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param zyHuizong
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总-添加")
|
||||
@ApiOperation(value="作业汇总-添加", notes="作业汇总-添加")
|
||||
@RequiresPermissions("zyHuizong:zy_huizong:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ZyHuizong zyHuizong) {
|
||||
zyHuizongService.save(zyHuizong);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param zyHuizong
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总-编辑")
|
||||
@ApiOperation(value="作业汇总-编辑", notes="作业汇总-编辑")
|
||||
@RequiresPermissions("zyHuizong:zy_huizong:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ZyHuizong zyHuizong) {
|
||||
zyHuizongService.updateById(zyHuizong);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总-通过id删除")
|
||||
@ApiOperation(value="作业汇总-通过id删除", notes="作业汇总-通过id删除")
|
||||
@RequiresPermissions("zyHuizong:zy_huizong:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
zyHuizongService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总-批量删除")
|
||||
@ApiOperation(value="作业汇总-批量删除", notes="作业汇总-批量删除")
|
||||
@RequiresPermissions("zyHuizong:zy_huizong:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.zyHuizongService.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<ZyHuizong> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ZyHuizong zyHuizong = zyHuizongService.getById(id);
|
||||
if(zyHuizong==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(zyHuizong);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param zyHuizong
|
||||
*/
|
||||
@RequiresPermissions("zyHuizong:zy_huizong:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ZyHuizong zyHuizong) {
|
||||
return super.exportXls(request, zyHuizong, ZyHuizong.class, "作业汇总");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("zyHuizong:zy_huizong:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ZyHuizong.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package org.jeecg.modules.demo.zyHuizong.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: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("zy_huizong")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="zy_huizong对象", description="作业汇总")
|
||||
public class ZyHuizong implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**学期学年*/
|
||||
@Excel(name = "学期学年", width = 15)
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
private java.lang.String xnxq;
|
||||
/**学院编号*/
|
||||
@Excel(name = "学院编号", width = 15)
|
||||
@ApiModelProperty(value = "学院编号")
|
||||
private java.lang.String xybh;
|
||||
/**学院名称*/
|
||||
@Excel(name = "学院名称", width = 15)
|
||||
@ApiModelProperty(value = "学院名称")
|
||||
private java.lang.String xymc;
|
||||
/**任务编号*/
|
||||
@Excel(name = "任务编号", width = 15)
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
private java.lang.String rwbh;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**作业编号*/
|
||||
@Excel(name = "作业编号", width = 15)
|
||||
@ApiModelProperty(value = "作业编号")
|
||||
private java.lang.String zybh;
|
||||
/**作业名称*/
|
||||
@Excel(name = "作业名称", width = 15)
|
||||
@ApiModelProperty(value = "作业名称")
|
||||
private java.lang.String zymc;
|
||||
/**作业类型*/
|
||||
@Excel(name = "作业类型", width = 15)
|
||||
@ApiModelProperty(value = "作业类型")
|
||||
private java.lang.String zylx;
|
||||
/**作业占比*/
|
||||
@Excel(name = "作业占比", width = 15)
|
||||
@ApiModelProperty(value = "作业占比")
|
||||
private java.lang.String qmzb;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.zyHuizong.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.zyHuizong.entity.ZyHuizong;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 作业汇总
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ZyHuizongMapper extends BaseMapper<ZyHuizong> {
|
||||
|
||||
}
|
||||
|
|
@ -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.zyHuizong.mapper.ZyHuizongMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.demo.zyHuizong.service;
|
||||
|
||||
import org.jeecg.modules.demo.zyHuizong.entity.ZyHuizong;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 作业汇总
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IZyHuizongService extends IService<ZyHuizong> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.demo.zyHuizong.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.zyHuizong.entity.ZyHuizong;
|
||||
import org.jeecg.modules.demo.zyHuizong.mapper.ZyHuizongMapper;
|
||||
import org.jeecg.modules.demo.zyHuizong.service.IZyHuizongService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 作业汇总
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ZyHuizongServiceImpl extends ServiceImpl<ZyHuizongMapper, ZyHuizong> implements IZyHuizongService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.demo.zyHuizongXiangxi.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.demo.zyHuizongXiangxi.entity.ZyHuizongXiangxi;
|
||||
import org.jeecg.modules.demo.zyHuizongXiangxi.service.IZyHuizongXiangxiService;
|
||||
|
||||
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: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="作业汇总详细")
|
||||
@RestController
|
||||
@RequestMapping("/zyHuizongXiangxi/zyHuizongXiangxi")
|
||||
@Slf4j
|
||||
public class ZyHuizongXiangxiController extends JeecgController<ZyHuizongXiangxi, IZyHuizongXiangxiService> {
|
||||
@Autowired
|
||||
private IZyHuizongXiangxiService zyHuizongXiangxiService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param zyHuizongXiangxi
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "作业汇总详细-分页列表查询")
|
||||
@ApiOperation(value="作业汇总详细-分页列表查询", notes="作业汇总详细-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ZyHuizongXiangxi>> queryPageList(ZyHuizongXiangxi zyHuizongXiangxi,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ZyHuizongXiangxi> queryWrapper = QueryGenerator.initQueryWrapper(zyHuizongXiangxi, req.getParameterMap());
|
||||
Page<ZyHuizongXiangxi> page = new Page<ZyHuizongXiangxi>(pageNo, pageSize);
|
||||
IPage<ZyHuizongXiangxi> pageList = zyHuizongXiangxiService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param zyHuizongXiangxi
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总详细-添加")
|
||||
@ApiOperation(value="作业汇总详细-添加", notes="作业汇总详细-添加")
|
||||
@RequiresPermissions("zyHuizongXiangxi:zy_huizong_xiangxi:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ZyHuizongXiangxi zyHuizongXiangxi) {
|
||||
zyHuizongXiangxiService.save(zyHuizongXiangxi);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param zyHuizongXiangxi
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总详细-编辑")
|
||||
@ApiOperation(value="作业汇总详细-编辑", notes="作业汇总详细-编辑")
|
||||
@RequiresPermissions("zyHuizongXiangxi:zy_huizong_xiangxi:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ZyHuizongXiangxi zyHuizongXiangxi) {
|
||||
zyHuizongXiangxiService.updateById(zyHuizongXiangxi);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总详细-通过id删除")
|
||||
@ApiOperation(value="作业汇总详细-通过id删除", notes="作业汇总详细-通过id删除")
|
||||
@RequiresPermissions("zyHuizongXiangxi:zy_huizong_xiangxi:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
zyHuizongXiangxiService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "作业汇总详细-批量删除")
|
||||
@ApiOperation(value="作业汇总详细-批量删除", notes="作业汇总详细-批量删除")
|
||||
@RequiresPermissions("zyHuizongXiangxi:zy_huizong_xiangxi:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.zyHuizongXiangxiService.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<ZyHuizongXiangxi> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ZyHuizongXiangxi zyHuizongXiangxi = zyHuizongXiangxiService.getById(id);
|
||||
if(zyHuizongXiangxi==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(zyHuizongXiangxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param zyHuizongXiangxi
|
||||
*/
|
||||
@RequiresPermissions("zyHuizongXiangxi:zy_huizong_xiangxi:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ZyHuizongXiangxi zyHuizongXiangxi) {
|
||||
return super.exportXls(request, zyHuizongXiangxi, ZyHuizongXiangxi.class, "作业汇总详细");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("zyHuizongXiangxi:zy_huizong_xiangxi:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ZyHuizongXiangxi.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
package org.jeecg.modules.demo.zyHuizongXiangxi.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: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("zy_huizong_xiangxi")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="zy_huizong_xiangxi对象", description="作业汇总详细")
|
||||
public class ZyHuizongXiangxi implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**学年续期*/
|
||||
@Excel(name = "学年续期", width = 15)
|
||||
@ApiModelProperty(value = "学年续期")
|
||||
private java.lang.String xnxq;
|
||||
/**学院编号*/
|
||||
@Excel(name = "学院编号", width = 15)
|
||||
@ApiModelProperty(value = "学院编号")
|
||||
private java.lang.String xybh;
|
||||
/**学院名称*/
|
||||
@Excel(name = "学院名称", width = 15)
|
||||
@ApiModelProperty(value = "学院名称")
|
||||
private java.lang.String xymc;
|
||||
/**任务编号*/
|
||||
@Excel(name = "任务编号", width = 15)
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
private java.lang.String rwbh;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**作业编号*/
|
||||
@Excel(name = "作业编号", width = 15)
|
||||
@ApiModelProperty(value = "作业编号")
|
||||
private java.lang.String zybh;
|
||||
/**作业名称*/
|
||||
@Excel(name = "作业名称", width = 15)
|
||||
@ApiModelProperty(value = "作业名称")
|
||||
private java.lang.String zymc;
|
||||
/**占比*/
|
||||
@Excel(name = "占比", width = 15)
|
||||
@ApiModelProperty(value = "占比")
|
||||
private java.lang.String qmzb;
|
||||
/**学生学号*/
|
||||
@Excel(name = "学生学号", width = 15)
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private java.lang.String xsxh;
|
||||
/**学生姓名*/
|
||||
@Excel(name = "学生姓名", width = 15)
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private java.lang.String xsxm;
|
||||
/**维普检测率*/
|
||||
@Excel(name = "维普检测率", width = 15)
|
||||
@ApiModelProperty(value = "维普检测率")
|
||||
private java.lang.String wpzyk;
|
||||
/**学校检测率*/
|
||||
@Excel(name = "学校检测率", width = 15)
|
||||
@ApiModelProperty(value = "学校检测率")
|
||||
private java.lang.String xxzyk;
|
||||
/**本次检测率*/
|
||||
@Excel(name = "本次检测率", width = 15)
|
||||
@ApiModelProperty(value = "本次检测率")
|
||||
private java.lang.String bczyk;
|
||||
/**aigc检测率*/
|
||||
@Excel(name = "aigc检测率", width = 15)
|
||||
@ApiModelProperty(value = "aigc检测率")
|
||||
private java.lang.String aigc;
|
||||
/**作业分数*/
|
||||
@Excel(name = "作业分数", width = 15)
|
||||
@ApiModelProperty(value = "作业分数")
|
||||
private java.lang.String zyfs;
|
||||
/**作业*/
|
||||
@Excel(name = "作业", width = 15)
|
||||
@ApiModelProperty(value = "作业")
|
||||
private java.lang.String filePath;
|
||||
/**pdf内容*/
|
||||
@Excel(name = "pdf内容", width = 15)
|
||||
@ApiModelProperty(value = "pdf内容")
|
||||
private java.lang.String pdfPath;
|
||||
/**发布时间*/
|
||||
@Excel(name = "发布时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@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 publishTime;
|
||||
/**是否上传考核*/
|
||||
@Excel(name = "是否上传考核", width = 15)
|
||||
@ApiModelProperty(value = "是否上传考核")
|
||||
private java.lang.String sfsckhcl;
|
||||
/**服务器附件地址*/
|
||||
@Excel(name = "服务器附件地址", width = 15)
|
||||
@ApiModelProperty(value = "服务器附件地址")
|
||||
private java.lang.String fwqPath;
|
||||
/**考核材料上传时间*/
|
||||
@Excel(name = "考核材料上传时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@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 khclTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.zyHuizongXiangxi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.zyHuizongXiangxi.entity.ZyHuizongXiangxi;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 作业汇总详细
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ZyHuizongXiangxiMapper extends BaseMapper<ZyHuizongXiangxi> {
|
||||
|
||||
}
|
||||
|
|
@ -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.zyHuizongXiangxi.mapper.ZyHuizongXiangxiMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.demo.zyHuizongXiangxi.service;
|
||||
|
||||
import org.jeecg.modules.demo.zyHuizongXiangxi.entity.ZyHuizongXiangxi;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 作业汇总详细
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IZyHuizongXiangxiService extends IService<ZyHuizongXiangxi> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.demo.zyHuizongXiangxi.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.zyHuizongXiangxi.entity.ZyHuizongXiangxi;
|
||||
import org.jeecg.modules.demo.zyHuizongXiangxi.mapper.ZyHuizongXiangxiMapper;
|
||||
import org.jeecg.modules.demo.zyHuizongXiangxi.service.IZyHuizongXiangxiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 作业汇总详细
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ZyHuizongXiangxiServiceImpl extends ServiceImpl<ZyHuizongXiangxiMapper, ZyHuizongXiangxi> implements IZyHuizongXiangxiService {
|
||||
|
||||
}
|
||||
|
|
@ -80,25 +80,25 @@ public class LoginController {
|
|||
return result.error500("该用户登录失败次数过多,请于10分钟后再次登录!");
|
||||
}
|
||||
|
||||
// step.1 验证码check
|
||||
String captcha = sysLoginModel.getCaptcha();
|
||||
if(captcha==null){
|
||||
result.error500("验证码无效");
|
||||
return result;
|
||||
}
|
||||
String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||
String origin = lowerCaseCaptcha+sysLoginModel.getCheckKey()+jeecgBaseConfig.getSignatureSecret();
|
||||
String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||
Object checkCode = redisUtil.get(realKey);
|
||||
//当进入登录页时,有一定几率出现验证码错误 #1714
|
||||
if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
|
||||
log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
|
||||
result.error500("验证码错误");
|
||||
// 改成特殊的code 便于前端判断
|
||||
result.setCode(HttpStatus.PRECONDITION_FAILED.value());
|
||||
return result;
|
||||
}
|
||||
// // step.1 验证码check
|
||||
// String captcha = sysLoginModel.getCaptcha();
|
||||
// if(captcha==null){
|
||||
// result.error500("验证码无效");
|
||||
// return result;
|
||||
// }
|
||||
// String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
// // 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||
// String origin = lowerCaseCaptcha+sysLoginModel.getCheckKey()+jeecgBaseConfig.getSignatureSecret();
|
||||
// String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||
// Object checkCode = redisUtil.get(realKey);
|
||||
// //当进入登录页时,有一定几率出现验证码错误 #1714
|
||||
// if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
|
||||
// log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
|
||||
// result.error500("验证码错误");
|
||||
// // 改成特殊的code 便于前端判断
|
||||
// result.setCode(HttpStatus.PRECONDITION_FAILED.value());
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// step.2 校验用户是否存在且有效
|
||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
@ -122,7 +122,7 @@ public class LoginController {
|
|||
userInfo(sysUser, result, request);
|
||||
|
||||
// step.5 登录成功删除验证码
|
||||
redisUtil.del(realKey);
|
||||
// redisUtil.del(realKey);
|
||||
redisUtil.del(CommonConstant.LOGIN_FAIL + username);
|
||||
|
||||
// step.6 记录用户登录日志
|
||||
|
|
@ -132,6 +132,33 @@ public class LoginController {
|
|||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation("登录接口")
|
||||
@RequestMapping(value = "/qhlogin", method = RequestMethod.POST)
|
||||
public Result<JSONObject> qhlogin(@RequestBody SysLoginModel sysLoginModel, HttpServletRequest request){
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
String username = sysLoginModel.getUsername();
|
||||
|
||||
// step.2 校验用户是否存在且有效
|
||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysUser::getUsername,username);
|
||||
SysUser sysUser = sysUserService.getOne(queryWrapper);
|
||||
result = sysUserService.checkUserIsEffective(sysUser);
|
||||
if(!result.isSuccess()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// step.4 登录成功获取用户信息
|
||||
userInfo(sysUser, result, request);
|
||||
|
||||
// step.5 登录成功删除验证码
|
||||
redisUtil.del(CommonConstant.LOGIN_FAIL + username);
|
||||
|
||||
// step.6 记录用户登录日志
|
||||
LoginUser loginUser = new LoginUser();
|
||||
BeanUtils.copyProperties(sysUser, loginUser);
|
||||
baseCommonService.addLog("切换成功,用户名: " + username + ",登录成功!", CommonConstant.LOG_TYPE_1, null,loginUser);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【vue3专用】获取用户信息
|
||||
|
|
|
|||
|
|
@ -161,16 +161,16 @@ spring:
|
|||
slow-sql-millis: 5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/dbsd_zjpt?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 多数据源配置
|
||||
#multi-datasource1:
|
||||
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
#username: root
|
||||
#password: root
|
||||
#driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
multi-datasource1:
|
||||
url: jdbc:mysql://localhost:3306/course_information_center_jeecg_db?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 0
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
VITE_PORT = 3100
|
||||
|
||||
# 网站标题
|
||||
VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台
|
||||
VITE_GLOB_APP_TITLE = 东北师大-专家督导平台
|
||||
|
||||
# 简称,此变量只能是字符/下划线
|
||||
VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro
|
||||
VITE_GLOB_APP_SHORT_NAME = 专家督导平台
|
||||
|
||||
# 单点登录服务端地址
|
||||
VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<div class="app-loading">
|
||||
<!-- <div class="app-loading">
|
||||
<div class="app-loading-wrap">
|
||||
<img src="/resource/img/logo.png" class="app-loading-logo" alt="Logo" />
|
||||
<div class="app-loading-dots">
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
</div>
|
||||
<div class="app-loading-title"><%= title %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<!-- 百度统计 -->
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import { createFakeUserList } from './user';
|
|||
const dashboardRoute = {
|
||||
path: '/dashboard',
|
||||
name: 'Dashboard',
|
||||
component: 'LAYOUT',
|
||||
component: 'RouteView',
|
||||
redirect: '/dashboard/analysis',
|
||||
meta: {
|
||||
title: 'routes.dashboard.dashboard',
|
||||
hideChildrenInMenu: true,
|
||||
hideChildrenInMenu: false,
|
||||
icon: 'bx:bx-home',
|
||||
},
|
||||
children: [
|
||||
|
|
@ -18,13 +18,13 @@ const dashboardRoute = {
|
|||
path: 'analysis',
|
||||
name: 'Analysis',
|
||||
component: '/dashboard/Analysis/index',
|
||||
meta: {
|
||||
hideMenu: true,
|
||||
hideBreadcrumb: true,
|
||||
title: 'routes.dashboard.analysis',
|
||||
currentActiveMenu: '/dashboard',
|
||||
icon: 'bx:bx-home',
|
||||
},
|
||||
// meta: {
|
||||
// hideMenu: true,
|
||||
// hideBreadcrumb: true,
|
||||
// title: 'routes.dashboard.analysis',
|
||||
// currentActiveMenu: '/dashboard',
|
||||
// icon: 'bx:bx-home',
|
||||
// },
|
||||
},
|
||||
{
|
||||
path: 'workbench',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
import { resultSuccess, resultError, getRequestToken, requestParams,baseUrl} from '../_util';
|
||||
import { MockMethod } from 'vite-plugin-mock';
|
||||
import { createFakeUserList } from './user';
|
||||
|
||||
// single
|
||||
const siteRoute = {
|
||||
path: '/site',
|
||||
name: 'site',
|
||||
component: 'RouteView',
|
||||
// component: 'RouteView',
|
||||
// component: 'LAYOUT',
|
||||
redirect: '/site/index',
|
||||
// meta: {
|
||||
// title: 'routes.dashboard.dashboard',
|
||||
// hideChildrenInMenu: false,
|
||||
// icon: 'bx:bx-home',
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'index',
|
||||
// name: 'index',
|
||||
// component: '/site/index',
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
|
||||
export default [
|
||||
{
|
||||
url: `${baseUrl}/sys/permission/getUserPermissionByToken`,
|
||||
timeout: 1000,
|
||||
method: 'get',
|
||||
response: (request: requestParams) => {
|
||||
const token = getRequestToken(request);
|
||||
if (!token) {
|
||||
return resultError('Invalid token!');
|
||||
}
|
||||
const checkUser = createFakeUserList().find((item) => item.token === token);
|
||||
if (!checkUser) {
|
||||
return resultError('Invalid user token!');
|
||||
}
|
||||
const id = checkUser.userId;
|
||||
let menu: Object[];
|
||||
siteRoute.redirect = siteRoute.path + '/' + siteRoute.children[0].path;
|
||||
menu = [dashboardRoute, authRoute, levelRoute, sysRoute, linkRoute];
|
||||
menu = [];
|
||||
|
||||
return resultSuccess(menu);
|
||||
},
|
||||
},
|
||||
] as MockMethod[];
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"ant-design-vue": "^4.1.2",
|
||||
"axios": "^1.6.7",
|
||||
"video.js": "^8.17.3",
|
||||
"china-area-data": "^5.0.1",
|
||||
"clipboard": "^2.0.11",
|
||||
"codemirror": "^5.65.3",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -4,7 +4,7 @@
|
|||
}
|
||||
|
||||
.aui-container {
|
||||
max-width: 1000px;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 4px 8px 1px rgba(0, 0, 0, 0.2);
|
||||
position: fixed;
|
||||
|
|
@ -45,8 +45,8 @@
|
|||
}
|
||||
|
||||
.aui-formBox {
|
||||
flex-basis: 40%;
|
||||
-webkit-flex-basis: 40%;
|
||||
flex-basis: 100%;
|
||||
-webkit-flex-basis: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 20px;
|
||||
background: #fff;
|
||||
|
|
@ -54,10 +54,8 @@
|
|||
}
|
||||
|
||||
.aui-logo {
|
||||
width: 180px;
|
||||
height: 80px;
|
||||
position: absolute;
|
||||
top: 2%;
|
||||
top: 8%;
|
||||
left: 8%;
|
||||
z-index: 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit" width="600px">
|
||||
<row>
|
||||
<a-col style="margin-top: 150px;"> <span style="margin-left: 50px;">账号:</span><a-input v-model:value="qhuserName" style="width:70%;"></a-input> </a-col>
|
||||
</row>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, unref } from 'vue';
|
||||
import { rules } from '/@/utils/helper/validator';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
||||
import { useForm } from '/@/components/Form/src/hooks/useForm';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useLocaleStore } from '/@/store/modules/locale';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useUserStoreWithOut } from '/@/store/modules/user';
|
||||
const $message = useMessage();
|
||||
|
||||
const localeStore = useLocaleStore();
|
||||
const { t } = useI18n();
|
||||
// 声明Emits
|
||||
const emit = defineEmits(['register']);
|
||||
const formRef = ref();
|
||||
const username = ref('');
|
||||
const qhuserName = ref('');
|
||||
// update-begin--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
const title = ref(t('layout.changePassword.dropdownItemZhanghao'));
|
||||
//表单配置
|
||||
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner();
|
||||
//表单提交事件
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
//提交表单
|
||||
let params = { username: qhuserName.value };
|
||||
console.log('🙄', params);
|
||||
await defHttp.post({ url: '/sys/qhlogin', params }, { isTransformResponse: false }).then((res) => {
|
||||
console.log('👩🦲', res);
|
||||
if (res.success) {
|
||||
$message.createMessage.success(res.message);
|
||||
|
||||
const userStore = useUserStoreWithOut();
|
||||
userStore.setToken(undefined);
|
||||
userStore.setToken(res.result.token);
|
||||
userStore.setUserInfo(res.result.userInfo);
|
||||
window.location.reload();
|
||||
//关闭弹窗
|
||||
closeModal();
|
||||
} else {
|
||||
$message.createMessage.warning(res.message);
|
||||
}
|
||||
});
|
||||
|
||||
// const { token, userInfo } = data;
|
||||
// // save token
|
||||
// this.setToken(token);
|
||||
// this.setTenant(userInfo.loginTenantId);
|
||||
// this.afterLoginAction(goHome, data);
|
||||
} finally {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
|
||||
async function show(name) {
|
||||
if (!name) {
|
||||
$message.createMessage.warning('当前系统无登录用户!');
|
||||
return;
|
||||
} else {
|
||||
username.value = name;
|
||||
await setModalProps({ visible: true });
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
title,
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
<MenuItem itemKey="password" :text="t('layout.header.dropdownItemSwitchPassword')" icon="ant-design:edit-outlined" />
|
||||
<MenuItem itemKey="depart" :text="t('layout.header.dropdownItemSwitchDepart')" icon="ant-design:cluster-outlined" />
|
||||
<MenuItem itemKey="cache" :text="t('layout.header.dropdownItemRefreshCache')" icon="ion:sync-outline" />
|
||||
<MenuItem itemKey="zhanghao" :text="t('layout.header.dropdownItemZhanghao')" icon="ion:sync-outline" />
|
||||
<!-- <MenuItem
|
||||
v-if="getUseLockPage"
|
||||
itemKey="lock"
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
<LockAction v-if="lockActionVisible" ref="lockActionRef" @register="register" />
|
||||
<DepartSelect ref="loginSelectRef" />
|
||||
<UpdatePassword v-if="passwordVisible" ref="updatePasswordRef" />
|
||||
<Qiehuanzhanghao ref="qiehuanzhanghaoRef" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
// components
|
||||
|
|
@ -57,6 +59,7 @@
|
|||
import { removeAuthCache, setAuthCache } from '/src/utils/auth';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { getRefPromise } from '/@/utils/index';
|
||||
import Qiehuanzhanghao from './Qiehuanzhanghao.vue';
|
||||
|
||||
type MenuEvent = 'logout' | 'doc' | 'lock' | 'cache' | 'depart';
|
||||
const { createMessage } = useMessage();
|
||||
|
|
@ -70,6 +73,7 @@
|
|||
LockAction: createAsyncComponent(() => import('../lock/LockModal.vue')),
|
||||
DepartSelect: createAsyncComponent(() => import('./DepartSelect.vue')),
|
||||
UpdatePassword: createAsyncComponent(() => import('./UpdatePassword.vue')),
|
||||
Qiehuanzhanghao: createAsyncComponent(() => import('./Qiehuanzhanghao.vue')),
|
||||
},
|
||||
props: {
|
||||
theme: propTypes.oneOf(['dark', 'light']),
|
||||
|
|
@ -141,12 +145,21 @@
|
|||
}
|
||||
// 修改密码
|
||||
const updatePasswordRef = ref();
|
||||
// 切换账号
|
||||
const qiehuanzhanghaoRef = ref();
|
||||
// update-begin--author:liaozhiyang---date:20230901---for:【QQYUN-6333】空路由问题—首次访问资源太大
|
||||
async function updatePassword() {
|
||||
passwordVisible.value = true;
|
||||
await getRefPromise(updatePasswordRef);
|
||||
updatePasswordRef.value.show(userStore.getUserInfo.username);
|
||||
}
|
||||
|
||||
function qiehuanzhanghao(){
|
||||
console.log('切换账号');
|
||||
qiehuanzhanghaoRef.value.title = "切换账号";
|
||||
qiehuanzhanghaoRef.value.show(userStore.getUserInfo.username);
|
||||
}
|
||||
|
||||
// update-end--author:liaozhiyang---date:20230901---for:【QQYUN-6333】空路由问题—首次访问资源太大
|
||||
function handleMenuClick(e: { key: MenuEvent }) {
|
||||
switch (e.key) {
|
||||
|
|
@ -165,6 +178,9 @@
|
|||
case 'depart':
|
||||
updateCurrentDepart();
|
||||
break;
|
||||
case 'zhanghao':
|
||||
qiehuanzhanghao();
|
||||
break;
|
||||
case 'password':
|
||||
updatePassword();
|
||||
break;
|
||||
|
|
@ -187,6 +203,7 @@
|
|||
getUseLockPage,
|
||||
loginSelectRef,
|
||||
updatePasswordRef,
|
||||
qiehuanzhanghaoRef,
|
||||
passwordVisible,
|
||||
lockActionVisible,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,17 +23,17 @@
|
|||
|
||||
<!-- action -->
|
||||
<div :class="`${prefixCls}-action`">
|
||||
<AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" />
|
||||
<!-- <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" /> -->
|
||||
|
||||
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
|
||||
<!-- <ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" /> -->
|
||||
|
||||
<Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />
|
||||
|
||||
<FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" />
|
||||
|
||||
<LockScreen v-if="getUseLockPage" />
|
||||
<!-- <LockScreen v-if="getUseLockPage" /> -->
|
||||
|
||||
<AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" />
|
||||
<!-- <AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" /> -->
|
||||
|
||||
<UserDropDown :theme="getHeaderTheme" />
|
||||
|
||||
|
|
@ -257,4 +257,9 @@
|
|||
}
|
||||
//update-end---author:scott ---date::2022-09-30 for:默认隐藏顶部菜单面包屑--------------
|
||||
}
|
||||
.jeecg-layout-header-action {
|
||||
display: flex;
|
||||
min-width: 140px;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@
|
|||
<!-- 列表页全屏
|
||||
<FoldButton v-if="getShowFold" />-->
|
||||
<!-- <FullscreenOutlined /> -->
|
||||
<router-link to="/ai" class="ai-icon">
|
||||
<!-- <router-link to="/ai" class="ai-icon">
|
||||
<a-tooltip title="AI助手" placement="left">
|
||||
<svg t="1706259688149" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2056" width="17" height="17">
|
||||
<path d="M826.368 325.632c0-7.168 2.048-10.24 10.24-10.24h123.904c7.168 0 10.24 2.048 10.24 10.24v621.568c0 7.168-2.048 10.24-10.24 10.24h-122.88c-8.192 0-10.24-4.096-10.24-10.24l-1.024-621.568z m-8.192-178.176c0-50.176 35.84-79.872 79.872-79.872 48.128 0 79.872 32.768 79.872 79.872 0 52.224-33.792 79.872-81.92 79.872-46.08 1.024-77.824-27.648-77.824-79.872zM462.848 584.704C441.344 497.664 389.12 307.2 368.64 215.04h-2.048c-16.384 92.16-58.368 247.808-92.16 369.664h188.416zM243.712 712.704l-62.464 236.544c-2.048 7.168-4.096 8.192-12.288 8.192H54.272c-8.192 0-10.24-2.048-8.192-12.288l224.256-783.36c4.096-13.312 7.168-26.624 8.192-65.536 0-6.144 2.048-8.192 7.168-8.192H450.56c6.144 0 8.192 2.048 10.24 8.192l250.88 849.92c2.048 7.168 0 10.24-7.168 10.24H573.44c-7.168 0-10.24-2.048-12.288-7.168l-65.536-236.544c1.024 1.024-251.904 0-251.904 0z" fill="#333333" p-id="19816"></path>
|
||||
</svg>
|
||||
</a-tooltip>
|
||||
</router-link>
|
||||
</router-link> -->
|
||||
</template>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ export default {
|
|||
dropdownItemSwitchDepart: '切换部门',
|
||||
dropdownItemRefreshCache: '刷新缓存',
|
||||
dropdownItemSwitchAccount: '账户设置',
|
||||
dropdownItemZhanghao: '切换账号',
|
||||
|
||||
// tooltip
|
||||
tooltipErrorLog: '错误日志',
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue