修改bug

This commit is contained in:
yangjun 2024-09-06 16:07:49 +08:00
parent ace89a374f
commit 2f94427bd2
53 changed files with 2483 additions and 21 deletions

View File

@ -37,7 +37,7 @@ import org.jeecg.common.util.oConvertUtils;
public class JwtUtil {
/**Token有效期为1小时Token在reids中缓存时间为两倍*/
public static final long EXPIRE_TIME = 60 * 60 * 1000;
public static final long EXPIRE_TIME = (7 * 12) * 60 * 60 * 1000;
static final String WELL_NUMBER = SymbolConstant.WELL_NUMBER + SymbolConstant.LEFT_CURLY_BRACKET;
/**

View File

@ -64,6 +64,10 @@ public class SFTPUtil {
channel.connect();
sftp = (ChannelSftp) channel;
logger.info("登录成功");
}else{
Channel channel = sshSession.openChannel("sftp");
channel.connect();
sftp = (ChannelSftp) channel;
}
} catch (Exception e){
try{
@ -71,7 +75,7 @@ public class SFTPUtil {
if(count == count1){
throw new RuntimeException(e);
}
Thread.sleep(sleepTime);
Thread.sleep(sleepTime);
logger.info("重新连接....");
getChannelSftp(sftpConfig);
} catch (InterruptedException e1){
@ -84,7 +88,7 @@ public class SFTPUtil {
String[] dics = directory.split("/");
for(int i=0;i< dics.length;i++){
try {
if(dics[i].equals("")){
if(dics[i].equals("")){
continue;
}
sftp.cd(dics[i]);
@ -727,4 +731,76 @@ public class SFTPUtil {
// disConnect(sftp);
// return fileNameList;
// }
public static Map<String,String> upload(SftpConfig sftpConfig, String localFile, String sftpFile) {
Map<String,String> map = new HashMap<String,String>();
map.put("code","0");
map.put("msg","上传成功");
try{
String allPath = sftpConfig.getFullpath() +"/"+sftpConfig.getUploadpath();
if(sftp == null){
getChannelSftp(sftpConfig);
}
try {
sftp.cd(sftpConfig.getFullpath());
} catch (SftpException e1) {
try {
mkdirs(sftpConfig.getFullpath());
} catch (SftpException e2) {
map.put("code", "1");
map.put("msg", "sftp创建" + sftpConfig.getUploadpath() + "文件路径失败");
}
}
try {
sftp.cd(sftpConfig.getUploadpath());
} catch (SftpException e1) {
try {
mkdirs(sftpConfig.getUploadpath());
} catch (SftpException e2) {
map.put("code", "1");
map.put("msg", "sftp创建" + sftpConfig.getUploadpath() + "文件路径失败");
}
}
InputStream inputStream = null;
try {
inputStream = new FileInputStream(localFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
try {
String aaa[] = sftpFile.split("/");
String wwqName = aaa[aaa.length -1];
for(int i=0;i<aaa.length -1;i++){
try {
sftp.cd(aaa[i]);
allPath = allPath+"/"+aaa[i];
} catch (SftpException e1) {
try {
mkdirs(aaa[i]);
} catch (SftpException e2) {
map.put("code", "1");
map.put("msg", "sftp创建" + sftpConfig.getUploadpath() + "文件路径失败");
}
}
}
sftp.put(inputStream, allPath+"/"+wwqName);
map.put("data",sftpConfig.getUploadpath().concat("/").concat(sftpFile));
} catch (Exception e3) {
map.put("code","1");
map.put("msg","上传文件异常:" + e3.getMessage());
// throw new RuntimeException("sftp异常" + e3);
} finally {
closeStream(inputStream,null);
}
}catch (Exception e) {
map.put("code","1");
map.put("msg","sftp异常" + e.getMessage());
}
return map;
}
}

View File

@ -0,0 +1,150 @@
package org.jeecg.common.util;
import com.jcraft.jsch.*;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
/**
* sftp工具类包含以下功能
* 获取sftp链接
* 关闭sftp链接
* 下载文件
* 上传文件
* 删除文件
* 查找文件
* 更多功能自行拓展
*/
public class SftpUtilNew {
private static ChannelSftp sftp = null;
/**
* 获取一个sftp链接
* @param host sftp服务器ip
* @param port 端口
* @param username 用户名
* @param password 密码
* @return 返回ChannelSftp
* @throws Exception 获取通道时的异常
*/
public static ChannelSftp getSftpChannel(String host, Integer port, String username, String password) throws Exception{
Session session;
Channel channel = null;
JSch jSch = new JSch();
try {
session = jSch.getSession(username, host, port);
session.setPassword(password);
// 配置链接的属性
Properties properties = new Properties();
properties.setProperty("StrictHostKeyChecking","no");
session.setConfig(properties);
// 进行sftp链接
session.connect();
// 获取通信通道
channel = session.openChannel("sftp");
channel.connect();
} catch (JSchException e) {
e.printStackTrace();
throw e;
}
return (ChannelSftp)channel;
}
/**
* 上传文件
* @param channelSftp sftp通道
* @param localFile 本地文件(文件地址+文件名+文件后缀)
* @param remoteFile 远程文件(文件地址+文件名+文件后缀)
*/
public static void upload(ChannelSftp channelSftp, String localFile, String remoteFile) throws Exception{
InputStream inputStream = null;
try {
inputStream = new FileInputStream(localFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
channelSftp.put(inputStream, remoteFile);
inputStream.close();
}
/**
* 从sftp服务器上下载文件
* @param channelSftp sftp通道
* @param remoteFile 远程文件
* @param localFile 本地文件
*/
public static void download(ChannelSftp channelSftp, String remoteFile, String localFile) throws Exception{
OutputStream outputStream = null;
try {
outputStream = new FileOutputStream(localFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
channelSftp.get(remoteFile, outputStream);
outputStream.close();
}
/**
* 删除文件
* @param channelSftp sftp通道
* @param remoteFile 远程文件
*/
public static void deleteFile(ChannelSftp channelSftp, String remoteFile) throws Exception{
try {
channelSftp.rm(remoteFile);
} catch (SftpException e) {
e.printStackTrace();
throw e;
}
}
/**
* 1.根据指定目录获取文件夹下的文件列表
* 2.根据文件绝对地址获取单个文件对象列表
* @param channelSftp
* @param directory
* @return
*/
@SuppressWarnings("unchecked")
public static List<Object> viewDirectory(ChannelSftp channelSftp,String directory){
List<Object> list = new ArrayList<Object>();
try {
list = channelSftp.ls(directory);
} catch (SftpException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list;
}
/**
* 关闭sftp链接
* @param channelSftp sftp通道
* @throws Exception 关闭session的异常
*/
public static void closeSession(ChannelSftp channelSftp) throws Exception{
if(channelSftp == null){
return;
}
Session session = null;
try {
session = channelSftp.getSession();
} catch (JSchException e) {
e.printStackTrace();
throw e;
}finally {
if(session != null){
session.disconnect();
}
}
}
}

View File

@ -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();
}

View File

@ -0,0 +1,126 @@
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();
System.out.println("---------------------------------------------------------------------------");
System.out.println("--------------第1个"+inDataList.size()+"--------------------");
System.out.println("---------------------------------------------------------------------------");
//查询数据
List<JwxtScwjxx> in1DataList = expScwjxxService.list();
List<Xxhbjwxtscwjxx> out1DataList = Lists.newArrayList();
System.out.println("---------------------------------------------------------------------------");
System.out.println("--------------第2个"+in1DataList.size()+"--------------------");
System.out.println("---------------------------------------------------------------------------");
//查询数据
// List<JwxtXsmd> in2DataList = expXsmdService.list();
// List<Xxhbjwxtxsmd> out2DataList = Lists.newArrayList();
// System.out.println("---------------------------------------------------------------------------");
// System.out.println("--------------第3个"+in2DataList.size()+"--------------------");
// System.out.println("---------------------------------------------------------------------------");
//清洗数据
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 {
System.out.println("---------------------------------------------------------------------------");
System.out.println("--------------第一个"+outDataList.size()+"--------------------");
System.out.println("---------------------------------------------------------------------------");
QueryWrapper dqw = new QueryWrapper();
impJxrwService.remove(dqw);
impJxrwService.syncList(outDataList);
System.out.println("---------------------------------------------------------------------------");
System.out.println("--------------第二个"+out1DataList.size()+"--------------------");
System.out.println("---------------------------------------------------------------------------");
QueryWrapper dqw1 = new QueryWrapper();
impScwjxxService.remove(dqw1);
impScwjxxService.syncList(out1DataList);
// System.out.println("---------------------------------------------------------------------------");
// System.out.println("--------------第三个"+outDataList.size()+"--------------------");
// System.out.println("---------------------------------------------------------------------------");
// QueryWrapper dqw2 = new QueryWrapper();
// impXsmdService.remove(dqw2);
// impXsmdService.syncList(out2DataList);
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 无参定时任务实现
*/
public void run(){
run(null);
}
}

View File

@ -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 SyncJwxtXsmd 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){
// LIMIT 10 OFFSET 10
int pageSize = 100000;
QueryWrapper dqw2 = new QueryWrapper();
impXsmdService.remove(dqw2);
for(int i=0;i<30;i++){
//查询数据
QueryWrapper sqw = new QueryWrapper();
sqw.eq("xsztmc","在校生");
sqw.last("LIMIT "+pageSize+" OFFSET "+(i*pageSize));
int startNum = i*pageSize;
int endNum = (i+1)*pageSize;
System.out.println("---------------------------------------------------------------------------");
System.out.println("--------------第"+i+"次查询--"+startNum+"---"+endNum+"---------------");
System.out.println("---------------------------------------------------------------------------");
List<JwxtXsmd> in2DataList = expXsmdService.listFy(startNum,endNum);
if(in2DataList.size()==0){//没有数据量就停止循环
break;
}
List<Xxhbjwxtxsmd> out2DataList = Lists.newArrayList();
//清洗数据
in2DataList.forEach(x -> out2DataList.add(BeanUtil.toBean(x, Xxhbjwxtxsmd.class)));
//保存到胃
try {
System.out.println("---------------------------------------------------------------------------");
System.out.println("--------------第"+i+"次查询,目前到"+(i*pageSize)+"这个数据--------------------");
System.out.println("---------------------------------------------------------------------------");
impXsmdService.syncList(out2DataList);
}catch (Exception e){
e.printStackTrace();
}
}
}
/**
* 无参定时任务实现
*/
public void run(){
run(null);
}
}

View File

@ -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);
}
}

