修改bug添加白名单功能

This commit is contained in:
yangjun 2024-03-26 18:31:23 +08:00
parent ec498256c1
commit fde032f491
34 changed files with 1565 additions and 8 deletions

View File

@ -112,6 +112,16 @@ public class SyncKcktStat extends BaseSync {
//-----------------所有的数据都变成无效 20240321------------
KcKechengbiao kcbAll = new KcKechengbiao();
kcbAll.setXnxq(kcSysConfig.getFlag1());
kcKechengbiaoService.updateAllFlag(kcbAll);//所有的数据都变成无效
kcKechengbiaoService.updateYxByXxhbkckb(kcbAll);//根据条件变成有效数据
//-----------------所有的数据都变成无效 20240321------------
//------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
KcKechengbiao ktbExculde = new KcKechengbiao();
ktbExculde.setXnxq(kcSysConfig.getFlag1());

View File

@ -0,0 +1,211 @@
package org.jeecg.modules.kc.grab.SynchronizationService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
import org.jeecg.modules.kc.kcKetangbiaoSkrqLog.entity.KcKetangbiaoSkrqLog;
import org.jeecg.modules.kc.kcKetangbiaoSkrqLog.service.IKcKetangbiaoSkrqLogService;
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
import org.jeecg.modules.kc.kcXqxnHistory.service.IKcXqxnHistoryService;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoHisService;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoHisService;
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
import org.quartz.JobExecutionContext;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
/**
* 更具原始数据表初始化课程表
*/
@Slf4j
public class SyncKcktStatCopy extends BaseSync {
@Autowired
private IKcKechengbiaoService kcKechengbiaoService;
@Autowired
private IKcSysConfigService kcSysConfigService;
@Autowired
private IKcKechengbiaoHisService kcKechengbiaoHisService;
@Autowired
private IKcKetangbiaoService kcKetangbiaoService;
@Autowired
private IKcKetangbiaoHisService kcKetangbiaoHisService;
@Autowired
private IKcXqxnHistoryService kcXqxnHistoryService;
@Autowired
private IKcKetangbiaoSkrqLogService kcKetangbiaoSkrqLogService;
@Override
public void execute(JobExecutionContext jobExecutionContext) {
start();
run(getParamMap());
end();
}
/**
* 有参定时任务实现
* @param param
*/
public void run(Map<String, Object> param){
try {
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
Date dateNow = new Date();
//-----------------修改课程表数据------------------------
KcKechengbiao kcKechengbiao = new KcKechengbiao();
kcKechengbiao.setXqxn(kcSysConfig.getFlag1());
// kcKechengbiao.setSkjs("刘婷");
List<KcKechengbiao> kckblist = kcKechengbiaoService.getKechengbiaoList(kcKechengbiao);
for(KcKechengbiao KcKechengbiaoPar:kckblist){
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
kcKechengbiaoQueryWrapper.eq("kcbh",KcKechengbiaoPar.getKcbh());
kcKechengbiaoQueryWrapper.eq("kcmc",KcKechengbiaoPar.getKcmc());
kcKechengbiaoQueryWrapper.eq("jgh",KcKechengbiaoPar.getJgh());
kcKechengbiaoQueryWrapper.eq("skjs",KcKechengbiaoPar.getSkjs());
kcKechengbiaoQueryWrapper.eq("rwbh",KcKechengbiaoPar.getRwbh());
kcKechengbiaoQueryWrapper.eq("kkdwid",KcKechengbiaoPar.getKkdwid());
kcKechengbiaoQueryWrapper.eq("kcxz",KcKechengbiaoPar.getKcxz());
// kcKechengbiaoQueryWrapper.eq("skdd",KcKechengbiaoPar.getSkdd());
kcKechengbiaoQueryWrapper.eq("sksj",KcKechengbiaoPar.getSksj());
kcKechengbiaoQueryWrapper.eq("jkzc",KcKechengbiaoPar.getJkzc());
kcKechengbiaoQueryWrapper.eq("xf",KcKechengbiaoPar.getXf());
kcKechengbiaoQueryWrapper.eq("xnxq",KcKechengbiaoPar.getXnxq());
kcKechengbiaoQueryWrapper.eq("kcdl",KcKechengbiaoPar.getKcdl());
List<KcKechengbiao> KcKechengbiaoInsList = kcKechengbiaoService.list(kcKechengbiaoQueryWrapper);
if(KcKechengbiaoInsList!=null&&KcKechengbiaoInsList.size()>0){
for(KcKechengbiao KcKechengbiao : KcKechengbiaoInsList){
String id = KcKechengbiao.getId();
BeanUtils.copyProperties(KcKechengbiaoPar,KcKechengbiao);
KcKechengbiao.setId(id);
kcKechengbiaoService.updateById(KcKechengbiao);
}
}else{
kcKechengbiaoService.saveOne(KcKechengbiaoPar);
}
}
//-----------------初始化数据------------------------
//------------------去除课程表重复数据 20231024新增-----------------
KcKechengbiao KcKechengbiao = new KcKechengbiao();
KcKechengbiao.setXqxn(kcSysConfig.getFlag1());
kcKechengbiaoService.removeCfsj(KcKechengbiao);
//------------------去除课程表重复数据 20231024新增-----------------
//-----------------所有的数据都变成无效 20240321------------
// KcKechengbiao kcbAll = new KcKechengbiao();
// kcbAll.setXnxq(kcSysConfig.getFlag1());
// kcKechengbiaoService.updateAllFlag(kcbAll);//所有的数据都变成无效
// kcKechengbiaoService.updateYxByXxhbkckb(kcbAll);//根据条件变成有效数据
//-----------------所有的数据都变成无效 20240321------------
//------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
KcKechengbiao ktbExculde = new KcKechengbiao();
ktbExculde.setXnxq(kcSysConfig.getFlag1());
kcKechengbiaoService.updateKechengExculde(ktbExculde);
//------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
//-------------------删除本年的课程数据冰倩是当天及以后的----------------------
QueryWrapper<KcKetangbiao> KcKetangbiaoQueryWrapper = new QueryWrapper<>();
KcKetangbiaoQueryWrapper.eq("xnxq",kcSysConfig.getFlag1());
KcKetangbiaoQueryWrapper.ge("skrq",DateUtils.formatDate(dateNow,"yyyy-MM-dd"));
kcKetangbiaoService.remove(KcKetangbiaoQueryWrapper);
//-------------------删除本年的课程数据冰倩是当天及以后的----------------------
String bxqkssj = kcSysConfig.getBxqkssj();
//插入数据
KcKetangbiao kcKetangbiao = new KcKetangbiao();
kcKetangbiao.setXnxq(kcSysConfig.getFlag1());
kcKetangbiao.setFlag("0");
List<KcKetangbiao> list = kcKetangbiaoService.selectSyncList(kcKetangbiao);
List<KcKetangbiao> arrayList = new ArrayList<>();
for(int i=0;i<list.size();i++){
KcKetangbiao kcKetangbiaoOld = list.get(i);
try {
String jkzc[] = kcKetangbiaoOld.getJkzc().split(",");
String week = kcKetangbiaoOld.getWeek();
for(int j=0;j<jkzc.length;j++){
KcKetangbiao kcKetangbiaoAddNew = new KcKetangbiao();
int djz = Integer.parseInt(jkzc[j]);
BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
kcKetangbiaoAddNew.setId(null);
//skrq 生成规则取本学开始时间kc_sys_config.bxqkssj+(jkzc-1)*7+week
int addSj = (djz -1 )*7+Integer.parseInt(week)-1;
Date date = DateUtils.parseDate(bxqkssj,"yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.setTime(date);
c.add(Calendar.DAY_OF_MONTH, addSj);
String skrq = DateUtils.formatDate(c,"yyyy-MM-dd");
String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
//判断生成数据的skrq是否大于等于当前日期如果满足则进行新增否则不动
if(DateUtils.parseDate(skrq,"yyyy-MM-dd").getTime()>=DateUtils.parseDate(dasj,"yyyy-MM-dd").getTime()){
kcKetangbiaoAddNew.setSkrq(skrq);
kcKetangbiaoAddNew.setDijizhou(djz);
kcKetangbiaoAddNew.setXnxq(kcSysConfig.getFlag1());
arrayList.add(kcKetangbiaoAddNew);
}
}
}catch (Exception e){
e.printStackTrace();
}
}
kcKetangbiaoService.saveBatch(arrayList);
//修改智慧教室关联的课堂表id-- 清洗智慧教室数据
kcKetangbiaoService.updateJsbh();
//修改智慧教室关联的课堂表id-- 清洗智慧教室数据
KcKetangbiao kcKetangbiaoup = new KcKetangbiao();
kcKetangbiaoup.setSkxs(1);
kcKetangbiaoup.setXnxq(kcSysConfig.getFlag1());
kcKetangbiaoService.updateSkxs(kcKetangbiaoup);
//修改调停课时间
String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
QueryWrapper<KcKetangbiaoSkrqLog> kcKetangbiaoSkrqLogQueryWrapper = new QueryWrapper<>();
kcKetangbiaoSkrqLogQueryWrapper.ge("jsrq",dasj);
List<KcKetangbiaoSkrqLog> list1 = kcKetangbiaoSkrqLogService.list(kcKetangbiaoSkrqLogQueryWrapper);
for(KcKetangbiaoSkrqLog KcKetangbiaoSkrqLog:list1){
UpdateWrapper<KcKetangbiao> KcKetangbiaoUpdateWrapper = new UpdateWrapper<>();
KcKetangbiaoUpdateWrapper.set("skrq",KcKetangbiaoSkrqLog.getTzrq());
KcKetangbiaoUpdateWrapper.eq("skrq",KcKetangbiaoSkrqLog.getSkrq());
kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper);
}
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 无参定时任务实现
*/
public void run(){
run(null);
}
}

View File

@ -1,17 +1,27 @@
package org.jeecg.modules.kc.grab.SynchronizationService;
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.apache.commons.lang3.StringUtils;
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
import org.jeecg.modules.kc.grab.exports.entity.TJwKckb;
import org.jeecg.modules.kc.grab.exports.service.ITJwKckbService;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
import org.jeecg.modules.kc.grab.imports.service.IXxhbkckbService;
import org.jeecg.modules.kc.kcJieci.entity.KcJieci;
import org.jeecg.modules.kc.kcJieci.service.IKcJieciService;
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra;
import org.jeecg.modules.kc.xxhbkckbOra.service.IXxhbkckbOraService;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -23,7 +33,14 @@ public class SyncTJwKckb extends BaseSync {
@Autowired
private IXxhbkckbService impService;
@Autowired
private IXxhbkckbOraService xxhbkckbOraService;
@Autowired
private IKcJieciPipeiService kcJieciPipeiService;
@Autowired
private IKcJieciService kcJieciService;
/**
* 若参数变量名修改 QuartzJobController中也需对应修改
*/
@ -43,21 +60,71 @@ public class SyncTJwKckb extends BaseSync {
public void run(Map<String, Object> param){
//查询数据
List<TJwKckb> inDataList = expService.list();
List<Xxhbkckb> outDataList = Lists.newArrayList();
List<XxhbkckbOra> outDataList = Lists.newArrayList();
//清洗数据
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbkckb.class)));
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, XxhbkckbOra.class)));
//保存到胃
try {
xxhbkckbOraService.syncList(outDataList);
}catch (Exception e){
e.printStackTrace();
}
//查询异常的节次数据
List<XxhbkckbOra> oraList = xxhbkckbOraService.getSksjList();
List<KcJieciPipei> kcJieciPipeiList = new ArrayList<>();
for(int i=0;i<oraList.size();i++){
KcJieciPipei par = new KcJieciPipei();
par.setExpCol(oraList.get(i).getSksj());
kcJieciPipeiList.add(par);
}
//不为空则插入数据
if(kcJieciPipeiList != null){
kcJieciPipeiService.saveBatch(kcJieciPipeiList);
}
//查询全部ora数据
List<XxhbkckbOra> list = xxhbkckbOraService.list();
List<Xxhbkckb> importDataList = Lists.newArrayList();
for(XxhbkckbOra par:list){
String sksjArr = par.getSksj();//获取授课事件结合例如7010203040506070809101112
if(StringUtils.isEmpty(sksjArr)){
continue;
}
String week = sksjArr.substring(0,1);//获取周几上课例如7
String sksj = sksjArr.substring(1,sksjArr.length());//获取具体的上课节次例如010203040506070809101112
QueryWrapper<KcJieciPipei> kcJieciPipeiQueryWrapper = new QueryWrapper<>();
kcJieciPipeiQueryWrapper.eq("exp_col",sksj);
kcJieciPipeiQueryWrapper.last("limit 1");
KcJieciPipei kcJieciPipei = kcJieciPipeiService.getOne(kcJieciPipeiQueryWrapper);//根据当前节次获取对应的正确节次数据
//组装拆分后的数据封装到xxhbkckb表中
if(kcJieciPipei != null && StringUtils.isNotBlank(kcJieciPipei.getNorCol())){
String norCol[] = StringUtils.split(kcJieciPipei.getNorCol(),"|");
for(String nor : norCol){
Xxhbkckb xxhbkckb = new Xxhbkckb();
BeanUtil.copyProperties(par,xxhbkckb);
xxhbkckb.setId(null);
xxhbkckb.setSksj(week+nor);
importDataList.add(xxhbkckb);
}
}
}
//保存到胃
int syncnum=0;
String errorMessage = "";
try {
impService.syncList(outDataList);
QueryWrapper dqw = new QueryWrapper();
impService.remove(dqw);
impService.syncList(importDataList);
syncnum = outDataList.size();
}catch (Exception e){
e.printStackTrace();
errorMessage = e.getMessage();
}
Xxhbkckb Xxhbkckb = impService.getSumnum();
int mysqlnum=Xxhbkckb.getMysqlnum();
Xxhbsynclog xxhbsynclog = new Xxhbsynclog();

