diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java index d79c3685..c8d223e8 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java @@ -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; /** diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java index 0fc861be..b47feaa8 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java @@ -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 upload(SftpConfig sftpConfig, String localFile, String sftpFile) { + Map map = new HashMap(); + 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 viewDirectory(ChannelSftp channelSftp,String directory){ + List list = new ArrayList(); + 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(); + } + } + + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/BaseSync.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/BaseSync.java new file mode 100644 index 00000000..03c12156 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/BaseSync.java @@ -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 paramMap; + + public Map 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 param) throws Exception; + + public abstract void run(); + + + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java new file mode 100644 index 00000000..014dd156 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java @@ -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 param){ + //查询数据 + List inDataList = expJxrwService.list(); + List outDataList = Lists.newArrayList(); + + System.out.println("---------------------------------------------------------------------------"); + System.out.println("--------------第1个"+inDataList.size()+"--------------------"); + System.out.println("---------------------------------------------------------------------------"); + + //查询数据 + List in1DataList = expScwjxxService.list(); + List out1DataList = Lists.newArrayList(); + + System.out.println("---------------------------------------------------------------------------"); + System.out.println("--------------第2个"+in1DataList.size()+"--------------------"); + System.out.println("---------------------------------------------------------------------------"); + //查询数据 +// List in2DataList = expXsmdService.list(); +// List 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); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxtXsmd.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxtXsmd.java new file mode 100644 index 00000000..83914da3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxtXsmd.java @@ -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 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 in2DataList = expXsmdService.listFy(startNum,endNum); + if(in2DataList.size()==0){//没有数据量就停止循环 + break; + } + List 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); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java new file mode 100644 index 00000000..b4299a96 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java @@ -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 { + @Autowired + private IXxhbjwxtjxrwService xxhbjwxtjxrwService; + + /** + * 分页列表查询 + * + * @param xxhbjwxtjxrw + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "教务系统教学任务-分页列表查询") + @ApiOperation(value="教务系统教学任务-分页列表查询", notes="教务系统教学任务-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbjwxtjxrw xxhbjwxtjxrw, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtjxrw, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage 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 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 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 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 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 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); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java new file mode 100644 index 00000000..c5403ba1 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java new file mode 100644 index 00000000..02a70f85 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/JwxtJxrwMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/JwxtJxrwMapper.java new file mode 100644 index 00000000..23520419 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/JwxtJxrwMapper.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/XxhbjwxtjxrwMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/XxhbjwxtjxrwMapper.java new file mode 100644 index 00000000..ed97c3b2 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/XxhbjwxtjxrwMapper.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/xml/JwxtJxrwMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/xml/JwxtJxrwMapper.xml new file mode 100644 index 00000000..8365ce0e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/xml/JwxtJxrwMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/xml/XxhbjwxtjxrwMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/xml/XxhbjwxtjxrwMapper.xml new file mode 100644 index 00000000..13c4bdfa --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/mapper/xml/XxhbjwxtjxrwMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/IXxhbjwxtjxrwService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/IXxhbjwxtjxrwService.java new file mode 100644 index 00000000..cc1914c9 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/IXxhbjwxtjxrwService.java @@ -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 { + + void syncList(List outDataList); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/JwxtJxrwService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/JwxtJxrwService.java new file mode 100644 index 00000000..d1577dde --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/JwxtJxrwService.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/impl/JwxtJxrwServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/impl/JwxtJxrwServiceImpl.java new file mode 100644 index 00000000..8f212a21 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/impl/JwxtJxrwServiceImpl.java @@ -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 implements JwxtJxrwService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/impl/XxhbjwxtjxrwServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/impl/XxhbjwxtjxrwServiceImpl.java new file mode 100644 index 00000000..58d71633 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/service/impl/XxhbjwxtjxrwServiceImpl.java @@ -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 implements IXxhbjwxtjxrwService { + + @Override + @Transactional(rollbackFor = {Exception.class}) + public void syncList(List entityList) { + syncList(entityList, true); + } + + @Transactional(rollbackFor = {Exception.class}) + public boolean syncList(Collection entityList, boolean isDelete) { + QueryWrapper dqw = new QueryWrapper(); + if(isDelete){ + baseMapper.delete(dqw); + } + return this.saveBatch(entityList, 1000); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java new file mode 100644 index 00000000..efb209f3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/controller/XxhbjwxtscwjxxController.java @@ -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 { + @Autowired + private IXxhbjwxtscwjxxService xxhbjwxtscwjxxService; + + /** + * 分页列表查询 + * + * @param xxhbjwxtscwjxx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "教务系统上传文件信息-分页列表查询") + @ApiOperation(value="教务系统上传文件信息-分页列表查询", notes="教务系统上传文件信息-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbjwxtscwjxx xxhbjwxtscwjxx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtscwjxx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage 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 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 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 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 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 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); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/entity/JwxtScwjxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/entity/JwxtScwjxx.java new file mode 100644 index 00000000..28296fbc --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/entity/JwxtScwjxx.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/entity/Xxhbjwxtscwjxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/entity/Xxhbjwxtscwjxx.java new file mode 100644 index 00000000..415d83e6 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/entity/Xxhbjwxtscwjxx.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/JwxtscwjxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/JwxtscwjxxMapper.java new file mode 100644 index 00000000..a3dbeec8 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/JwxtscwjxxMapper.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/XxhbjwxtscwjxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/XxhbjwxtscwjxxMapper.java new file mode 100644 index 00000000..5223a662 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/XxhbjwxtscwjxxMapper.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/xml/JwxtscwjxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/xml/JwxtscwjxxMapper.xml new file mode 100644 index 00000000..b95d1d13 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/xml/JwxtscwjxxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/xml/XxhbjwxtscwjxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/xml/XxhbjwxtscwjxxMapper.xml new file mode 100644 index 00000000..752159b3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/mapper/xml/XxhbjwxtscwjxxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/IXxhbjwxtscwjxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/IXxhbjwxtscwjxxService.java new file mode 100644 index 00000000..af3c2621 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/IXxhbjwxtscwjxxService.java @@ -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 { + + void syncList(List outDataList); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/JwxtscwjxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/JwxtscwjxxService.java new file mode 100644 index 00000000..465780f7 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/JwxtscwjxxService.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/impl/JwxtscwjxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/impl/JwxtscwjxxServiceImpl.java new file mode 100644 index 00000000..c1a21aa7 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/impl/JwxtscwjxxServiceImpl.java @@ -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 implements JwxtscwjxxService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/impl/XxhbjwxtscwjxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/impl/XxhbjwxtscwjxxServiceImpl.java new file mode 100644 index 00000000..101f79a8 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtscwjxx/service/impl/XxhbjwxtscwjxxServiceImpl.java @@ -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 implements IXxhbjwxtscwjxxService { + + @Override + public void syncList(List entityList) { + + syncList(entityList, true); + } + + @Transactional(rollbackFor = {Exception.class}) + public boolean syncList(Collection entityList, boolean isDelete) { + QueryWrapper dqw = new QueryWrapper(); + if(isDelete){ + baseMapper.delete(dqw); + } + return this.saveBatch(entityList, 1000); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/controller/XxhbjwxtxsmdController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/controller/XxhbjwxtxsmdController.java new file mode 100644 index 00000000..bb50c709 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/controller/XxhbjwxtxsmdController.java @@ -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 { + @Autowired + private IXxhbjwxtxsmdService xxhbjwxtxsmdService; + + /** + * 分页列表查询 + * + * @param xxhbjwxtxsmd + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "教务系统学生名单-分页列表查询") + @ApiOperation(value="教务系统学生名单-分页列表查询", notes="教务系统学生名单-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbjwxtxsmd xxhbjwxtxsmd, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtxsmd, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage 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 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 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 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 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 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); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/entity/JwxtXsmd.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/entity/JwxtXsmd.java new file mode 100644 index 00000000..0d168546 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/entity/JwxtXsmd.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/entity/Xxhbjwxtxsmd.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/entity/Xxhbjwxtxsmd.java new file mode 100644 index 00000000..61be44af --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/entity/Xxhbjwxtxsmd.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/JwxtXsmdMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/JwxtXsmdMapper.java new file mode 100644 index 00000000..5a5a5016 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/JwxtXsmdMapper.java @@ -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 { + + List listFy(@Param("startNum") int startNum,@Param("endNum") int endNum); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/XxhbjwxtxsmdMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/XxhbjwxtxsmdMapper.java new file mode 100644 index 00000000..a986e365 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/XxhbjwxtxsmdMapper.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/xml/JwxtXsmdMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/xml/JwxtXsmdMapper.xml new file mode 100644 index 00000000..75a70346 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/xml/JwxtXsmdMapper.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/xml/XxhbjwxtxsmdMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/xml/XxhbjwxtxsmdMapper.xml new file mode 100644 index 00000000..7e4ab018 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/mapper/xml/XxhbjwxtxsmdMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/IXxhbjwxtxsmdService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/IXxhbjwxtxsmdService.java new file mode 100644 index 00000000..f51744f9 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/IXxhbjwxtxsmdService.java @@ -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 { + + void syncList(List outDataList); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/JwxtXsmdService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/JwxtXsmdService.java new file mode 100644 index 00000000..f948e40e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/JwxtXsmdService.java @@ -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 { + + List listFy(int startNum, int endNum); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/impl/JwxtXsmdServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/impl/JwxtXsmdServiceImpl.java new file mode 100644 index 00000000..6ed71f90 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/impl/JwxtXsmdServiceImpl.java @@ -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 implements JwxtXsmdService { + + @Override + public List listFy(int startNum, int endNum) { + return baseMapper.listFy(startNum,endNum); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/impl/XxhbjwxtxsmdServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/impl/XxhbjwxtxsmdServiceImpl.java new file mode 100644 index 00000000..2d355c23 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtxsmd/service/impl/XxhbjwxtxsmdServiceImpl.java @@ -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 implements IXxhbjwxtxsmdService { + + @Override + public void syncList(List entityList) { + + syncList(entityList, true); + } + + @Transactional(rollbackFor = {Exception.class}) + public boolean syncList(Collection entityList, boolean isDelete) { + return this.saveBatch(entityList, 1000); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml index 1d61c13d..80c4891a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml @@ -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) and t.xm =#{skjs} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java index 85ef13a7..20e8725c 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java @@ -408,8 +408,8 @@ public class WjxWjxxController extends JeecgController 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 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){ diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java index 0837eb4a..8d08fd0b 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java @@ -159,8 +159,8 @@ public class ZyInfoController extends JeecgController { 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 { 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 { 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){ diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/entity/ZyInfo.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/entity/ZyInfo.java index 7d6003d5..a46cdebd 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/entity/ZyInfo.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/entity/ZyInfo.java @@ -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) diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/controller/ZyInfoScjlController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/controller/ZyInfoScjlController.java new file mode 100644 index 00000000..e30bb44a --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/controller/ZyInfoScjlController.java @@ -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 { + @Autowired + private IZyInfoScjlService zyInfoScjlService; + + /** + * 分页列表查询 + * + * @param zyInfoScjl + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "作业上传记录-分页列表查询") + @ApiOperation(value="作业上传记录-分页列表查询", notes="作业上传记录-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(ZyInfoScjl zyInfoScjl, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyInfoScjl, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage 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 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 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 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 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 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); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/entity/ZyInfoScjl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/entity/ZyInfoScjl.java new file mode 100644 index 00000000..09a4d6c2 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/entity/ZyInfoScjl.java @@ -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; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/mapper/ZyInfoScjlMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/mapper/ZyInfoScjlMapper.java new file mode 100644 index 00000000..1323af10 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/mapper/ZyInfoScjlMapper.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/mapper/xml/ZyInfoScjlMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/mapper/xml/ZyInfoScjlMapper.xml new file mode 100644 index 00000000..e29f37fb --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/mapper/xml/ZyInfoScjlMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/service/IZyInfoScjlService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/service/IZyInfoScjlService.java new file mode 100644 index 00000000..fe6b717b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/service/IZyInfoScjlService.java @@ -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 { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/service/impl/ZyInfoScjlServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/service/impl/ZyInfoScjlServiceImpl.java new file mode 100644 index 00000000..98f36f48 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoScjl/service/impl/ZyInfoScjlServiceImpl.java @@ -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 implements IZyInfoScjlService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java index 8d7718a3..bed3838f 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java @@ -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 fabuBatch(@RequestParam(name="ids",required=true) String ids) { this.zyInfoStudentService.fabuBatch(Arrays.asList(ids.split(","))); @@ -364,6 +368,77 @@ public class ZyInfoStudentController extends JeecgController 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 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 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="学生提交作业-批量删除") diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java index fafd8988..4b582409 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java @@ -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; + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java index e52434b1..10e6be6a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java @@ -40,4 +40,6 @@ public interface IZyInfoStudentService extends IService { boolean stuWpKsjc(ZyInfoStudent zyInfoStudent, HttpServletResponse response); IPage getHpxxList(Page page, QueryWrapper queryWrapper,String zyStuId); + + void batchKhcl(List list); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java index 6f66f661..718c4a71 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java @@ -194,6 +194,16 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl 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);