View File

@ -0,0 +1,87 @@
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;
/**专业名称*/
@Excel(name = "专业名称", width = 15)
@ApiModelProperty(value = "专业名称")
private String zymc;
/**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;
}

View File

@ -0,0 +1,95 @@
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;
/**专业名称*/
@Excel(name = "专业名称", width = 15)
@ApiModelProperty(value = "专业名称")
private String zymc;
/**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;
}

View File

@ -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> {
}

View File

@ -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> {
}

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.demo.xxhbjwxtjxrw.mapper.JwxtJxrwMapper">
</mapper>

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.demo.xxhbjwxtjxrw.mapper.XxhbjwxtjxrwMapper">
</mapper>

View File

@ -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);
}

View File

@ -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> {
}

View File

@ -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-oracle")
public class JwxtJxrwServiceImpl extends ServiceImpl<JwxtJxrwMapper, JwxtJxrw> implements JwxtJxrwService {
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -0,0 +1,47 @@
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 kcrwdm;
/**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;
}

View File

@ -0,0 +1,55 @@
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;
/**kcrwdm*/
@Excel(name = "课程任务代码", width = 15)
@ApiModelProperty(value = "课程任务代码")
private String kcrwdm;
/**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;
}

View File

@ -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> {
}

View File

@ -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> {
}

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.demo.xxhbjwxtscwjxx.mapper.JwxtscwjxxMapper">
</mapper>

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.demo.xxhbjwxtscwjxx.mapper.XxhbjwxtscwjxxMapper">
</mapper>

View File

@ -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);
}

View File

@ -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> {
}

View File

@ -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-oracle")
public class JwxtscwjxxServiceImpl extends ServiceImpl<JwxtscwjxxMapper, JwxtScwjxx> implements JwxtscwjxxService {
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.xxhbjwxtxsmd.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.JwxtXsmd;
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
import java.util.List;
/**
* @Description: 教务系统学生名单
* @Author: jeecg-boot
* @Date: 2024-09-02
* @Version: V1.0
*/
public interface JwxtXsmdMapper extends BaseMapper<JwxtXsmd> {
List<JwxtXsmd> listFy(@Param("startNum") int startNum,@Param("endNum") int endNum);
}