View File

@ -0,0 +1,81 @@
package org.jeecg.modules.kc.grab.SynchronizationService;
import cn.hutool.core.bean.BeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
import org.jeecg.modules.kc.grab.exports.entity.TJwKckb;
import org.jeecg.modules.kc.grab.exports.service.ITJwKckbService;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
import org.jeecg.modules.kc.grab.imports.service.IXxhbkckbService;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Map;
@Slf4j
public class SyncTJwKckbCopy extends BaseSync {
@Autowired
private ITJwKckbService expService;
@Autowired
private IXxhbkckbService impService;
/**
* 若参数变量名修改 QuartzJobController中也需对应修改
*/
@Override
public void execute(JobExecutionContext jobExecutionContext) {
start();
run(getParamMap());
end();
}
/**
* 有参定时任务实现
* @param param
*/
public void run(Map<String, Object> param){
//查询数据
List<TJwKckb> inDataList = expService.list();
List<Xxhbkckb> outDataList = Lists.newArrayList();
//清洗数据
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbkckb.class)));
//保存到胃
int syncnum=0;
String errorMessage = "";
try {
impService.syncList(outDataList);
syncnum = outDataList.size();
}catch (Exception e){
e.printStackTrace();
errorMessage = e.getMessage();
}
Xxhbkckb Xxhbkckb = impService.getSumnum();
int mysqlnum=Xxhbkckb.getMysqlnum();
Xxhbsynclog xxhbsynclog = new Xxhbsynclog();
xxhbsynclog.setSyncRowNum(String.valueOf(outDataList.size()));
xxhbsynclog.setOratabname("T_JW_KCKB");//oracle表名
xxhbsynclog.setOratabnum(inDataList.size());//oracle表数量
xxhbsynclog.setTablenum(mysqlnum);//mysql表数量
xxhbsynclog.setSyncnum(syncnum);//本次同步数据量
xxhbsynclog.setSynctype("0");//同步类型 0全量 1增量
xxhbsynclog.setErrormessage(errorMessage);
saveLog(xxhbsynclog, Xxhbkckb.class);
}
/**
* 无参定时任务实现
*/
public void run(){
run(null);
}
}

