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 43254220..97f7f25b 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 @@ -20,6 +20,7 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.SpringContextHolder; import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService; import org.jeecg.modules.kc.zyInfo.entity.ZyInfo; import org.jeecg.modules.kc.zyInfo.service.IZyInfoService; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; @@ -67,6 +68,9 @@ public class ZyInfoStudentController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = zyInfoStudentService.page(page, queryWrapper); @@ -260,4 +268,31 @@ public class ZyInfoStudentController extends JeecgController editCdlx(@RequestBody ZyInfoStudent zyInfoStudent) { + UpdateWrapper par = new UpdateWrapper<>(); + par.eq("id",zyInfoStudent.getId()); + par.set("cdlx",zyInfoStudent.getCdlx()); + zyInfoStudentService.update(par); + return Result.OK("设置存档类型成功!"); + } + + @ApiOperation(value="获取存档信息", notes="获取存档信息") + @GetMapping(value = "/cdxxlist") + public Result> cdxxlist(ZyInfoStudent zyInfoStudent, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap()); + queryWrapper.eq(StringUtils.isNotEmpty(zyInfoStudent.getTeacherNo()),"b.create_by",zyInfoStudent.getTeacherNo()); + queryWrapper.like(StringUtils.isNotEmpty(zyInfoStudent.getZyname()),"b.title",zyInfoStudent.getZyname()); + queryWrapper.isNotNull("cdlx"); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyInfoStudentService.cdxxlist(page, queryWrapper); + return Result.OK(pageList); + } + } 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 424daa33..d445d80f 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 @@ -86,6 +86,8 @@ public class ZyInfoStudent implements Serializable { private java.lang.String score; private java.lang.String pdfPath; private String scoreFabu; + @Dict(dicCode = "cdlx") + private String cdlx;//存档类型 @TableField(exist = false) private String catename; @@ -98,5 +100,8 @@ public class ZyInfoStudent implements Serializable { private String nwcc; @TableField(exist = false) private String aigccc; - + @TableField(exist = false) + private String zyname; + @TableField(exist = false) + private String teacherNo; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java index f98970db..bffbf78c 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java @@ -1,10 +1,12 @@ package org.jeecg.modules.kc.zyInfoStudent.mapper; -import java.util.List; - +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 学生提交作业 @@ -15,4 +17,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface ZyInfoStudentMapper extends BaseMapper { void deleteMainId(@Param("mainId") String id); + + IPage cdxxlist(Page page,@Param(Constants.WRAPPER) QueryWrapper queryWrapper); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml index f69f16a0..a68077e5 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml @@ -6,7 +6,13 @@ delete from zy_info_student where main_id = #{mainId} + + 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 4e800212..b3b1a25f 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 @@ -1,5 +1,8 @@ package org.jeecg.modules.kc.zyInfoStudent.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.kc.zyInfoStudent.entity.ZyInfoStudent; import com.baomidou.mybatisplus.extension.service.IService; @@ -18,4 +21,6 @@ public interface IZyInfoStudentService extends IService { public boolean updateById(ZyInfoStudent zyInfoStudent); void editFabu(ZyInfoStudent zyInfoStudent); + + IPage cdxxlist(Page page, QueryWrapper queryWrapper); } 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 41d42e02..5619e848 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 @@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; 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.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.jeecg.common.system.vo.LoginUser; @@ -124,6 +126,11 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl cdxxlist(Page page, QueryWrapper queryWrapper) { + return baseMapper.cdxxlist(page,queryWrapper); + } + //aigc提交 private void aigcSave(ZyInfoStudent zyInfoStudent) { String url = "https://vims.fanyu.com/tool/AIGCCheck/paperSubmit"; diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java index c9a363f9..55fb20ad 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java @@ -285,4 +285,72 @@ public class ZyJxdgController extends JeecgController { return Result.OK("引用成功!"); } + + + @AutoLog(value = "教学大纲-上传附件") + @ApiOperation(value="教学大纲-上传附件", notes="教学大纲-上传附件") + @PostMapping(value = "/jxdgScfj") + public Result jxdgScfj(@RequestBody ZyJxdg zyJxdg) { + if(StringUtils.isNotEmpty(zyJxdg.getFilePath())){ + String nameLast = zyJxdg.getFilePath().substring(zyJxdg.getFilePath().lastIndexOf(".")+1); + if(StringUtils.equals("pdf",nameLast)){ + zyJxdg.setPdfPath(zyJxdg.getFilePath()); + }else{ + Global global = SpringContextHolder.getBean(Global.class); + FileUtil.mkdir(global.getContractDickPath()); + String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"); + String docPath = upLoadPath+ File.separator+ zyJxdg.getFilePath(); + String namePath = dd + ".pdf"; + String pdfPath = global.getContractDickPath() + namePath; + PDFUtil.office2PDF(docPath,pdfPath); + zyJxdg.setPdfPath("contract/"+namePath); + } + }else{ + zyJxdg.setPdfPath(null); + } + if(StringUtils.isEmpty(zyJxdg.getId())){ + zyJxdgService.save(zyJxdg); + }else{ + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.set("file_path",zyJxdg.getFilePath()); + updateWrapper.set("pdf_path",zyJxdg.getPdfPath()); + updateWrapper.eq("id",zyJxdg.getId()); + zyJxdgService.update(updateWrapper); + } + return Result.OK(zyJxdg); + } + + @AutoLog(value = "教学日历-上传附件") + @ApiOperation(value="教学日历-上传附件", notes="教学日历-上传附件") + @PostMapping(value = "/jxrlScfj") + public Result jxrlScfj(@RequestBody ZyJxdg zyJxdg) { + if(StringUtils.isNotEmpty(zyJxdg.getJxrlFilePath())){ + String nameLast = zyJxdg.getJxrlFilePath().substring(zyJxdg.getJxrlFilePath().lastIndexOf(".")+1); + if(StringUtils.equals("pdf",nameLast)){ + zyJxdg.setJxrlPdfPath(zyJxdg.getJxrlFilePath()); + }else{ + Global global = SpringContextHolder.getBean(Global.class); + FileUtil.mkdir(global.getContractDickPath()); + String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"); + String docPath = upLoadPath+ File.separator+ zyJxdg.getJxrlFilePath(); + String namePath = dd + ".pdf"; + String pdfPath = global.getContractDickPath() + namePath; + PDFUtil.office2PDF(docPath,pdfPath); + zyJxdg.setJxrlPdfPath("contract/"+namePath); + } + }else{ + zyJxdg.setJxrlPdfPath(null); + } + if(StringUtils.isEmpty(zyJxdg.getId())){ + zyJxdgService.save(zyJxdg); + }else{ + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.set("jxrl_file_path",zyJxdg.getJxrlFilePath()); + updateWrapper.set("jxrl_pdf_path",zyJxdg.getJxrlPdfPath()); + updateWrapper.eq("id",zyJxdg.getId()); + zyJxdgService.update(updateWrapper); + } + return Result.OK(zyJxdg); + } + }