View File

@ -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> {
}

View File

@ -0,0 +1,16 @@
<?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">
<select id="listFy" parameterType="java.lang.Integer" resultType="org.jeecg.modules.demo.xxhbjwxtxsmd.entity.JwxtXsmd">
SELECT *
FROM (
SELECT a.*, ROWNUM rnum
FROM (
SELECT * FROM v_jwxt_xsmd
) a
WHERE ROWNUM &lt; ${endNum}
)
WHERE rnum >= ${startNum}
</select>
</mapper>

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.demo.xxhbjwxtxsmd.mapper.XxhbjwxtxsmdMapper">
</mapper>

View File

@ -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);
}

View File

@ -0,0 +1,18 @@
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;
import java.util.List;
/**
* @Description: 教务系统学生名单
* @Author: jeecg-boot
* @Date: 2024-09-02
* @Version: V1.0
*/
public interface JwxtXsmdService extends IService<JwxtXsmd> {
List<JwxtXsmd> listFy(int startNum, int endNum);
}

View File

@ -0,0 +1,30 @@
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;
import java.util.Collections;
import java.util.List;
/**
* @Description: 教务系统学生名单
* @Author: jeecg-boot
* @Date: 2024-09-02
* @Version: V1.0
*/
@Service
@DS("multi-oracle")
public class JwxtXsmdServiceImpl extends ServiceImpl<JwxtXsmdMapper, JwxtXsmd> implements JwxtXsmdService {
@Override
public List<JwxtXsmd> listFy(int startNum, int endNum) {
return baseMapper.listFy(startNum,endNum);
}
}