View File

@ -0,0 +1,176 @@
package org.jeecg.modules.kc.kcJieciPipei.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
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-03-21
* @Version: V1.0
*/
@Api(tags="节次匹配数据")
@RestController
@RequestMapping("/kcJieciPipei/kcJieciPipei")
@Slf4j
public class KcJieciPipeiController extends JeecgController<KcJieciPipei, IKcJieciPipeiService> {
@Autowired
private IKcJieciPipeiService kcJieciPipeiService;
/**
* 分页列表查询
*
* @param kcJieciPipei
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "节次匹配数据-分页列表查询")
@ApiOperation(value="节次匹配数据-分页列表查询", notes="节次匹配数据-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<KcJieciPipei>> queryPageList(KcJieciPipei kcJieciPipei,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcJieciPipei> queryWrapper = QueryGenerator.initQueryWrapper(kcJieciPipei, req.getParameterMap());
Page<KcJieciPipei> page = new Page<KcJieciPipei>(pageNo, pageSize);
IPage<KcJieciPipei> pageList = kcJieciPipeiService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param kcJieciPipei
* @return
*/
@AutoLog(value = "节次匹配数据-添加")
@ApiOperation(value="节次匹配数据-添加", notes="节次匹配数据-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody KcJieciPipei kcJieciPipei) {
kcJieciPipeiService.save(kcJieciPipei);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param kcJieciPipei
* @return
*/
@AutoLog(value = "节次匹配数据-编辑")
@ApiOperation(value="节次匹配数据-编辑", notes="节次匹配数据-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody KcJieciPipei kcJieciPipei) {
kcJieciPipeiService.updateById(kcJieciPipei);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "节次匹配数据-通过id删除")
@ApiOperation(value="节次匹配数据-通过id删除", notes="节次匹配数据-通过id删除")
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
kcJieciPipeiService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "节次匹配数据-批量删除")
@ApiOperation(value="节次匹配数据-批量删除", notes="节次匹配数据-批量删除")
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.kcJieciPipeiService.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<KcJieciPipei> queryById(@RequestParam(name="id",required=true) String id) {
KcJieciPipei kcJieciPipei = kcJieciPipeiService.getById(id);
if(kcJieciPipei==null) {
return Result.error("未找到对应数据");
}
return Result.OK(kcJieciPipei);
}
/**
* 导出excel
*
* @param request
* @param kcJieciPipei
*/
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, KcJieciPipei kcJieciPipei) {
return super.exportXls(request, kcJieciPipei, KcJieciPipei.class, "节次匹配数据");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, KcJieciPipei.class);
}
}

