diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/controller/LwKhclController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/controller/LwKhclController.java index 5356ccd..8a5b815 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/controller/LwKhclController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/controller/LwKhclController.java @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz; import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx; import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService; import org.jeecgframework.poi.excel.ExcelExportUtil; @@ -393,4 +394,20 @@ public class LwKhclController extends JeecgController { } + + + @ApiOperation(value="lw_khcl-分页列表查询", notes="lw_khcl-分页列表查询") + @GetMapping(value = "/getXkList") + public Result> getXkList(LwKhcl lwKhcl, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + lwKhcl.setCreateBy(sysUser.getUsername()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lwKhclService.getXkList(page, lwKhcl); + return Result.OK(pageList); + } + + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/entity/LwKhcl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/entity/LwKhcl.java index 31a04fd..35a1e74 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/entity/LwKhcl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/entity/LwKhcl.java @@ -1,6 +1,7 @@ package org.jeecg.modules.demo.lwKhcl.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; @@ -97,4 +98,17 @@ public class LwKhcl implements Serializable { @ApiModelProperty(value = "入库日期") private String createTime; + @ApiModelProperty(value = "终稿查重相似率") + private String ccjgxsl; + @ApiModelProperty(value = "终稿下载路径") + private String ccjgdown; + @ApiModelProperty(value = "知道记录单") + private String zdjld; + + + @TableField(exist = false) + private String sfxk; + @TableField(exist = false) + private String createBy; + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/LwKhclMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/LwKhclMapper.java index b40f0bb..19258e4 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/LwKhclMapper.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/LwKhclMapper.java @@ -3,6 +3,8 @@ package org.jeecg.modules.demo.lwKhcl.mapper; import java.util.List; import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import org.jeecg.modules.demo.lwKhcl.entity.LwKhcl; @@ -47,4 +49,5 @@ public interface LwKhclMapper extends BaseMapper { @Param("inSsyxmc")String inSsyxmc, @Param("inBylwLb")String inBylwLb); + IPage getXkList(Page page, @Param("lwKhcl") LwKhcl lwKhcl); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/xml/LwKhclMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/xml/LwKhclMapper.xml index 587f871..dc8d514 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/xml/LwKhclMapper.xml +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/mapper/xml/LwKhclMapper.xml @@ -129,4 +129,35 @@ order by xsxh + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/ILwKhclService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/ILwKhclService.java index 81812b4..482c03a 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/ILwKhclService.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/ILwKhclService.java @@ -1,5 +1,7 @@ package org.jeecg.modules.demo.lwKhcl.service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.modules.demo.lwKhcl.entity.LwKhcl; import com.baomidou.mybatisplus.extension.service.IService; @@ -24,4 +26,6 @@ public interface ILwKhclService extends IService { Page getXqPage(Page page, String xsxh, String xsxm, String ssxnzymc, String ktbg, String zqjc, String lwzg, String inBynf, String inSsyxmc, String inBylwLb); List getXqList(String xsxh, String xsxm, String ssxnzymc, String ktbg, String zqjc, String lwzg, String inBynf, String inSsyxmc, String inBylwLb); + + IPage getXkList(Page page, LwKhcl lwKhcl); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/impl/LwKhclServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/impl/LwKhclServiceImpl.java index 3f48079..7dcd2b9 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/impl/LwKhclServiceImpl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhcl/service/impl/LwKhclServiceImpl.java @@ -1,5 +1,7 @@ package org.jeecg.modules.demo.lwKhcl.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.modules.demo.lwKhcl.entity.LwKhcl; import org.jeecg.modules.demo.lwKhcl.entity.LwKhclCj; @@ -52,4 +54,9 @@ public class LwKhclServiceImpl extends ServiceImpl impleme return baseMapper.getXqPage(null, xsxh ,xsxm, ssxnzymc, ktbg, zqjc, lwzg, inBynf, inSsyxmc, inBylwLb); } + @Override + public IPage getXkList(Page page, LwKhcl lwKhcl) { + return baseMapper.getXkList(page,lwKhcl); + } + } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/controller/LwKhclXzController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/controller/LwKhclXzController.java new file mode 100644 index 0000000..f0b1e08 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/controller/LwKhclXzController.java @@ -0,0 +1,224 @@ +package org.jeecg.modules.demo.lwKhclXz.controller; + +import java.util.Arrays; +import java.util.Date; +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.apache.commons.lang.StringUtils; +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.oConvertUtils; +import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz; +import org.jeecg.modules.demo.lwKhclXz.service.ILwKhclXzService; + +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.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd; +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: lw_khcl_xz + * @Author: jeecg-boot + * @Date: 2024-10-09 + * @Version: V1.0 + */ +@Api(tags="lw_khcl_xz") +@RestController +@RequestMapping("/lwKhclXz/lwKhclXz") +@Slf4j +public class LwKhclXzController extends JeecgController { + @Autowired + private ILwKhclXzService lwKhclXzService; + + /** + * 分页列表查询 + * + * @param lwKhclXz + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "lw_khcl_xz-分页列表查询") + @ApiOperation(value="lw_khcl_xz-分页列表查询", notes="lw_khcl_xz-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(LwKhclXz lwKhclXz, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + + String ktbg = lwKhclXz.getKtbg(); + String zqjc = lwKhclXz.getZqjc(); + String lwzg = lwKhclXz.getLwzg(); + lwKhclXz.setKtbg(null); + lwKhclXz.setZqjc(null); + lwKhclXz.setLwzg(null); + + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lwKhclXz, req.getParameterMap()); + //获取当前用户 + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + queryWrapper.eq("create_by",sysUser.getUsername()); + if(StringUtils.isNotBlank(ktbg)){ + if(StringUtils.equals(ktbg,"1")){ + queryWrapper.isNotNull("ktbg"); + }else{ + queryWrapper.isNull("ktbg"); + } + } + + if(StringUtils.isNotBlank(zqjc)){ + if(StringUtils.equals(zqjc,"1")){ + queryWrapper.isNotNull("zqjc"); + }else{ + queryWrapper.isNull("zqjc"); + } + } + + if(StringUtils.isNotBlank(lwzg)){ + if(StringUtils.equals(lwzg,"1")){ + queryWrapper.isNotNull("lwzg"); + }else{ + queryWrapper.isNull("lwzg"); + } + } + + + Page page = new Page(pageNo, pageSize); + IPage pageList = lwKhclXzService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param lwKhclXz + * @return + */ + @AutoLog(value = "lw_khcl_xz-添加") + @ApiOperation(value="lw_khcl_xz-添加", notes="lw_khcl_xz-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody LwKhclXz lwKhclXz) { + lwKhclXz.setCreateTime(new Date()); + lwKhclXzService.save(lwKhclXz); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param lwKhclXz + * @return + */ + @AutoLog(value = "lw_khcl_xz-编辑") + @ApiOperation(value="lw_khcl_xz-编辑", notes="lw_khcl_xz-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody LwKhclXz lwKhclXz) { + lwKhclXzService.updateById(lwKhclXz); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "lw_khcl_xz-通过id删除") + @ApiOperation(value="lw_khcl_xz-通过id删除", notes="lw_khcl_xz-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + lwKhclXzService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "lw_khcl_xz-批量删除") + @ApiOperation(value="lw_khcl_xz-批量删除", notes="lw_khcl_xz-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.lwKhclXzService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "lw_khcl_xz-通过id查询") + @ApiOperation(value="lw_khcl_xz-通过id查询", notes="lw_khcl_xz-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + LwKhclXz lwKhclXz = lwKhclXzService.getById(id); + if(lwKhclXz==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(lwKhclXz); + } + + /** + * 导出excel + * + * @param request + * @param lwKhclXz + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, LwKhclXz lwKhclXz) { + return super.exportXls(request, lwKhclXz, LwKhclXz.class, "lw_khcl_xz"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("lwKhclXz:lw_khcl_xz:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, LwKhclXz.class); + } + + + @PostMapping(value = "/getLwBatchDown") + public Result getLwBatchDown(@RequestBody LwKhclXz lwKhclXz, HttpServletResponse response) { + lwKhclXz = lwKhclXzService.getLwBatchDown(lwKhclXz,response); + return Result.ok(lwKhclXz); + } + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/entity/LwKhclXz.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/entity/LwKhclXz.java new file mode 100644 index 0000000..27aa090 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/entity/LwKhclXz.java @@ -0,0 +1,140 @@ +package org.jeecg.modules.demo.lwKhclXz.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: lw_khcl_xz + * @Author: jeecg-boot + * @Date: 2024-10-09 + * @Version: V1.0 + */ +@Data +@TableName("lw_khcl_xz") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="lw_khcl_xz对象", description="lw_khcl_xz") +public class LwKhclXz implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**学生学号*/ + @Excel(name = "学生学号", width = 15) + @ApiModelProperty(value = "学生学号") + private java.lang.String xsxh; + /**学生姓名*/ + @Excel(name = "学生姓名", width = 15) + @ApiModelProperty(value = "学生姓名") + private java.lang.String xsxm; + /**毕业年份*/ + @Excel(name = "毕业年份", width = 15) + @ApiModelProperty(value = "毕业年份") + private java.lang.String bynf; + /**班级*/ + @Excel(name = "班级", width = 15) + @ApiModelProperty(value = "班级") + private java.lang.String bj; + /**毕业论文(设计)题目*/ + @Excel(name = "毕业论文(设计)题目", width = 15) + @ApiModelProperty(value = "毕业论文(设计)题目") + private java.lang.String bylwTm; + /**毕业论文(设计)类别*/ + @Excel(name = "毕业论文(设计)类别", width = 15) + @ApiModelProperty(value = "毕业论文(设计)类别") + private java.lang.String bylwLb; + /**毕业论文(设计)成绩*/ + @Excel(name = "毕业论文(设计)成绩", width = 15) + @ApiModelProperty(value = "毕业论文(设计)成绩") + private java.lang.String bylwCj; + /**指导教师姓名*/ + @Excel(name = "指导教师姓名", width = 15) + @ApiModelProperty(value = "指导教师姓名") + private java.lang.String zdjsxm; + /**指导教师职称*/ + @Excel(name = "指导教师职称", width = 15) + @ApiModelProperty(value = "指导教师职称") + private java.lang.String zdjszc; + /**所属院系名称*/ + @Excel(name = "所属院系名称", width = 15) + @ApiModelProperty(value = "所属院系名称") + private java.lang.String ssyxmc; + /**所属校内专业(大类)名称*/ + @Excel(name = "所属校内专业(大类)名称", width = 15) + @ApiModelProperty(value = "所属校内专业(大类)名称") + private java.lang.String ssxnzymc; + /**是否实现电子化管理*/ + @Excel(name = "是否实现电子化管理", width = 15) + @ApiModelProperty(value = "是否实现电子化管理") + private java.lang.String sfsxdzhgl; + /**关键词*/ + @Excel(name = "关键词", width = 15) + @ApiModelProperty(value = "关键词") + private java.lang.String gjc; + /**查重结果*/ + @Excel(name = "查重结果", width = 15) + @ApiModelProperty(value = "查重结果") + private java.lang.String ccjg; + /**开题报告*/ + @Excel(name = "开题报告", width = 15) + @ApiModelProperty(value = "开题报告") + private java.lang.String ktbg; + /**开题报告审核意见*/ + @Excel(name = "开题报告审核意见", width = 15) + @ApiModelProperty(value = "开题报告审核意见") + private java.lang.String ktbgshyj; + /**中期检查*/ + @Excel(name = "中期检查", width = 15) + @ApiModelProperty(value = "中期检查") + private java.lang.String zqjc; + /**论文终稿*/ + @Excel(name = "论文终稿", width = 15) + @ApiModelProperty(value = "论文终稿") + private java.lang.String lwzg; + /**论文终稿PDF*/ + @Excel(name = "论文终稿PDF", width = 15) + @ApiModelProperty(value = "论文终稿PDF") + private java.lang.String lwzgPdf; + /**检测报告等材料*/ + @Excel(name = "检测报告等材料", width = 15) + @ApiModelProperty(value = "检测报告等材料") + private java.lang.String jcbgdcl; + /**入库日期*/ + @ApiModelProperty(value = "入库日期") + private Date createTime; + /**论文考核材料id*/ + @Excel(name = "论文考核材料id", width = 15) + @ApiModelProperty(value = "论文考核材料id") + private java.lang.String mainId; + @ApiModelProperty(value = "终稿查重相似率") + private String ccjgxsl; + @ApiModelProperty(value = "终稿下载路径") + private String ccjgdown; + @ApiModelProperty(value = "知道记录单") + private String zdjld; + + + private String createBy; + private String updateBy; + private Date updateTime; + + @TableField(exist = false) + private String downLoadPath; + @TableField(exist = false) + private String downName; +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/mapper/LwKhclXzMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/mapper/LwKhclXzMapper.java new file mode 100644 index 0000000..b6e4ec3 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/mapper/LwKhclXzMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.lwKhclXz.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: lw_khcl_xz + * @Author: jeecg-boot + * @Date: 2024-10-09 + * @Version: V1.0 + */ +public interface LwKhclXzMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/mapper/xml/LwKhclXzMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/mapper/xml/LwKhclXzMapper.xml new file mode 100644 index 0000000..8ad5189 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/mapper/xml/LwKhclXzMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/service/ILwKhclXzService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/service/ILwKhclXzService.java new file mode 100644 index 0000000..9f33cee --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/service/ILwKhclXzService.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.lwKhclXz.service; + +import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz; +import com.baomidou.mybatisplus.extension.service.IService; + +import javax.servlet.http.HttpServletResponse; + +/** + * @Description: lw_khcl_xz + * @Author: jeecg-boot + * @Date: 2024-10-09 + * @Version: V1.0 + */ +public interface ILwKhclXzService extends IService { + + LwKhclXz getLwBatchDown(LwKhclXz lwKhclXz, HttpServletResponse response); +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/service/impl/LwKhclXzServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/service/impl/LwKhclXzServiceImpl.java new file mode 100644 index 0000000..0dd9ea0 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/lwKhclXz/service/impl/LwKhclXzServiceImpl.java @@ -0,0 +1,254 @@ +package org.jeecg.modules.demo.lwKhclXz.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.commons.lang.StringUtils; +import org.jeecg.common.util.DateUtils; +import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz; +import org.jeecg.modules.demo.lwKhclXz.mapper.LwKhclXzMapper; +import org.jeecg.modules.demo.lwKhclXz.service.ILwKhclXzService; +import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd; +import org.jeecg.modules.utils.SFTPUtil; +import org.jeecg.modules.utils.SftpConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URLConnection; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import java.io.BufferedInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import javax.net.ssl.HttpsURLConnection; + + +/** + * @Description: lw_khcl_xz + * @Author: jeecg-boot + * @Date: 2024-10-09 + * @Version: V1.0 + */ +@Service +public class LwKhclXzServiceImpl extends ServiceImpl implements ILwKhclXzService { + + @Value(value = "${jeecg.path.webapp}") + private String downloadpath; + + @Autowired + SftpConfig sftpConfig; + @Override + public LwKhclXz getLwBatchDown(LwKhclXz lwKhclXz, HttpServletResponse response) { + + String downPath[] = new String[6]; + LwKhclXz lwKhclXzInfo = baseMapper.selectById(lwKhclXz.getId()); + // 其余处理略 + InputStream inputStream = null; + OutputStream outputStream = null; + try{ + + + String ktbg = lwKhclXzInfo.getKtbg(); + String ktbgshyj = lwKhclXzInfo.getKtbgshyj(); + String zqjc = lwKhclXzInfo.getZqjc(); + String lwzg = lwKhclXzInfo.getLwzg(); + String zdjld = lwKhclXzInfo.getZdjld(); + String ccjgdown = lwKhclXzInfo.getCcjgdown(); +// downPath[0] =ktbg; +// downPath[1] =ktbgshyj; +// downPath[2] =zqjc; +// downPath[3] =lwzg; +// downPath[4] =zdjld; +// downPath[5] =ccjgdown; + + + if(StringUtils.isNotBlank(ktbg)){ + String imgPath = ktbg; + int index = imgPath.lastIndexOf("/"); + String path = "temp"; + if(index != -1){ + path = imgPath.substring(0,index); + } + Map map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path)); + String localFilePath = map.get("fileName"); + System.out.println(localFilePath); + downPath[0] =localFilePath.replace("/opt/webapp/",""); + } + if(StringUtils.isNotBlank(ktbgshyj)){ + String imgPath = ktbgshyj; + int index = imgPath.lastIndexOf("/"); + String path = "temp"; + if(index != -1){ + path = imgPath.substring(0,index); + } + Map map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path)); + String localFilePath = map.get("fileName"); + downPath[1] =localFilePath.replace("/opt/webapp/",""); + } + if(StringUtils.isNotBlank(zqjc)){ + String imgPath = zqjc; + int index = imgPath.lastIndexOf("/"); + String path = "temp"; + if(index != -1){ + path = imgPath.substring(0,index); + } + Map map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path)); + String localFilePath = map.get("fileName"); + downPath[2] =localFilePath.replace("/opt/webapp/",""); + } + if(StringUtils.isNotBlank(lwzg)){ + String imgPath = lwzg; + int index = imgPath.lastIndexOf("/"); + String path = "temp"; + if(index != -1){ + path = imgPath.substring(0,index); + } + Map map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path)); + String localFilePath = map.get("fileName"); + downPath[3] =localFilePath.replace("/opt/webapp/",""); + } + if(StringUtils.isNotBlank(zdjld)){ + String imgPath = zdjld; + int index = imgPath.lastIndexOf("/"); + String path = "temp"; + if(index != -1){ + path = imgPath.substring(0,index); + } + Map map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path)); + String localFilePath = map.get("fileName"); + downPath[4] =localFilePath.replace("/opt/webapp/",""); + } + if(StringUtils.isNotBlank(ccjgdown)){ + String savePath = downloadpath+"/bylw/"+lwKhclXzInfo.getXsxm()+ DateUtils.getCurrentTimestamp()+ "论文材料.zip"; + downloadWangluoFile(ccjgdown,savePath); + downPath[5] =savePath.replace("/opt/webapp/",""); + } + + + }catch (Exception e){ + }finally { + SFTPUtil.disChannel(); + SFTPUtil.disSession(); + } + + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + + + String files[] = new String[downPath.length]; + String name = "/"+lwKhclXz.getDownName()+".zip"; + String zipFileName = downloadpath+name; + + for(int i=0;i 0) { + zos.write(buffer, 0, length); + } + + fis.close(); + zos.closeEntry(); + }catch (Exception e){ + e.printStackTrace(); + } + + } + zos.close(); + } + + + + public static void downloadWangluoFile(String fileURL, String savePath) throws IOException { +// String fileURL = "https://vims.fanyu.com/toole/jianceorgan/getDownloadUrl?guid=ff9040ddamrg9k46"; // 要下载的文件URL +// String savePath = "D://a.zip"; // 下载后保存的文件路径 + try { + URL url = new URL(fileURL); + HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); + connection.connect(); + + int responseCode = connection.getResponseCode(); + if (responseCode == HttpsURLConnection.HTTP_OK) { + InputStream inputStream = new BufferedInputStream(connection.getInputStream()); + FileOutputStream outputStream = new FileOutputStream(savePath); + + byte[] buffer = new byte[1024]; + int bytesRead; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + outputStream.close(); + inputStream.close(); + System.out.println("文件下载完成!"); + } else { + System.out.println("无法连接到文件URL。响应代码:" + responseCode); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/CommonController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/CommonController.java index 585afab..f31d71b 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/CommonController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/CommonController.java @@ -390,9 +390,9 @@ public class CommonController { // if(StringUtils.isNotBlank(path)){ // return ""; // } - int idx = path.indexOf(downloadpath); + int idx = path.indexOf(uploadpath); if(idx==-1){ - filePath = downloadpath + File.separator + path; + filePath = uploadpath + File.separator + path; }else{ filePath = path; } diff --git a/jeecg-boot/pom.xml b/jeecg-boot/pom.xml index be8bbaa..72338b5 100644 --- a/jeecg-boot/pom.xml +++ b/jeecg-boot/pom.xml @@ -32,7 +32,7 @@ 1.8 UTF-8 - 9.0.89 + 9.0.90 2021.0.3 diff --git a/jeecg-boot/sftp/bylw/开题报告黄梦华(1)_20231213215618A083.docx b/jeecg-boot/sftp/bylw/开题报告黄梦华(1)_20231213215618A083.docx new file mode 100644 index 0000000..a1e6891 --- /dev/null +++ b/jeecg-boot/sftp/bylw/开题报告黄梦华(1)_20231213215618A083.docx @@ -0,0 +1,25 @@ +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 +u哦考试杜绝阿帆垃圾啊双打卡拉法基 + diff --git a/jeecgboot-vue3/src/utils/common/renderUtils.ts b/jeecgboot-vue3/src/utils/common/renderUtils.ts index 9efca05..81b1079 100644 --- a/jeecgboot-vue3/src/utils/common/renderUtils.ts +++ b/jeecgboot-vue3/src/utils/common/renderUtils.ts @@ -1,6 +1,6 @@ import { h } from 'vue'; import { Avatar, Tag, Tooltip, Image } from 'ant-design-vue'; -import { getFileAccessHttpUrl,getFileAccessHttpUrlLocal } from '/@/utils/common/compUtils'; +import { getFileAccessHttpUrl, getFileAccessHttpUrlLocal } from '/@/utils/common/compUtils'; import { Tinymce } from '/@/components/Tinymce'; import Icon from '/@/components/Icon'; import { getDictItemsByCode } from '/@/utils/dict/index'; @@ -170,6 +170,7 @@ function downloadFile(url) { url = url.substring(0, url.indexOf(',')); } url = getFileAccessHttpUrl(url.split(',')[0]); + console.log('👗downloadFile1111111111111111', url) if (url) { window.open(url); } @@ -192,4 +193,4 @@ function downloadFileLoacl(url) { } } -export { render, downloadFile,downloadFileLoacl }; +export { render, downloadFile, downloadFileLoacl }; diff --git a/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXz.api.ts b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXz.api.ts new file mode 100644 index 0000000..fbafc73 --- /dev/null +++ b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXz.api.ts @@ -0,0 +1,79 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/lwKhclXz/lwKhclXz/list', + save='/lwKhclXz/lwKhclXz/add', + edit='/lwKhclXz/lwKhclXz/edit', + deleteOne = '/lwKhclXz/lwKhclXz/delete', + deleteBatch = '/lwKhclXz/lwKhclXz/deleteBatch', + importExcel = '/lwKhclXz/lwKhclXz/importExcel', + exportXls = '/lwKhclXz/lwKhclXz/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +export const deleteXkxxOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXz.data.ts b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXz.data.ts new file mode 100644 index 0000000..456dc1c --- /dev/null +++ b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXz.data.ts @@ -0,0 +1,275 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '学生学号', + align: "center", + dataIndex: 'xsxh' + }, + { + title: '学生姓名', + align: "center", + dataIndex: 'xsxm' + }, + { + title: '毕业年份', + align: "center", + dataIndex: 'bynf' + }, + { + title: '班级', + align: "center", + dataIndex: 'bj' + }, + { + title: '毕业论文(设计)题目', + align: "center", + dataIndex: 'bylwTm' + }, + { + title: '毕业论文(设计)类别', + align: "center", + dataIndex: 'bylwLb' + }, + { + title: '毕业论文(设计)成绩', + align: "center", + dataIndex: 'bylwCj' + }, + { + title: '指导教师姓名', + align: "center", + dataIndex: 'zdjsxm' + }, + { + title: '指导教师职称', + align: "center", + dataIndex: 'zdjszc' + }, + { + title: '所属院系名称', + align: "center", + dataIndex: 'ssyxmc' + }, + { + title: '所属校内专业(大类)名称', + align: "center", + dataIndex: 'ssxnzymc' + }, + { + title: '是否实现电子化管理', + align: "center", + dataIndex: 'sfsxdzhgl' + }, + { + title: '关键词', + align: "center", + dataIndex: 'gjc' + }, + { + title: '查重结果', + align: "center", + dataIndex: 'ccjg' + }, + { + title: '开题报告', + align: "center", + dataIndex: 'ktbg' + }, + { + title: '开题报告审核意见', + align: "center", + dataIndex: 'ktbgshyj' + }, + { + title: '中期检查', + align: "center", + dataIndex: 'zqjc' + }, + { + title: '论文终稿', + align: "center", + dataIndex: 'lwzg' + }, + { + title: '论文终稿PDF', + align: "center", + dataIndex: 'lwzgPdf' + }, + { + title: '检测报告等材料', + align: "center", + dataIndex: 'jcbgdcl' + }, + { + title: '论文考核材料id', + align: "center", + dataIndex: 'mainId' + }, +]; + +export const columns2: BasicColumn[] = [ + { + title: '院系名称', + align: "center", + dataIndex: 'ssyxmc', + ellipsis: true, + }, + { + title: '校内专业', + align: "center", + dataIndex: 'ssxnzymc', + ellipsis: true, + }, + { + title: '指导教师姓名', + align: "center", + dataIndex: 'zdjsxm', + ellipsis: true, + }, + { + title: '学生学号', + align: "center", + dataIndex: 'xsxh', + ellipsis: true, + }, + { + title: '学生姓名', + align: "center", + dataIndex: 'xsxm', + ellipsis: true, + }, + { + title: '论文题目', + align: "center", + dataIndex: 'bylwTm', + ellipsis: true, + }, + { + title: '毕业年份', + align: "center", + dataIndex: 'bynf', + ellipsis: true, + }, + // { + // title: '班级', + // align: "center", + // dataIndex: 'bj', + // ellipsis: true, + // }, + { + title: '论文类别', + align: "center", + dataIndex: 'bylwLb', + ellipsis: true, + }, + { + title: '论文成绩', + align: "center", + dataIndex: 'bylwCj', + ellipsis: true, + }, + { + title: '操作', + dataIndex: 'action', + align: 'center', + width:100 + }, +]; + +export const columns3: BasicColumn[] = [ + { + title: '院系名称', + align: "center", + dataIndex: 'ssyxmc', + ellipsis: true, + }, + { + title: '校内专业', + align: "center", + dataIndex: 'ssxnzymc', + ellipsis: true, + }, + { + title: '指导教师姓名', + align: "center", + dataIndex: 'zdjsxm', + ellipsis: true, + }, + { + title: '学生学号', + align: "center", + dataIndex: 'xsxh', + ellipsis: true, + }, + { + title: '学生姓名', + align: "center", + dataIndex: 'xsxm', + ellipsis: true, + }, + { + title: '论文题目', + align: "center", + dataIndex: 'bylwTm', + ellipsis: true, + }, + { + title: '毕业年份', + align: "center", + dataIndex: 'bynf', + ellipsis: true, + }, + // { + // title: '班级', + // align: "center", + // dataIndex: 'bj', + // ellipsis: true, + // }, + { + title: '论文类别', + align: "center", + dataIndex: 'bylwLb', + ellipsis: true, + }, + { + title: '论文成绩', + align: "center", + dataIndex: 'bylwCj', + ellipsis: true, + }, + // { + // title: '终稿查重相似率', + // align: "center", + // dataIndex: 'ccjgxsl', + // ellipsis: true, + // }, +]; +// 高级查询数据 +export const superQuerySchema = { + xsxh: {title: '学生学号',order: 0,view: 'text', type: 'string',}, + xsxm: {title: '学生姓名',order: 1,view: 'text', type: 'string',}, + bynf: {title: '毕业年份',order: 2,view: 'text', type: 'string',}, + bj: {title: '班级',order: 3,view: 'text', type: 'string',}, + bylwTm: {title: '毕业论文(设计)题目',order: 4,view: 'text', type: 'string',}, + bylwLb: {title: '毕业论文(设计)类别',order: 5,view: 'text', type: 'string',}, + bylwCj: {title: '毕业论文(设计)成绩',order: 6,view: 'text', type: 'string',}, + zdjsxm: {title: '指导教师姓名',order: 7,view: 'text', type: 'string',}, + zdjszc: {title: '指导教师职称',order: 8,view: 'text', type: 'string',}, + ssyxmc: {title: '所属院系名称',order: 9,view: 'text', type: 'string',}, + ssxnzymc: {title: '所属校内专业(大类)名称',order: 10,view: 'text', type: 'string',}, + sfsxdzhgl: {title: '是否实现电子化管理',order: 11,view: 'text', type: 'string',}, + gjc: {title: '关键词',order: 12,view: 'text', type: 'string',}, + ccjg: {title: '查重结果',order: 13,view: 'text', type: 'string',}, + ktbg: {title: '开题报告',order: 14,view: 'text', type: 'string',}, + ktbgshyj: {title: '开题报告审核意见',order: 15,view: 'text', type: 'string',}, + zqjc: {title: '中期检查',order: 16,view: 'text', type: 'string',}, + lwzg: {title: '论文终稿',order: 17,view: 'text', type: 'string',}, + lwzgPdf: {title: '论文终稿PDF',order: 18,view: 'text', type: 'string',}, + jcbgdcl: {title: '检测报告等材料',order: 19,view: 'text', type: 'string',}, + mainId: {title: '论文考核材料id',order: 20,view: 'text', type: 'string',}, +}; diff --git a/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXzList.vue b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXzList.vue new file mode 100644 index 0000000..9bc8070 --- /dev/null +++ b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXzList.vue @@ -0,0 +1,235 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXzListIndex.vue b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXzListIndex.vue new file mode 100644 index 0000000..dd6347c --- /dev/null +++ b/jeecgboot-vue3/src/views/bl/lwKhclXz/LwKhclXzListIndex.vue @@ -0,0 +1,615 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/bl/lwKhclXz/components/LwKhclXzForm.vue b/jeecgboot-vue3/src/views/bl/lwKhclXz/components/LwKhclXzForm.vue new file mode 100644 index 0000000..1e345a4 --- /dev/null +++ b/jeecgboot-vue3/src/views/bl/lwKhclXz/components/LwKhclXzForm.vue @@ -0,0 +1,265 @@ + + + + +