View File

@ -0,0 +1,35 @@
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) {
return this.saveBatch(entityList, 1000);
}
}

View File

@ -76,7 +76,7 @@
when xqbh = 'U' then '全部'
ELSE '' END as xq,
jgh,xnxq,jzglb,1 as sfcj,sfxsk as skxs,'' as sfzc,'' as bz,'' as zt,kcdl,#{xqxn} as xqxn
from v_xxhbkckb t,kc_jieci jc where concat(substring(sksj,2,2),'、',substring(sksj,4,2)) = jc.jieci and t.kcmc != '毕业论文' and (t.jgh is not null or t.JKZC is not null)
from v_xxhbkckb t,kc_jieci jc where concat(substring(sksj,2,2),'、',substring(sksj,4,2)) = jc.jieci and t.kcmc not like '%毕业论文%' and (t.jgh is not null or t.JKZC is not null)
<if test="skjs!=null and skjs!=''">
and t.xm =#{skjs}
</if>

View File

@ -408,8 +408,8 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
zyDbtxService.save(zyDbtx);
try {
KcWechatSendLog kcWechatSendLog = new KcWechatSendLog();
// kcWechatSendLog.setOpenid(xxhbbks.getXh());
kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setOpenid(xxhbbks.getXh());
// kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setYtkcs(zyDbtx.getContent());
sendWxmessage(kcWechatSendLog);
}catch (Exception e){
@ -438,8 +438,8 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
for(Xxhbbks xxhbbks:list){
try {
KcWechatSendLog kcWechatSendLog = new KcWechatSendLog();
// kcWechatSendLog.setOpenid(xxhbbks.getXh());
kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setOpenid(xxhbbks.getXh());
// kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setYtkcs(content);
sendWxmessage(kcWechatSendLog);
}catch (Exception e){

View File

@ -159,8 +159,8 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
try {
KcWechatSendLog kcWechatSendLog = new KcWechatSendLog();
// kcWechatSendLog.setOpenid(xxhbbks.getXh());
kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setOpenid(xxhbbks.getXh());
// kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setYtkcs(zyDbtx.getContent());
sendWxmessage(kcWechatSendLog);
}catch (Exception e){
@ -343,8 +343,8 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
try {
KcWechatSendLog kcWechatSendLog = new KcWechatSendLog();
// kcWechatSendLog.setOpenid(xxhbbks.getXh());
kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setOpenid(xxhbbks.getXh());
// kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setYtkcs(zyDbtx.getContent());
sendWxmessage(kcWechatSendLog);
}catch (Exception e){
@ -391,8 +391,8 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
for(Xxhbbks xxhbbks:list){
try {
KcWechatSendLog kcWechatSendLog = new KcWechatSendLog();
// kcWechatSendLog.setOpenid(xxhbbks.getXh());
kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setOpenid(xxhbbks.getXh());
// kcWechatSendLog.setOpenid("2016900057");//指定曹老师账号
kcWechatSendLog.setYtkcs(content);
sendWxmessage(kcWechatSendLog);
}catch (Exception e){

View File

@ -146,6 +146,10 @@ public class ZyInfo implements Serializable {
private java.lang.String hpsfwcone;//第1次互评是否完成1是 0否
private java.lang.String hpsfwctwo;//第2次互评是否完成1是 0否
private String sfcc;//是否查重0不查重 1查重
private String sfsckhcl;//是否上传考核材料0否 1是
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
private Date sfsckhclTime;//上传考核材料时间
@TableField(exist = false)

View File

@ -0,0 +1,178 @@
package org.jeecg.modules.kc.zyInfoScjl.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.zyInfoScjl.entity.ZyInfoScjl;
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
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("/zyInfoScjl/zyInfoScjl")
@Slf4j
public class ZyInfoScjlController extends JeecgController<ZyInfoScjl, IZyInfoScjlService> {
@Autowired
private IZyInfoScjlService zyInfoScjlService;
/**
* 分页列表查询
*
* @param zyInfoScjl
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "作业上传记录-分页列表查询")
@ApiOperation(value="作业上传记录-分页列表查询", notes="作业上传记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<ZyInfoScjl>> queryPageList(ZyInfoScjl zyInfoScjl,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyInfoScjl> queryWrapper = QueryGenerator.initQueryWrapper(zyInfoScjl, req.getParameterMap());
Page<ZyInfoScjl> page = new Page<ZyInfoScjl>(pageNo, pageSize);
IPage<ZyInfoScjl> pageList = zyInfoScjlService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyInfoScjl
* @return
*/
@AutoLog(value = "作业上传记录-添加")
@ApiOperation(value="作业上传记录-添加", notes="作业上传记录-添加")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyInfoScjl zyInfoScjl) {
zyInfoScjlService.save(zyInfoScjl);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyInfoScjl
* @return
*/
@AutoLog(value = "作业上传记录-编辑")
@ApiOperation(value="作业上传记录-编辑", notes="作业上传记录-编辑")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyInfoScjl zyInfoScjl) {
zyInfoScjlService.updateById(zyInfoScjl);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "作业上传记录-通过id删除")
@ApiOperation(value="作业上传记录-通过id删除", notes="作业上传记录-通过id删除")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
zyInfoScjlService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "作业上传记录-批量删除")
@ApiOperation(value="作业上传记录-批量删除", notes="作业上传记录-批量删除")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyInfoScjlService.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<ZyInfoScjl> queryById(@RequestParam(name="id",required=true) String id) {
ZyInfoScjl zyInfoScjl = zyInfoScjlService.getById(id);
if(zyInfoScjl==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyInfoScjl);
}
/**
* 导出excel
*
* @param request
* @param zyInfoScjl
*/
@RequiresPermissions("zyInfoScjl:zy_info_scjl:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyInfoScjl zyInfoScjl) {
return super.exportXls(request, zyInfoScjl, ZyInfoScjl.class, "作业上传记录");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("zyInfoScjl:zy_info_scjl:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyInfoScjl.class);
}
}

View File

@ -0,0 +1,115 @@
package org.jeecg.modules.kc.zyInfoScjl.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_info_scjl")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_info_scjl对象", description="作业上传记录")
public class ZyInfoScjl implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**createTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
/**createBy*/
@ApiModelProperty(value = "createBy")
private java.lang.String createBy;
/**updateTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
/**updateBy*/
@ApiModelProperty(value = "updateBy")
private java.lang.String updateBy;
/**作业id*/
@Excel(name = "作业id", width = 15)
@ApiModelProperty(value = "作业id")
private java.lang.String zyId;
/**作业名称*/
@Excel(name = "作业名称", width = 15)
@ApiModelProperty(value = "作业名称")
private java.lang.String zyName;
/**作业类型*/
@Excel(name = "作业类型", width = 15)
@ApiModelProperty(value = "作业类型")
private java.lang.String zyLeixing;
/**占比*/
@Excel(name = "占比", width = 15)
@ApiModelProperty(value = "占比")
private java.lang.String zyZb;
/**开课单位*/
@Excel(name = "开课单位", width = 15)
@ApiModelProperty(value = "开课单位")
private java.lang.String kkdw;
/**开课单位id*/
@Excel(name = "开课单位id", width = 15)
@ApiModelProperty(value = "开课单位id")
private java.lang.String kkdwid;
/**课程名称*/
@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 skdd;
/**课程性质*/
@Excel(name = "课程性质", width = 15)
@ApiModelProperty(value = "课程性质")
private java.lang.String kcxz;
/**学年学期*/
@Excel(name = "学年学期", width = 15)
@ApiModelProperty(value = "学年学期")
private java.lang.String xnxq;
/**文件*/
@Excel(name = "文件", width = 15)
@ApiModelProperty(value = "文件")
private java.lang.String filePath;
/**学工号*/
@Excel(name = "学工号", width = 15)
@ApiModelProperty(value = "学工号")
private java.lang.String studentNo;
/**学生姓名*/
@Excel(name = "学生姓名", width = 15)
@ApiModelProperty(value = "学生姓名")
private java.lang.String studentName;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.kc.zyInfoScjl.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 作业上传记录
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
public interface ZyInfoScjlMapper extends BaseMapper<ZyInfoScjl> {
}

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.zyInfoScjl.mapper.ZyInfoScjlMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.kc.zyInfoScjl.service;
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 作业上传记录
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
public interface IZyInfoScjlService extends IService<ZyInfoScjl> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.kc.zyInfoScjl.service.impl;
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
import org.jeecg.modules.kc.zyInfoScjl.mapper.ZyInfoScjlMapper;
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
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 ZyInfoScjlServiceImpl extends ServiceImpl<ZyInfoScjlMapper, ZyInfoScjl> implements IZyInfoScjlService {
}

View File

@ -19,9 +19,7 @@ import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.SpringContextHolder;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.common.util.*;
import org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx;
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
@ -33,6 +31,8 @@ import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
@ -62,6 +62,7 @@ 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.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -122,8 +123,11 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
private IKcKechengbiaoService kcKechengbiaoService;
@Autowired
private ISysUserService sysUserService;
@Autowired
private IZyInfoScjlService zyInfoScjlService;
@Autowired
SftpConfig sftpConfig;
/**
* 分页列表查询
*
@ -325,13 +329,13 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
}
/**
* 批量删除
* 批量发布
*
* @param ids
* @return
*/
@AutoLog(value = "学生提交作业-批量删除")
@ApiOperation(value="学生提交作业-批量删除", notes="学生提交作业-批量删除")
@AutoLog(value = "学生提交作业-批量发布")
@ApiOperation(value="学生提交作业-批量发布", notes="学生提交作业-批量发布")
@PostMapping(value = "/fabuBatch")
public Result<String> fabuBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyInfoStudentService.fabuBatch(Arrays.asList(ids.split(",")));
@ -364,6 +368,77 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
return Result.OK("批量发布成功!");
}
/**
* 批量发布
*
* @param ids
* @return
*/
@AutoLog(value = "学生提交作业-批量发布考核材料")
@ApiOperation(value="学生提交作业-批量发布考核材料", notes="学生提交作业-批量发布考核材料")
@PostMapping(value = "/batchKhcl")
public Result<String> batchKhcl(@RequestParam(name="ids",required=true) String ids) {
// this.zyInfoStudentService.batchKhcl(Arrays.asList(ids.split(",")));
try {
String idsList[] = ids.split(",");
if(idsList.length>0){
ZyInfoStudent zyInfoStudentPar = zyInfoStudentService.getById(idsList[0]);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudentPar.getMainId());
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
kcKechengbiaoQueryWrapper.eq("rwbh",zyInfo.getRwbh());
kcKechengbiaoQueryWrapper.eq("jgh",zyInfo.getCreateBy());
kcKechengbiaoQueryWrapper.eq("xqxn",zyInfo.getXnxq());
kcKechengbiaoQueryWrapper.last("limit 1");
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
zyInfo.setSfsckhcl("1");
zyInfo.setSfsckhclTime(new Date());
zyInfoService.updateById(zyInfo);
for(int i=0;i< idsList.length;i++){
ZyInfoStudent zyInfoStudentPar2 = zyInfoStudentService.getById(idsList[i]);
if(StringUtils.isNotEmpty(zyInfoStudentPar2.getFilePath())){
//上传文件
Map<String,String> uploadMap = SFTPUtil.upload(sftpConfig,upLoadPath+"/"+zyInfoStudentPar2.getFilePath(),zyInfoStudentPar2.getFilePath());
zyInfoStudentPar2.setSfsckhcl("1");
zyInfoStudentPar2.setFwqPath(uploadMap.get("data"));
zyInfoStudentPar2.setKhclTime(new Date());
zyInfoStudentService.updateById(zyInfoStudentPar2);
ZyInfoScjl zyInfoScjl = new ZyInfoScjl();
zyInfoScjl.setZyId(zyInfo.getId());
zyInfoScjl.setZyName(zyInfo.getTitle());
zyInfoScjl.setZyLeixing(zyInfo.getZyLeixing());
zyInfoScjl.setZyZb(zyInfo.getScore());
zyInfoScjl.setJgh(kcKechengbiao.getJgh());
zyInfoScjl.setSkjs(kcKechengbiao.getSkjs());
zyInfoScjl.setSkdd(kcKechengbiao.getSkdd());
zyInfoScjl.setKkdw(kcKechengbiao.getKkdw());
zyInfoScjl.setKkdwid(kcKechengbiao.getKkdwid());
zyInfoScjl.setKcxz(kcKechengbiao.getKcxz());
zyInfoScjl.setXnxq(zyInfo.getXnxq());
zyInfoScjl.setFilePath(zyInfoStudentPar2.getFwqPath());
zyInfoScjl.setStudentNo(zyInfoStudentPar2.getCreateBy());
zyInfoScjl.setStudentName(zyInfoStudentPar2.getStudentName());
zyInfoScjlService.save(zyInfoScjl);
}
}
}
}catch (Exception e) {
e.printStackTrace();
}
return Result.OK("上传成功!");
}
@AutoLog(value = "学生提交作业-批量删除")
@ApiOperation(value="学生提交作业-批量删除", notes="学生提交作业-批量删除")

View File

@ -125,6 +125,13 @@ public class ZyInfoStudent implements Serializable {
private String zyLeixing;//作业类型 0课程作业 1期末作业
private String pyContent;//批阅内容
private String pyFilePath;//批阅附件
private String sfsckhcl;//是否上传考核材料0否 1是
private String fwqPath;//文件服务器存储地址
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Excel(name = "考核材料提交时间", width = 15,format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date khclTime;

View File

@ -40,4 +40,6 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
boolean stuWpKsjc(ZyInfoStudent zyInfoStudent, HttpServletResponse response);
IPage<ZyInfoStudent> getHpxxList(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper,String zyStuId);
void batchKhcl(List<String> list);
}

View File

@ -194,6 +194,16 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
return baseMapper.getHpxxList(page,queryWrapper,zyStuId);
}
@Override
public void batchKhcl(List<String> asList) {
for (int i = 0; i < asList.size(); i++){
ZyInfoStudent zyInfoStudent = new ZyInfoStudent();
zyInfoStudent.setId(asList.get(i));
zyInfoStudent.setSfsckhcl("1");
baseMapper.updateById(zyInfoStudent);
}
}
private void delweipulunwen(ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
zyInfoStudent.setQueryType("0");//外网查重数据
String paperids = baseMapper.getWpFile(zyInfoStudent);