View File

@ -0,0 +1,63 @@
package org.jeecg.modules.kc.kcJieciPipei.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-03-21
* @Version: V1.0
*/
@Data
@TableName("kc_jieci_pipei")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="kc_jieci_pipei对象", description="节次匹配数据")
public class KcJieciPipei 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")
@DateTimeFormat(pattern="yyyy-MM-dd")
@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")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
/**异常数据*/
@Excel(name = "异常数据", width = 15)
@ApiModelProperty(value = "异常数据")
private java.lang.String expCol;
/**正确数据*/
@Excel(name = "正确数据", width = 15)
@ApiModelProperty(value = "正确数据")
private java.lang.String norCol;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.kc.kcJieciPipei.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 节次匹配数据
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
public interface KcJieciPipeiMapper extends BaseMapper<KcJieciPipei> {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.kcJieciPipei.mapper.KcJieciPipeiMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.kc.kcJieciPipei.service;
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 节次匹配数据
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
public interface IKcJieciPipeiService extends IService<KcJieciPipei> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.kc.kcJieciPipei.service.impl;
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
import org.jeecg.modules.kc.kcJieciPipei.mapper.KcJieciPipeiMapper;
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 节次匹配数据
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
@Service
public class KcJieciPipeiServiceImpl extends ServiceImpl<KcJieciPipeiMapper, KcJieciPipei> implements IKcJieciPipeiService {
}

View File

@ -0,0 +1,176 @@
package org.jeecg.modules.kc.kcKechengExclude.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
import org.jeecg.modules.kc.kcKechengExclude.service.IKcKechengExcludeService;
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-03-21
* @Version: V1.0
*/
@Api(tags="课程刨除数据")
@RestController
@RequestMapping("/kcKechengExclude/kcKechengExclude")
@Slf4j
public class KcKechengExcludeController extends JeecgController<KcKechengExclude, IKcKechengExcludeService> {
@Autowired
private IKcKechengExcludeService kcKechengExcludeService;
/**
* 分页列表查询
*
* @param kcKechengExclude
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "课程刨除数据-分页列表查询")
@ApiOperation(value="课程刨除数据-分页列表查询", notes="课程刨除数据-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<KcKechengExclude>> queryPageList(KcKechengExclude kcKechengExclude,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcKechengExclude> queryWrapper = QueryGenerator.initQueryWrapper(kcKechengExclude, req.getParameterMap());
Page<KcKechengExclude> page = new Page<KcKechengExclude>(pageNo, pageSize);
IPage<KcKechengExclude> pageList = kcKechengExcludeService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param kcKechengExclude
* @return
*/
@AutoLog(value = "课程刨除数据-添加")
@ApiOperation(value="课程刨除数据-添加", notes="课程刨除数据-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody KcKechengExclude kcKechengExclude) {
kcKechengExcludeService.save(kcKechengExclude);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param kcKechengExclude
* @return
*/
@AutoLog(value = "课程刨除数据-编辑")
@ApiOperation(value="课程刨除数据-编辑", notes="课程刨除数据-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody KcKechengExclude kcKechengExclude) {
kcKechengExcludeService.updateById(kcKechengExclude);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "课程刨除数据-通过id删除")
@ApiOperation(value="课程刨除数据-通过id删除", notes="课程刨除数据-通过id删除")
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
kcKechengExcludeService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "课程刨除数据-批量删除")
@ApiOperation(value="课程刨除数据-批量删除", notes="课程刨除数据-批量删除")
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.kcKechengExcludeService.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<KcKechengExclude> queryById(@RequestParam(name="id",required=true) String id) {
KcKechengExclude kcKechengExclude = kcKechengExcludeService.getById(id);
if(kcKechengExclude==null) {
return Result.error("未找到对应数据");
}
return Result.OK(kcKechengExclude);
}
/**
* 导出excel
*
* @param request
* @param kcKechengExclude
*/
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, KcKechengExclude kcKechengExclude) {
return super.exportXls(request, kcKechengExclude, KcKechengExclude.class, "课程刨除数据");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, KcKechengExclude.class);
}
}

View File

@ -0,0 +1,87 @@
package org.jeecg.modules.kc.kcKechengExclude.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-03-21
* @Version: V1.0
*/
@Data
@TableName("kc_kecheng_exclude")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="kc_kecheng_exclude对象", description="课程刨除数据")
public class KcKechengExclude implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**课程名称*/
@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 kkdw;
/**课程性质*/
@Excel(name = "课程性质", width = 15)
@ApiModelProperty(value = "课程性质")
private java.lang.String kcxz;
/**上课地点*/
@Excel(name = "上课地点", width = 15)
@ApiModelProperty(value = "上课地点")
private java.lang.String skdd;
/**授课时间*/
@Excel(name = "授课时间", width = 15)
@ApiModelProperty(value = "授课时间")
private java.lang.String sksj;
/**授课周次*/
@Excel(name = "授课周次", width = 15)
@ApiModelProperty(value = "授课周次")
private java.lang.String jkzc;
/**学年学期【orcl】*/
@Excel(name = "学年学期【orcl】", width = 15)
@ApiModelProperty(value = "学年学期【orcl】")
private java.lang.String xnxq;
/**课程大类*/
@Excel(name = "课程大类", width = 15)
@ApiModelProperty(value = "课程大类")
private java.lang.String kcdl;
/**是否前台展示*/
@Excel(name = "是否前台展示", width = 15)
@ApiModelProperty(value = "是否前台展示")
private java.lang.String sfqtzs;
/**学年学期【系统自用】*/
@Excel(name = "学年学期【系统自用】", width = 15)
@ApiModelProperty(value = "学年学期【系统自用】")
private java.lang.String xqxn;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.kc.kcKechengExclude.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 课程刨除数据
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
public interface KcKechengExcludeMapper extends BaseMapper<KcKechengExclude> {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.kcKechengExclude.mapper.KcKechengExcludeMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.kc.kcKechengExclude.service;
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 课程刨除数据
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
public interface IKcKechengExcludeService extends IService<KcKechengExclude> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.kc.kcKechengExclude.service.impl;
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
import org.jeecg.modules.kc.kcKechengExclude.mapper.KcKechengExcludeMapper;
import org.jeecg.modules.kc.kcKechengExclude.service.IKcKechengExcludeService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 课程刨除数据
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
@Service
public class KcKechengExcludeServiceImpl extends ServiceImpl<KcKechengExcludeMapper, KcKechengExclude> implements IKcKechengExcludeService {
}

View File

@ -101,6 +101,10 @@ public class KcSysConfig implements Serializable {
@Excel(name = "今日课堂-说明文字", width = 15)
@ApiModelProperty(value = "今日课堂-说明文字")
private java.lang.String jrktTitle;
/**今日课堂-说明文字*/
@Excel(name = "白名单-说明文字", width = 15)
@ApiModelProperty(value = "白名单-说明文字")
private java.lang.String bmdTitle;
/**智慧教室播放错误提示文字*/
@Excel(name = "智慧教室播放错误提示文字", width = 15)
@ApiModelProperty(value = "智慧教室播放错误提示文字")

View File

@ -66,4 +66,15 @@ public class KcTingkeBmd implements Serializable {
@Excel(name = "学年学期", width = 15)
@ApiModelProperty(value = "学年学期")
private java.lang.String xnxq;
/**kssj*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "kssj")
private Date kssj;
/**jssj*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "jssj")
private Date jssj;
}

View File

@ -80,4 +80,8 @@ public class KcTingkeBmdKcxx implements Serializable {
@Excel(name = "教工号", width = 15)
@ApiModelProperty(value = "教工号")
private java.lang.String jgh;
/**开课单位*/
@Excel(name = "开课单位", width = 15)
@ApiModelProperty(value = "开课单位")
private java.lang.String kkdw;
}

View File

@ -63,6 +63,17 @@ public class KcTingkeBmdPage {
@ApiModelProperty(value = "学年学期")
private java.lang.String xnxq;
/**kssj*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "kssj")
private Date kssj;
/**jssj*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "jssj")
private Date jssj;
@ExcelCollection(name="分配的课程")
@ApiModelProperty(value = "分配的课程")
private List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList;

View File

@ -238,6 +238,7 @@ public class KcKechengbiao implements Serializable {
private java.lang.String kcdl;
private java.lang.String szkc;//思政课程
private String xqxn;
private String flag;
/**课程名称或教师名*/
@TableField(exist = false)

View File

@ -35,4 +35,8 @@ public interface KcKechengbiaoMapper extends BaseMapper<KcKechengbiao> {
void removeCfsj(KcKechengbiao kcKechengbiao);
void updateKechengExculde(KcKechengbiao ktbExculde);
void updateAllFlag(KcKechengbiao kcKechengbiao);
void updateYxByXxhbkckb(KcKechengbiao kcbAll);
}

View File

@ -118,4 +118,22 @@
and ifnull(replace(kc.jkzc,',',''),'a')=ifnull(replace(kce.jkzc,',',''),'a')
and ifnull(kc.xnxq,'a') = ifnull(kce.xnxq,'a')
</update>
<update id="updateAllFlag">
update kc_kechengbiao kc
set kc.flag = '1'
where kc.xqxn = #{xnxq}
</update>
<update id="updateYxByXxhbkckb">
update xxhbkckb a,kc_kechengbiao b
set b.flag = '0'
where 1=1
and a.kcbh = b.kcbh
and a.xm = b.skjs
and a.KKDW = b.kkdw
and a.skdd = b.skdd
and a.sksj = b.sksj
and a.XNXQ = b.xnxq
and b.jkzc = substring(a.jkzc,2,length(a.jkzc)-2)
and a.XNXQ = b.xnxq
</update>
</mapper>

View File

@ -35,7 +35,9 @@
<select id="getKclblist" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao" resultType="org.jeecg.modules.kc.ktgl.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.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
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.id = yy.ketangbiaoid
LEFT JOIN (SELECT DISTINCT jsbh, jsmc from kc_zhihuijiaoshi where sfyx=0) js on ktb.jsbh = js.jsbh

View File

@ -33,4 +33,8 @@ public interface IKcKechengbiaoService extends IService<KcKechengbiao> {
void removeCfsj(KcKechengbiao kcKechengbiao);
void updateKechengExculde(KcKechengbiao ktbExculde);
void updateAllFlag(KcKechengbiao kcKechengbiao);
void updateYxByXxhbkckb(KcKechengbiao kcbAll);
}

View File

@ -65,4 +65,14 @@ public class KcKechengbiaoServiceImpl extends ServiceImpl<KcKechengbiaoMapper, K
public void updateKechengExculde(KcKechengbiao ktbExculde) {
baseMapper.updateKechengExculde(ktbExculde); }
@Override
public void updateAllFlag(KcKechengbiao kcKechengbiao) {
baseMapper.updateAllFlag(kcKechengbiao);
}
@Override
public void updateYxByXxhbkckb(KcKechengbiao kcbAll) {
baseMapper.updateYxByXxhbkckb(kcbAll);
}
}

View File

@ -119,6 +119,7 @@ public class KcTingkeController extends JeecgController<KcTingke, IKcTingkeServi
}else if("1".equals(kcTingke.getPj())){
queryWrapper.apply("score is not null");
}
queryWrapper.orderByDesc("a.tingketime");
Page<KcTingke> page = new Page<KcTingke>(pageNo, pageSize);
IPage<Map<String,Object>> pageList = kcTingkeService.indexListPage(page, queryWrapper);
return Result.OK(pageList);

View File

@ -0,0 +1,178 @@
package org.jeecg.modules.kc.xxhbkckbOra.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra;
import org.jeecg.modules.kc.xxhbkckbOra.service.IXxhbkckbOraService;
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-03-21
* @Version: V1.0
*/
@Api(tags="数据源")
@RestController
@RequestMapping("/xxhbkckbOra/xxhbkckbOra")
@Slf4j
public class XxhbkckbOraController extends JeecgController<XxhbkckbOra, IXxhbkckbOraService> {
@Autowired
private IXxhbkckbOraService xxhbkckbOraService;
/**
* 分页列表查询
*
* @param xxhbkckbOra
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "数据源-分页列表查询")
@ApiOperation(value="数据源-分页列表查询", notes="数据源-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<XxhbkckbOra>> queryPageList(XxhbkckbOra xxhbkckbOra,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<XxhbkckbOra> queryWrapper = QueryGenerator.initQueryWrapper(xxhbkckbOra, req.getParameterMap());
Page<XxhbkckbOra> page = new Page<XxhbkckbOra>(pageNo, pageSize);
IPage<XxhbkckbOra> pageList = xxhbkckbOraService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param xxhbkckbOra
* @return
*/
@AutoLog(value = "数据源-添加")
@ApiOperation(value="数据源-添加", notes="数据源-添加")
@RequiresPermissions("xxhbkckbOra:xxhbkckb_ora:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody XxhbkckbOra xxhbkckbOra) {
xxhbkckbOraService.save(xxhbkckbOra);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param xxhbkckbOra
* @return
*/
@AutoLog(value = "数据源-编辑")
@ApiOperation(value="数据源-编辑", notes="数据源-编辑")
@RequiresPermissions("xxhbkckbOra:xxhbkckb_ora:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody XxhbkckbOra xxhbkckbOra) {
xxhbkckbOraService.updateById(xxhbkckbOra);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "数据源-通过id删除")
@ApiOperation(value="数据源-通过id删除", notes="数据源-通过id删除")
@RequiresPermissions("xxhbkckbOra:xxhbkckb_ora:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
xxhbkckbOraService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "数据源-批量删除")
@ApiOperation(value="数据源-批量删除", notes="数据源-批量删除")
@RequiresPermissions("xxhbkckbOra:xxhbkckb_ora:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.xxhbkckbOraService.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<XxhbkckbOra> queryById(@RequestParam(name="id",required=true) String id) {
XxhbkckbOra xxhbkckbOra = xxhbkckbOraService.getById(id);
if(xxhbkckbOra==null) {
return Result.error("未找到对应数据");
}
return Result.OK(xxhbkckbOra);
}
/**
* 导出excel
*
* @param request
* @param xxhbkckbOra
*/
@RequiresPermissions("xxhbkckbOra:xxhbkckb_ora:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, XxhbkckbOra xxhbkckbOra) {
return super.exportXls(request, xxhbkckbOra, XxhbkckbOra.class, "数据源");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("xxhbkckbOra:xxhbkckb_ora:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, XxhbkckbOra.class);
}
}

View File

@ -0,0 +1,224 @@
package org.jeecg.modules.kc.xxhbkckbOra.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-03-21
* @Version: V1.0
*/
@Data
@TableName("xxhbkckb_ora")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="xxhbkckb_ora对象", description="数据源")
public class XxhbkckbOra implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**课程编号*/
@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 jgh;
/**姓名*/
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private java.lang.String xm;
/**职称*/
@Excel(name = "职称", width = 15)
@ApiModelProperty(value = "职称")
private java.lang.String zc;
/**选课人数*/
@Excel(name = "选课人数", width = 15)
@ApiModelProperty(value = "选课人数")
private java.lang.String xkrs;
/**排课人数*/
@Excel(name = "排课人数", width = 15)
@ApiModelProperty(value = "排课人数")
private java.lang.String pkrs;
/**任务编号*/
@Excel(name = "任务编号", width = 15)
@ApiModelProperty(value = "任务编号")
private java.lang.String rwbh;
/**开课单位ID*/
@Excel(name = "开课单位ID", width = 15)
@ApiModelProperty(value = "开课单位ID")
private java.lang.String kkdwid;
/**开课单位*/
@Excel(name = "开课单位", width = 15)
@ApiModelProperty(value = "开课单位")
private java.lang.String kkdw;
/**课程性质*/
@Excel(name = "课程性质", width = 15)
@ApiModelProperty(value = "课程性质")
private java.lang.String kcxz;
/**教室编号*/
@Excel(name = "教室编号", width = 15)
@ApiModelProperty(value = "教室编号")
private java.lang.String 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)
@ApiModelProperty(value = "学分")
private java.lang.String xf;
/**学年学期*/
@Excel(name = "学年学期", width = 15)
@ApiModelProperty(value = "学年学期")
private java.lang.String xnxq;
/**教职工类别*/
@Excel(name = "教职工类别", width = 15)
@ApiModelProperty(value = "教职工类别")
private java.lang.String jzglb;
/**时间戳*/
@Excel(name = "时间戳", width = 15)
@ApiModelProperty(value = "时间戳")
private java.lang.String timestamps;
/**教材*/
@Excel(name = "教材", width = 15)
@ApiModelProperty(value = "教材")
private java.lang.String jc;
/**是否计算绩点*/
@Excel(name = "是否计算绩点", width = 15)
@ApiModelProperty(value = "是否计算绩点")
private java.lang.String sfjsjd;
/**培养方案版本*/
@Excel(name = "培养方案版本", width = 15)
@ApiModelProperty(value = "培养方案版本")
private java.lang.String pyfabb;
/**课程大类代码*/
@Excel(name = "课程大类代码", width = 15)
@ApiModelProperty(value = "课程大类代码")
private java.lang.String kcdldm;
/**课程简介*/
@Excel(name = "课程简介", width = 15)
@ApiModelProperty(value = "课程简介")
private java.lang.String kcjj;
/**参考数目*/
@Excel(name = "参考数目", width = 15)
@ApiModelProperty(value = "参考数目")
private java.lang.String cksm;
/**课程负责人号*/
@Excel(name = "课程负责人号", width = 15)
@ApiModelProperty(value = "课程负责人号")
private java.lang.String kcfzrh;
/**课程大类*/
@Excel(name = "课程大类", width = 15)
@ApiModelProperty(value = "课程大类")
private java.lang.String kcdl;
/**理论学时*/
@Excel(name = "理论学时", width = 15)
@ApiModelProperty(value = "理论学时")
private java.lang.String llxs;
/**实践学时*/
@Excel(name = "实践学时", width = 15)
@ApiModelProperty(value = "实践学时")
private java.lang.String sjxs;
/**总学时*/
@Excel(name = "总学时", width = 15)
@ApiModelProperty(value = "总学时")
private java.lang.String zxs;
/**课程性质码简称*/
@Excel(name = "课程性质码简称", width = 15)
@ApiModelProperty(value = "课程性质码简称")
private java.lang.String kcxzmjc;
/**专业号*/
@Excel(name = "专业号", width = 15)
@ApiModelProperty(value = "专业号")
private java.lang.String zyh;
/**课程类别代码*/
@Excel(name = "课程类别代码", width = 15)
@ApiModelProperty(value = "课程类别代码")
private java.lang.String kclbdm;
/**考核方式代码*/
@Excel(name = "考核方式代码", width = 15)
@ApiModelProperty(value = "考核方式代码")
private java.lang.String khfsdm;
/**课程英文名称*/
@Excel(name = "课程英文名称", width = 15)
@ApiModelProperty(value = "课程英文名称")
private java.lang.String kcywmc;
/**素质课程分类代码*/
@Excel(name = "素质课程分类代码", width = 15)
@ApiModelProperty(value = "素质课程分类代码")
private java.lang.String szkcfldm;
/**学期编号*/
@Excel(name = "学期编号", width = 15)
@ApiModelProperty(value = "学期编号")
private java.lang.String xqbh;
/**编号*/
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")
private java.lang.String bh;
/**教学大纲内容*/
@Excel(name = "教学大纲内容", width = 15)
private transient java.lang.String jxdgnrString;
private byte[] jxdgnr;
public byte[] getJxdgnr(){
if(jxdgnrString==null){
return null;
}
try {
return jxdgnrString.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
public String getJxdgnrString(){
if(jxdgnr==null || jxdgnr.length==0){
return "";
}
try {
return new String(jxdgnr,"UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return "";
}
/**是否需要线上*/
@Excel(name = "是否需要线上", width = 15)
@ApiModelProperty(value = "是否需要线上")
private java.lang.String sfxsk;
}

View File

@ -0,0 +1,18 @@
package org.jeecg.modules.kc.xxhbkckbOra.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 数据源
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
public interface XxhbkckbOraMapper extends BaseMapper<XxhbkckbOra> {
List<XxhbkckbOra> getSksjList();
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.xxhbkckbOra.mapper.XxhbkckbOraMapper">
<select id="getSksjList" resultType="org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra">
select distinct SUBSTRing(sksj,2,length(sksj)) as sksj from xxhbkckb_ora where SUBSTRing(sksj,2,length(sksj)) not in (
select distinct exp_col from kc_jieci_pipei
)
</select>
</mapper>

View File

@ -0,0 +1,29 @@
package org.jeecg.modules.kc.xxhbkckbOra.service;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
import org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Collection;
import java.util.List;
/**
* @Description: 数据源
* @Author: jeecg-boot
* @Date: 2024-03-21
* @Version: V1.0
*/
public interface IXxhbkckbOraService extends IService<XxhbkckbOra> {
boolean syncList(Collection<XxhbkckbOra> outDataList);
/**
*
* @param entityList
* @param isDelete
* @return
*/
boolean syncList(Collection<XxhbkckbOra> entityList, boolean isDelete);
List<XxhbkckbOra> getSksjList();
}

View File

@ -0,0 +1,47 @@
package org.jeecg.modules.kc.xxhbkckbOra.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
import org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra;
import org.jeecg.modules.kc.xxhbkckbOra.mapper.XxhbkckbOraMapper;
import org.jeecg.modules.kc.xxhbkckbOra.service.IXxhbkckbOraService;
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-03-21
* @Version: V1.0
*/
@Service
public class XxhbkckbOraServiceImpl extends ServiceImpl<XxhbkckbOraMapper, XxhbkckbOra> implements IXxhbkckbOraService {
@Override
@Transactional(rollbackFor = {Exception.class})
public boolean syncList(Collection<XxhbkckbOra> entityList) {
return syncList(entityList, true);
}
@Override
@Transactional(rollbackFor = {Exception.class})
public boolean syncList(Collection<XxhbkckbOra> entityList, boolean isDelete) {
QueryWrapper dqw = new QueryWrapper();
if(isDelete){
baseMapper.delete(dqw);
}
return this.saveBatch(entityList, 1000);
}
@Override
public List<XxhbkckbOra> getSksjList() {
return baseMapper.getSksjList();
}
}

View File

@ -139,9 +139,9 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
# multi-oracle:
# url: jdbc:oracle:thin:@//192.168.5.59:1521/ORCL
# username: xskc
# password: xskc
# url: jdbc:oracle:thin:@//192.168.2.185:1521/BLXC
# username: test7788
# password: test7788
# driver-class-name: oracle.jdbc.OracleDriver
#redis 配置
redis: