diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java index 7746889..ca79349 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/controller/EducationArticleController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 案例文章表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Api(tags="案例文章表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java index 79bb9b5..124600d 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/entity/EducationArticle.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 案例文章表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Data @@ -55,25 +55,45 @@ public class EducationArticle implements Serializable { @Excel(name = "封面", width = 15) @ApiModelProperty(value = "封面") private java.lang.String image; - /**学生情况*/ - @Excel(name = "学生情况", width = 15) - @ApiModelProperty(value = "学生情况") + /**模块标题一*/ + @Excel(name = "模块标题一", width = 15) + @ApiModelProperty(value = "模块标题一") + private java.lang.String titleOne; + /**模块内容一*/ + @Excel(name = "模块内容一", width = 15) + @ApiModelProperty(value = "模块内容一") private java.lang.String studentCondition; - /**服务项目*/ - @Excel(name = "服务项目", width = 15) - @ApiModelProperty(value = "服务项目") + /**模块标题二*/ + @Excel(name = "模块标题二", width = 15) + @ApiModelProperty(value = "模块标题二") + private java.lang.String titleTwo; + /**模块内容二*/ + @Excel(name = "模块内容二", width = 15) + @ApiModelProperty(value = "模块内容二") private java.lang.String serviceItem; - /**服务过程*/ - @Excel(name = "服务过程", width = 15) - @ApiModelProperty(value = "服务过程") + /**模块标题三*/ + @Excel(name = "模块标题三", width = 15) + @ApiModelProperty(value = "模块标题三") + private java.lang.String titleThree; + /**模块内容三*/ + @Excel(name = "模块内容三", width = 15) + @ApiModelProperty(value = "模块内容三") private java.lang.String serviceProcess; - /**服务结果*/ - @Excel(name = "服务结果", width = 15) - @ApiModelProperty(value = "服务结果") + /**模块标题四*/ + @Excel(name = "模块标题四", width = 15) + @ApiModelProperty(value = "模块标题四") + private java.lang.String titleFour; + /**模块内容四*/ + @Excel(name = "模块内容四", width = 15) + @ApiModelProperty(value = "模块内容四") private java.lang.String serviceResult; - /**服务感受*/ - @Excel(name = "服务感受", width = 15) - @ApiModelProperty(value = "服务感受") + /**模块标题五*/ + @Excel(name = "模块标题五", width = 15) + @ApiModelProperty(value = "模块标题五") + private java.lang.String titleFive; + /**模块内容五*/ + @Excel(name = "模块内容五", width = 15) + @ApiModelProperty(value = "模块内容五") private java.lang.String serviceFeeling; /**服务分类*/ @Excel(name = "服务分类", width = 15, dictTable = "education_category_service", dicText = "title", dicCode = "id") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java index 908d02e..d25f7b3 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/mapper/EducationArticleMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 案例文章表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationArticleMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java index 3f05996..07ddf13 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/IEducationArticleService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 案例文章表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationArticleService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java index 4f4eedc..f110976 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/service/impl/EducationArticleServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 案例文章表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue index 808e924..af193b6 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/EducationArticleList.vue @@ -134,31 +134,56 @@ scopedSlots: {customRender: 'imgSlot'} }, { - title:'学生情况', + title:'模块标题一', + align:"center", + dataIndex: 'titleOne' + }, + { + title:'模块内容一', align:"center", dataIndex: 'studentCondition', scopedSlots: {customRender: 'htmlSlot'} }, { - title:'服务项目', + title:'模块标题二', + align:"center", + dataIndex: 'titleTwo' + }, + { + title:'模块内容二', align:"center", dataIndex: 'serviceItem', scopedSlots: {customRender: 'htmlSlot'} }, { - title:'服务过程', + title:'模块标题三', + align:"center", + dataIndex: 'titleThree' + }, + { + title:'模块内容三', align:"center", dataIndex: 'serviceProcess', scopedSlots: {customRender: 'htmlSlot'} }, { - title:'服务结果', + title:'模块标题四', + align:"center", + dataIndex: 'titleFour' + }, + { + title:'模块内容四', align:"center", dataIndex: 'serviceResult', scopedSlots: {customRender: 'htmlSlot'} }, { - title:'服务感受', + title:'模块标题五', + align:"center", + dataIndex: 'titleFive' + }, + { + title:'模块内容五', align:"center", dataIndex: 'serviceFeeling', scopedSlots: {customRender: 'htmlSlot'} @@ -223,13 +248,18 @@ }, getSuperFieldList(){ let fieldList=[]; - fieldList.push({type:'string',value:'title',text:'标题',dictCode:''}) + fieldList.push({type:'Text',value:'title',text:'标题',dictCode:''}) fieldList.push({type:'Text',value:'image',text:'封面',dictCode:''}) - fieldList.push({type:'Text',value:'studentCondition',text:'学生情况',dictCode:''}) - fieldList.push({type:'Text',value:'serviceItem',text:'服务项目',dictCode:''}) - fieldList.push({type:'Text',value:'serviceProcess',text:'服务过程',dictCode:''}) - fieldList.push({type:'Text',value:'serviceResult',text:'服务结果',dictCode:''}) - fieldList.push({type:'Text',value:'serviceFeeling',text:'服务感受',dictCode:''}) + fieldList.push({type:'Text',value:'titleOne',text:'模块标题一',dictCode:''}) + fieldList.push({type:'Text',value:'studentCondition',text:'模块内容一',dictCode:''}) + fieldList.push({type:'Text',value:'titleTwo',text:'模块标题二',dictCode:''}) + fieldList.push({type:'Text',value:'serviceItem',text:'模块内容二',dictCode:''}) + fieldList.push({type:'Text',value:'titleThree',text:'模块标题三',dictCode:''}) + fieldList.push({type:'Text',value:'serviceProcess',text:'模块内容三',dictCode:''}) + fieldList.push({type:'Text',value:'titleFour',text:'模块标题四',dictCode:''}) + fieldList.push({type:'Text',value:'serviceResult',text:'模块内容四',dictCode:''}) + fieldList.push({type:'Text',value:'titleFive',text:'模块标题五',dictCode:''}) + fieldList.push({type:'Text',value:'serviceFeeling',text:'模块内容五',dictCode:''}) fieldList.push({type:'string',value:'categoryServiceId',text:'服务分类',dictCode:"education_category_service,title,id"}) fieldList.push({type:'string',value:'categoryMajorId',text:'专业分类',dictCode:"education_category_major,title,id"}) fieldList.push({type:'string',value:'categoryPeriodId',text:'阶段分类',dictCode:"education_category_period,title,id"}) diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue index 7554b74..9670555 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue/modules/EducationArticleForm.vue @@ -14,27 +14,52 @@ - + + + + + + - + + + + + + - + + + + + + - + + + + + + - + + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts index 1d0b3d5..4ad128f 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationArticle/vue3/EducationArticle.data.ts @@ -16,31 +16,56 @@ export const columns: BasicColumn[] = [ customRender:render.renderAvatar, }, { - title: '学生情况', + title: '模块标题一', + align:"center", + dataIndex: 'titleOne' + }, + { + title: '模块内容一', align:"center", dataIndex: 'studentCondition', slots: { customRender: 'htmlSlot' }, }, { - title: '服务项目', + title: '模块标题二', + align:"center", + dataIndex: 'titleTwo' + }, + { + title: '模块内容二', align:"center", dataIndex: 'serviceItem', slots: { customRender: 'htmlSlot' }, }, { - title: '服务过程', + title: '模块标题三', + align:"center", + dataIndex: 'titleThree' + }, + { + title: '模块内容三', align:"center", dataIndex: 'serviceProcess', slots: { customRender: 'htmlSlot' }, }, { - title: '服务结果', + title: '模块标题四', + align:"center", + dataIndex: 'titleFour' + }, + { + title: '模块内容四', align:"center", dataIndex: 'serviceResult', slots: { customRender: 'htmlSlot' }, }, { - title: '服务感受', + title: '模块标题五', + align:"center", + dataIndex: 'titleFive' + }, + { + title: '模块内容五', align:"center", dataIndex: 'serviceFeeling', slots: { customRender: 'htmlSlot' }, @@ -90,27 +115,52 @@ export const formSchema: FormSchema[] = [ }, }, { - label: '学生情况', + label: '模块标题一', + field: 'titleOne', + component: 'Input', + }, + { + label: '模块内容一', field: 'studentCondition', component: 'JCodeEditor', //TODO String后缀暂未添加 }, { - label: '服务项目', + label: '模块标题二', + field: 'titleTwo', + component: 'Input', + }, + { + label: '模块内容二', field: 'serviceItem', component: 'JCodeEditor', //TODO String后缀暂未添加 }, { - label: '服务过程', + label: '模块标题三', + field: 'titleThree', + component: 'Input', + }, + { + label: '模块内容三', field: 'serviceProcess', component: 'JCodeEditor', //TODO String后缀暂未添加 }, { - label: '服务结果', + label: '模块标题四', + field: 'titleFour', + component: 'Input', + }, + { + label: '模块内容四', field: 'serviceResult', component: 'JCodeEditor', //TODO String后缀暂未添加 }, { - label: '服务感受', + label: '模块标题五', + field: 'titleFive', + component: 'Input', + }, + { + label: '模块内容五', field: 'serviceFeeling', component: 'JCodeEditor', //TODO String后缀暂未添加 }, diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/controller/EducationCategoryThesisTwoController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/controller/EducationCategoryThesisTwoController.java new file mode 100644 index 0000000..cfe416e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/controller/EducationCategoryThesisTwoController.java @@ -0,0 +1,229 @@ +package org.jeecg.modules.educationCategoryThesisTwo.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.educationCategoryThesisTwo.entity.EducationCategoryThesisTwo; +import org.jeecg.modules.educationCategoryThesisTwo.service.IEducationCategoryThesisTwoService; + +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; + + /** + * @Description: 论文分类表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Api(tags="论文分类表二") +@RestController +@RequestMapping("/educationCategoryThesisTwo/educationCategoryThesisTwo") +@Slf4j +public class EducationCategoryThesisTwoController extends JeecgController{ + @Autowired + private IEducationCategoryThesisTwoService educationCategoryThesisTwoService; + + /** + * 分页列表查询 + * + * @param educationCategoryThesisTwo + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "论文分类表二-分页列表查询") + @ApiOperation(value="论文分类表二-分页列表查询", notes="论文分类表二-分页列表查询") + @GetMapping(value = "/rootList") + public Result> queryPageList(EducationCategoryThesisTwo educationCategoryThesisTwo, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + String hasQuery = req.getParameter("hasQuery"); + if(hasQuery != null && "true".equals(hasQuery)){ + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryThesisTwo, req.getParameterMap()); + List list = educationCategoryThesisTwoService.queryTreeListNoPage(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + }else{ + String parentId = educationCategoryThesisTwo.getPid(); + if (oConvertUtils.isEmpty(parentId)) { + parentId = "0"; + } + educationCategoryThesisTwo.setPid(null); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryThesisTwo, req.getParameterMap()); + // 使用 eq 防止模糊查询 + queryWrapper.eq("pid", parentId); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationCategoryThesisTwoService.page(page, queryWrapper); + return Result.OK(pageList); + } + } + + /** + * 获取子数据 + * @param educationCategoryThesisTwo + * @param req + * @return + */ + //@AutoLog(value = "论文分类表二-获取子数据") + @ApiOperation(value="论文分类表二-获取子数据", notes="论文分类表二-获取子数据") + @GetMapping(value = "/childList") + public Result> queryPageList(EducationCategoryThesisTwo educationCategoryThesisTwo,HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationCategoryThesisTwo, req.getParameterMap()); + List list = educationCategoryThesisTwoService.list(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + } + + /** + * 批量查询子节点 + * @param parentIds 父ID(多个采用半角逗号分割) + * @return 返回 IPage + * @param parentIds + * @return + */ + //@AutoLog(value = "论文分类表二-批量获取子数据") + @ApiOperation(value="论文分类表二-批量获取子数据", notes="论文分类表二-批量获取子数据") + @GetMapping("/getChildListBatch") + public Result getChildListBatch(@RequestParam("parentIds") String parentIds) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List parentIdList = Arrays.asList(parentIds.split(",")); + queryWrapper.in("pid", parentIdList); + List list = educationCategoryThesisTwoService.list(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + } catch (Exception e) { + log.error(e.getMessage(), e); + return Result.error("批量查询子节点失败:" + e.getMessage()); + } + } + + /** + * 添加 + * + * @param educationCategoryThesisTwo + * @return + */ + @AutoLog(value = "论文分类表二-添加") + @ApiOperation(value="论文分类表二-添加", notes="论文分类表二-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationCategoryThesisTwo educationCategoryThesisTwo) { + educationCategoryThesisTwoService.addEducationCategoryThesisTwo(educationCategoryThesisTwo); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationCategoryThesisTwo + * @return + */ + @AutoLog(value = "论文分类表二-编辑") + @ApiOperation(value="论文分类表二-编辑", notes="论文分类表二-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationCategoryThesisTwo educationCategoryThesisTwo) { + educationCategoryThesisTwoService.updateEducationCategoryThesisTwo(educationCategoryThesisTwo); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "论文分类表二-通过id删除") + @ApiOperation(value="论文分类表二-通过id删除", notes="论文分类表二-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationCategoryThesisTwoService.deleteEducationCategoryThesisTwo(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "论文分类表二-批量删除") + @ApiOperation(value="论文分类表二-批量删除", notes="论文分类表二-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationCategoryThesisTwoService.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) { + EducationCategoryThesisTwo educationCategoryThesisTwo = educationCategoryThesisTwoService.getById(id); + if(educationCategoryThesisTwo==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationCategoryThesisTwo); + } + + /** + * 导出excel + * + * @param request + * @param educationCategoryThesisTwo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationCategoryThesisTwo educationCategoryThesisTwo) { + return super.exportXls(request, educationCategoryThesisTwo, EducationCategoryThesisTwo.class, "论文分类表二"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EducationCategoryThesisTwo.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/entity/EducationCategoryThesisTwo.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/entity/EducationCategoryThesisTwo.java new file mode 100644 index 0000000..8215944 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/entity/EducationCategoryThesisTwo.java @@ -0,0 +1,63 @@ +package org.jeecg.modules.educationCategoryThesisTwo.entity; + +import java.io.Serializable; +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 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 java.io.UnsupportedEncodingException; + +/** + * @Description: 论文分类表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Data +@TableName("education_category_thesis_two") +@ApiModel(value="education_category_thesis_two对象", description="论文分类表二") +public class EducationCategoryThesisTwo implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**分类名称*/ + @Excel(name = "分类名称", width = 15) + @ApiModelProperty(value = "分类名称") + private java.lang.String title; + /**图标*/ + @Excel(name = "图标", width = 15) + @ApiModelProperty(value = "图标") + private java.lang.String image; + /**父级节点*/ + @Excel(name = "父级节点", width = 15) + @ApiModelProperty(value = "父级节点") + private java.lang.String pid; + /**是否有子节点*/ + @Excel(name = "是否有子节点", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否有子节点") + private java.lang.String hasChild; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/mapper/EducationCategoryThesisTwoMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/mapper/EducationCategoryThesisTwoMapper.java new file mode 100644 index 0000000..aea0a54 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/mapper/EducationCategoryThesisTwoMapper.java @@ -0,0 +1,22 @@ +package org.jeecg.modules.educationCategoryThesisTwo.mapper; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationCategoryThesisTwo.entity.EducationCategoryThesisTwo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 论文分类表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface EducationCategoryThesisTwoMapper extends BaseMapper { + + /** + * 编辑节点状态 + * @param id + * @param status + */ + void updateTreeNodeStatus(@Param("id") String id,@Param("status") String status); + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/mapper/xml/EducationCategoryThesisTwoMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/mapper/xml/EducationCategoryThesisTwoMapper.xml new file mode 100644 index 0000000..8d673e2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/mapper/xml/EducationCategoryThesisTwoMapper.xml @@ -0,0 +1,9 @@ + + + + + + update education_category_thesis_two set has_child = #{status} where id = #{id} + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/service/IEducationCategoryThesisTwoService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/service/IEducationCategoryThesisTwoService.java new file mode 100644 index 0000000..9af2c06 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/service/IEducationCategoryThesisTwoService.java @@ -0,0 +1,38 @@ +package org.jeecg.modules.educationCategoryThesisTwo.service; + +import org.jeecg.modules.educationCategoryThesisTwo.entity.EducationCategoryThesisTwo; +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.common.exception.JeecgBootException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import java.util.List; + +/** + * @Description: 论文分类表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface IEducationCategoryThesisTwoService extends IService { + + /**根节点父ID的值*/ + public static final String ROOT_PID_VALUE = "0"; + + /**树节点有子节点状态值*/ + public static final String HASCHILD = "1"; + + /**树节点无子节点状态值*/ + public static final String NOCHILD = "0"; + + /**新增节点*/ + void addEducationCategoryThesisTwo(EducationCategoryThesisTwo educationCategoryThesisTwo); + + /**修改节点*/ + void updateEducationCategoryThesisTwo(EducationCategoryThesisTwo educationCategoryThesisTwo) throws JeecgBootException; + + /**删除节点*/ + void deleteEducationCategoryThesisTwo(String id) throws JeecgBootException; + + /**查询所有数据,无分页*/ + List queryTreeListNoPage(QueryWrapper queryWrapper); + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/service/impl/EducationCategoryThesisTwoServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/service/impl/EducationCategoryThesisTwoServiceImpl.java new file mode 100644 index 0000000..f671c87 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/service/impl/EducationCategoryThesisTwoServiceImpl.java @@ -0,0 +1,191 @@ +package org.jeecg.modules.educationCategoryThesisTwo.service.impl; + +import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationCategoryThesisTwo.entity.EducationCategoryThesisTwo; +import org.jeecg.modules.educationCategoryThesisTwo.mapper.EducationCategoryThesisTwoMapper; +import org.jeecg.modules.educationCategoryThesisTwo.service.IEducationCategoryThesisTwoService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 论文分类表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Service +public class EducationCategoryThesisTwoServiceImpl extends ServiceImpl implements IEducationCategoryThesisTwoService { + + @Override + public void addEducationCategoryThesisTwo(EducationCategoryThesisTwo educationCategoryThesisTwo) { + //新增时设置hasChild为0 + educationCategoryThesisTwo.setHasChild(IEducationCategoryThesisTwoService.NOCHILD); + if(oConvertUtils.isEmpty(educationCategoryThesisTwo.getPid())){ + educationCategoryThesisTwo.setPid(IEducationCategoryThesisTwoService.ROOT_PID_VALUE); + }else{ + //如果当前节点父ID不为空 则设置父节点的hasChildren 为1 + EducationCategoryThesisTwo parent = baseMapper.selectById(educationCategoryThesisTwo.getPid()); + if(parent!=null && !"1".equals(parent.getHasChild())){ + parent.setHasChild("1"); + baseMapper.updateById(parent); + } + } + baseMapper.insert(educationCategoryThesisTwo); + } + + @Override + public void updateEducationCategoryThesisTwo(EducationCategoryThesisTwo educationCategoryThesisTwo) { + EducationCategoryThesisTwo entity = this.getById(educationCategoryThesisTwo.getId()); + if(entity==null) { + throw new JeecgBootException("未找到对应实体"); + } + String old_pid = entity.getPid(); + String new_pid = educationCategoryThesisTwo.getPid(); + if(!old_pid.equals(new_pid)) { + updateOldParentNode(old_pid); + if(oConvertUtils.isEmpty(new_pid)){ + educationCategoryThesisTwo.setPid(IEducationCategoryThesisTwoService.ROOT_PID_VALUE); + } + if(!IEducationCategoryThesisTwoService.ROOT_PID_VALUE.equals(educationCategoryThesisTwo.getPid())) { + baseMapper.updateTreeNodeStatus(educationCategoryThesisTwo.getPid(), IEducationCategoryThesisTwoService.HASCHILD); + } + } + baseMapper.updateById(educationCategoryThesisTwo); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteEducationCategoryThesisTwo(String id) throws JeecgBootException { + //查询选中节点下所有子节点一并删除 + id = this.queryTreeChildIds(id); + if(id.indexOf(",")>0) { + StringBuffer sb = new StringBuffer(); + String[] idArr = id.split(","); + for (String idVal : idArr) { + if(idVal != null){ + EducationCategoryThesisTwo educationCategoryThesisTwo = this.getById(idVal); + String pidVal = educationCategoryThesisTwo.getPid(); + //查询此节点上一级是否还有其他子节点 + List dataList = baseMapper.selectList(new QueryWrapper().eq("pid", pidVal).notIn("id",Arrays.asList(idArr))); + if((dataList == null || dataList.size()==0) && !Arrays.asList(idArr).contains(pidVal) + && !sb.toString().contains(pidVal)){ + //如果当前节点原本有子节点 现在木有了,更新状态 + sb.append(pidVal).append(","); + } + } + } + //批量删除节点 + baseMapper.deleteBatchIds(Arrays.asList(idArr)); + //修改已无子节点的标识 + String[] pidArr = sb.toString().split(","); + for(String pid : pidArr){ + this.updateOldParentNode(pid); + } + }else{ + EducationCategoryThesisTwo educationCategoryThesisTwo = this.getById(id); + if(educationCategoryThesisTwo==null) { + throw new JeecgBootException("未找到对应实体"); + } + updateOldParentNode(educationCategoryThesisTwo.getPid()); + baseMapper.deleteById(id); + } + } + + @Override + public List queryTreeListNoPage(QueryWrapper queryWrapper) { + List dataList = baseMapper.selectList(queryWrapper); + List mapList = new ArrayList<>(); + for(EducationCategoryThesisTwo data : dataList){ + String pidVal = data.getPid(); + //递归查询子节点的根节点 + if(pidVal != null && !"0".equals(pidVal)){ + EducationCategoryThesisTwo rootVal = this.getTreeRoot(pidVal); + if(rootVal != null && !mapList.contains(rootVal)){ + mapList.add(rootVal); + } + }else{ + if(!mapList.contains(data)){ + mapList.add(data); + } + } + } + return mapList; + } + + /** + * 根据所传pid查询旧的父级节点的子节点并修改相应状态值 + * @param pid + */ + private void updateOldParentNode(String pid) { + if(!IEducationCategoryThesisTwoService.ROOT_PID_VALUE.equals(pid)) { + Integer count = Math.toIntExact(baseMapper.selectCount(new QueryWrapper().eq("pid", pid))); + if(count==null || count<=1) { + baseMapper.updateTreeNodeStatus(pid, IEducationCategoryThesisTwoService.NOCHILD); + } + } + } + + /** + * 递归查询节点的根节点 + * @param pidVal + * @return + */ + private EducationCategoryThesisTwo getTreeRoot(String pidVal){ + EducationCategoryThesisTwo data = baseMapper.selectById(pidVal); + if(data != null && !"0".equals(data.getPid())){ + return this.getTreeRoot(data.getPid()); + }else{ + return data; + } + } + + /** + * 根据id查询所有子节点id + * @param ids + * @return + */ + private String queryTreeChildIds(String ids) { + //获取id数组 + String[] idArr = ids.split(","); + StringBuffer sb = new StringBuffer(); + for (String pidVal : idArr) { + if(pidVal != null){ + if(!sb.toString().contains(pidVal)){ + if(sb.toString().length() > 0){ + sb.append(","); + } + sb.append(pidVal); + this.getTreeChildIds(pidVal,sb); + } + } + } + return sb.toString(); + } + + /** + * 递归查询所有子节点 + * @param pidVal + * @param sb + * @return + */ + private StringBuffer getTreeChildIds(String pidVal,StringBuffer sb){ + List dataList = baseMapper.selectList(new QueryWrapper().eq("pid", pidVal)); + if(dataList != null && dataList.size()>0){ + for(EducationCategoryThesisTwo tree : dataList) { + if(!sb.toString().contains(tree.getId())){ + sb.append(",").append(tree.getId()); + } + this.getTreeChildIds(tree.getId(),sb); + } + } + return sb; + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue/EducationCategoryThesisTwoList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue/EducationCategoryThesisTwoList.vue new file mode 100644 index 0000000..a22966b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue/EducationCategoryThesisTwoList.vue @@ -0,0 +1,354 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue/modules/EducationCategoryThesisTwoModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue/modules/EducationCategoryThesisTwoModal.vue new file mode 100644 index 0000000..cba054b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue/modules/EducationCategoryThesisTwoModal.vue @@ -0,0 +1,156 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwo.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwo.api.ts new file mode 100644 index 0000000..a5f65ad --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwo.api.ts @@ -0,0 +1,82 @@ +import {defHttp} from "/@/utils/http/axios"; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/educationCategoryThesisTwo/educationCategoryThesisTwo/rootList', + save='/educationCategoryThesisTwo/educationCategoryThesisTwo/add', + edit='/educationCategoryThesisTwo/educationCategoryThesisTwo/edit', + deleteEducationCategoryThesisTwo = '/sys/educationCategoryThesisTwo/delete', + deleteBatch = '/educationCategoryThesisTwo/educationCategoryThesisTwo/deleteBatch', + importExcel = '/educationCategoryThesisTwo/educationCategoryThesisTwo/importExcel', + exportXls = '/educationCategoryThesisTwo/educationCategoryThesisTwo/exportXls', + loadTreeData = '/educationCategoryThesisTwo/educationCategoryThesisTwo/loadTreeRoot', + getChildList = '/educationCategoryThesisTwo/educationCategoryThesisTwo/childList', + getChildListBatch = '/educationCategoryThesisTwo/educationCategoryThesisTwo/getChildListBatch', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + * @param params + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); +/** + * 删除 + */ +export const deleteEducationCategoryThesisTwo = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteEducationCategoryThesisTwo, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDeleteEducationCategoryThesisTwo = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdateDict = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} +/** + * 查询全部树形节点数据 + * @param params + */ +export const loadTreeData = (params) => + defHttp.get({url: Api.loadTreeData,params}); +/** + * 查询子节点数据 + * @param params + */ +export const getChildList = (params) => + defHttp.get({url: Api.getChildList, params}); +/** + * 批量查询子节点数据 + * @param params + */ +export const getChildListBatch = (params) => + defHttp.get({url: Api.getChildListBatch, params},{isTransformResponse:false}); diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwo.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwo.data.ts new file mode 100644 index 0000000..c2c485b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwo.data.ts @@ -0,0 +1,41 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '分类名称', + align:"center", + dataIndex: 'title' + }, + { + title: '图标', + align:"center", + dataIndex: 'image', + customRender:render.renderAvatar, + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '分类名称', + field: 'title', + component: 'Input', + }, + { + label: '图标', + field: 'image', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '父级节点', + field: 'pid', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwoList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwoList.vue new file mode 100644 index 0000000..38151d8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/EducationCategoryThesisTwoList.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/components/EducationCategoryThesisTwoModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/components/EducationCategoryThesisTwoModal.vue new file mode 100644 index 0000000..f04cd0e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationCategoryThesisTwo/vue3/components/EducationCategoryThesisTwoModal.vue @@ -0,0 +1,87 @@ + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java index 6f63685..902852d 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/controller/EducationThesisController.java @@ -22,6 +22,7 @@ import org.apache.shiro.SecurityUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.educationThesis.entity.EducationProcess; import org.jeecg.modules.educationThesis.entity.EducationTarget; import org.jeecg.modules.educationThesis.entity.EducationTeacher; import org.jeecg.modules.educationThesis.entity.EducationCourse; @@ -30,6 +31,7 @@ import org.jeecg.modules.educationThesis.entity.EducationDocument; import org.jeecg.modules.educationThesis.entity.EducationThesis; import org.jeecg.modules.educationThesis.vo.EducationThesisPage; import org.jeecg.modules.educationThesis.service.IEducationThesisService; +import org.jeecg.modules.educationThesis.service.IEducationProcessService; import org.jeecg.modules.educationThesis.service.IEducationTargetService; import org.jeecg.modules.educationThesis.service.IEducationTeacherService; import org.jeecg.modules.educationThesis.service.IEducationCourseService; @@ -53,7 +55,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 论文信息表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Api(tags="论文信息表") @@ -64,6 +66,8 @@ public class EducationThesisController { @Autowired private IEducationThesisService educationThesisService; @Autowired + private IEducationProcessService educationProcessService; + @Autowired private IEducationTargetService educationTargetService; @Autowired private IEducationTeacherService educationTeacherService; @@ -108,7 +112,7 @@ public class EducationThesisController { public Result add(@RequestBody EducationThesisPage educationThesisPage) { EducationThesis educationThesis = new EducationThesis(); BeanUtils.copyProperties(educationThesisPage, educationThesis); - educationThesisService.saveMain(educationThesis, educationThesisPage.getEducationTargetList(),educationThesisPage.getEducationTeacherList(),educationThesisPage.getEducationCourseList(),educationThesisPage.getEducationPeriodicalList(),educationThesisPage.getEducationDocumentList()); + educationThesisService.saveMain(educationThesis, educationThesisPage.getEducationProcessList(),educationThesisPage.getEducationTargetList(),educationThesisPage.getEducationTeacherList(),educationThesisPage.getEducationCourseList(),educationThesisPage.getEducationPeriodicalList(),educationThesisPage.getEducationDocumentList()); return Result.OK("添加成功!"); } @@ -128,7 +132,7 @@ public class EducationThesisController { if(educationThesisEntity==null) { return Result.error("未找到对应数据"); } - educationThesisService.updateMain(educationThesis, educationThesisPage.getEducationTargetList(),educationThesisPage.getEducationTeacherList(),educationThesisPage.getEducationCourseList(),educationThesisPage.getEducationPeriodicalList(),educationThesisPage.getEducationDocumentList()); + educationThesisService.updateMain(educationThesis, educationThesisPage.getEducationProcessList(),educationThesisPage.getEducationTargetList(),educationThesisPage.getEducationTeacherList(),educationThesisPage.getEducationCourseList(),educationThesisPage.getEducationPeriodicalList(),educationThesisPage.getEducationDocumentList()); return Result.OK("编辑成功!"); } @@ -178,6 +182,19 @@ public class EducationThesisController { } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "发表全流程辅导通过主表ID查询") + @ApiOperation(value="发表全流程辅导主表ID查询", notes="发表全流程辅导-通主表ID查询") + @GetMapping(value = "/queryEducationProcessByMainId") + public Result> queryEducationProcessListByMainId(@RequestParam(name="id",required=true) String id) { + List educationProcessList = educationProcessService.selectByMainId(id); + return Result.OK(educationProcessList); + } /** * 通过id查询 * @@ -273,6 +290,8 @@ public class EducationThesisController { for (EducationThesis main : educationThesisList) { EducationThesisPage vo = new EducationThesisPage(); BeanUtils.copyProperties(main, vo); + List educationProcessList = educationProcessService.selectByMainId(main.getId()); + vo.setEducationProcessList(educationProcessList); List educationTargetList = educationTargetService.selectByMainId(main.getId()); vo.setEducationTargetList(educationTargetList); List educationTeacherList = educationTeacherService.selectByMainId(main.getId()); @@ -317,7 +336,7 @@ public class EducationThesisController { for (EducationThesisPage page : list) { EducationThesis po = new EducationThesis(); BeanUtils.copyProperties(page, po); - educationThesisService.saveMain(po, page.getEducationTargetList(),page.getEducationTeacherList(),page.getEducationCourseList(),page.getEducationPeriodicalList(),page.getEducationDocumentList()); + educationThesisService.saveMain(po, page.getEducationProcessList(),page.getEducationTargetList(),page.getEducationTeacherList(),page.getEducationCourseList(),page.getEducationPeriodicalList(),page.getEducationDocumentList()); } return Result.OK("文件导入成功!数据行数:" + list.size()); } catch (Exception e) { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java index 36508b1..f92f2bd 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationCourse.java @@ -16,7 +16,7 @@ import java.io.UnsupportedEncodingException; /** * @Description: 课程安排表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @ApiModel(value="education_course对象", description="课程安排表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java index 86d32bc..789264a 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationDocument.java @@ -16,7 +16,7 @@ import java.io.UnsupportedEncodingException; /** * @Description: 附加材料表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @ApiModel(value="education_document对象", description="附加材料表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java index 7a25056..91a7884 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationPeriodical.java @@ -16,7 +16,7 @@ import java.io.UnsupportedEncodingException; /** * @Description: 期刊推荐表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @ApiModel(value="education_periodical对象", description="期刊推荐表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationProcess.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationProcess.java new file mode 100644 index 0000000..d19e591 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationProcess.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesis.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 发表全流程辅导 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@ApiModel(value="education_process对象", description="发表全流程辅导") +@Data +@TableName("education_process") +public class EducationProcess implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**文本内容*/ + @Excel(name = "文本内容", width = 15) + @ApiModelProperty(value = "文本内容") + private java.lang.String content; + /**关联论文id*/ + @ApiModelProperty(value = "关联论文id") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java index 8692782..99bc814 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTarget.java @@ -16,7 +16,7 @@ import java.io.UnsupportedEncodingException; /** * @Description: 发表方向表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @ApiModel(value="education_target对象", description="发表方向表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java index 76bc385..9d6c54e 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationTeacher.java @@ -16,7 +16,7 @@ import java.io.UnsupportedEncodingException; /** * @Description: 师资力量表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @ApiModel(value="education_teacher对象", description="师资力量表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java index fc4e368..4cf1f0f 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/entity/EducationThesis.java @@ -20,7 +20,7 @@ import io.swagger.annotations.ApiModelProperty; /** * @Description: 论文信息表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @ApiModel(value="education_thesis对象", description="论文信息表") @@ -50,7 +50,8 @@ public class EducationThesis implements Serializable { @ApiModelProperty(value = "一级分类") private java.lang.String categoryOne; /**二级分类*/ - @Excel(name = "二级分类", width = 15) + @Excel(name = "二级分类", width = 15, dictTable = "education_category_thesis", dicText = "title", dicCode = "id") + @Dict(dictTable = "education_category_thesis", dicText = "title", dicCode = "id") @ApiModelProperty(value = "二级分类") private java.lang.String categoryTwo; /**标题*/ @@ -61,9 +62,9 @@ public class EducationThesis implements Serializable { @Excel(name = "副标题", width = 15) @ApiModelProperty(value = "副标题") private java.lang.String shortTitle; - /**封面*/ - @Excel(name = "封面", width = 15) - @ApiModelProperty(value = "封面") + /**详情页图片*/ + @Excel(name = "详情页图片", width = 15) + @ApiModelProperty(value = "详情页图片") private java.lang.String image; /**发表全流程辅导*/ @Excel(name = "发表全流程辅导", width = 15) @@ -73,15 +74,19 @@ public class EducationThesis implements Serializable { @Excel(name = "适用人群", width = 15) @ApiModelProperty(value = "适用人群") private java.lang.String suit; - /**海报图片*/ - @Excel(name = "海报图片", width = 15) - @ApiModelProperty(value = "海报图片") + /**封面/海报图片*/ + @Excel(name = "封面/海报图片", width = 15) + @ApiModelProperty(value = "封面/海报图片") private java.lang.String paperImage; /**海报文字描述*/ @Excel(name = "海报文字描述", width = 15) @ApiModelProperty(value = "海报文字描述") private java.lang.String paperDesc; + //发表全流程辅导 + @TableField(exist = false) + List educationProcessList; + //发表方向列表 @TableField(exist = false) List educationTargetList; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java index a7586b2..6aae4b5 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationCourseMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; /** * @Description: 课程安排表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationCourseMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java index bacf65e..085191e 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationDocumentMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; /** * @Description: 附加材料表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationDocumentMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java index ad467a1..15c42e3 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationPeriodicalMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; /** * @Description: 期刊推荐表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationPeriodicalMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationProcessMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationProcessMapper.java new file mode 100644 index 0000000..822a4f8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationProcessMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesis.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesis.entity.EducationProcess; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 发表全流程辅导 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface EducationProcessMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java index fccf735..e9f6435 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTargetMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; /** * @Description: 发表方向表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationTargetMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java index c96ef61..42be1f2 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationTeacherMapper.java @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param; /** * @Description: 师资力量表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationTeacherMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java index 9da3b8b..bfc5ef2 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/EducationThesisMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 论文信息表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface EducationThesisMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationProcessMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationProcessMapper.xml new file mode 100644 index 0000000..f3601b8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/mapper/xml/EducationProcessMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_process + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java index 08d9bf5..8084e0a 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationCourseService.java @@ -7,7 +7,7 @@ import java.util.List; /** * @Description: 课程安排表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationCourseService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java index 3eb0332..d562fb5 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationDocumentService.java @@ -7,7 +7,7 @@ import java.util.List; /** * @Description: 附加材料表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationDocumentService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java index a7c5bcd..523b9d0 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationPeriodicalService.java @@ -7,7 +7,7 @@ import java.util.List; /** * @Description: 期刊推荐表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationPeriodicalService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationProcessService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationProcessService.java new file mode 100644 index 0000000..09e724a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationProcessService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesis.service; + +import org.jeecg.modules.educationThesis.entity.EducationProcess; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 发表全流程辅导 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface IEducationProcessService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java index 3fb95ae..d4423ec 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTargetService.java @@ -7,7 +7,7 @@ import java.util.List; /** * @Description: 发表方向表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationTargetService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java index 1781543..3d8d7a5 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationTeacherService.java @@ -7,7 +7,7 @@ import java.util.List; /** * @Description: 师资力量表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationTeacherService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java index 13060c4..36bd123 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/IEducationThesisService.java @@ -1,5 +1,6 @@ package org.jeecg.modules.educationThesis.service; +import org.jeecg.modules.educationThesis.entity.EducationProcess; import org.jeecg.modules.educationThesis.entity.EducationTarget; import org.jeecg.modules.educationThesis.entity.EducationTeacher; import org.jeecg.modules.educationThesis.entity.EducationCourse; @@ -14,7 +15,7 @@ import java.util.List; /** * @Description: 论文信息表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ public interface IEducationThesisService extends IService { @@ -23,13 +24,13 @@ public interface IEducationThesisService extends IService { * 添加一对多 * */ - public void saveMain(EducationThesis educationThesis,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) ; + public void saveMain(EducationThesis educationThesis,List educationProcessList,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) ; /** * 修改一对多 * */ - public void updateMain(EducationThesis educationThesis,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList); + public void updateMain(EducationThesis educationThesis,List educationProcessList,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList); /** * 删除一对多 diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java index 0fda849..a5f438e 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationCourseServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; /** * @Description: 课程安排表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java index 8bcae7b..b76ec85 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationDocumentServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; /** * @Description: 附加材料表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java index 3b7e1c1..c0fb9d3 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationPeriodicalServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; /** * @Description: 期刊推荐表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationProcessServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationProcessServiceImpl.java new file mode 100644 index 0000000..b03840f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationProcessServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesis.service.impl; + +import org.jeecg.modules.educationThesis.entity.EducationProcess; +import org.jeecg.modules.educationThesis.mapper.EducationProcessMapper; +import org.jeecg.modules.educationThesis.service.IEducationProcessService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 发表全流程辅导 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Service +public class EducationProcessServiceImpl extends ServiceImpl implements IEducationProcessService { + + @Autowired + private EducationProcessMapper educationProcessMapper; + + @Override + public List selectByMainId(String mainId) { + return educationProcessMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java index acfde70..275039c 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTargetServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; /** * @Description: 发表方向表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java index f135056..35b3c24 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationTeacherServiceImpl.java @@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; /** * @Description: 师资力量表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java index 9d5b137..e972775 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/service/impl/EducationThesisServiceImpl.java @@ -1,11 +1,13 @@ package org.jeecg.modules.educationThesis.service.impl; import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesis.entity.EducationProcess; import org.jeecg.modules.educationThesis.entity.EducationTarget; import org.jeecg.modules.educationThesis.entity.EducationTeacher; import org.jeecg.modules.educationThesis.entity.EducationCourse; import org.jeecg.modules.educationThesis.entity.EducationPeriodical; import org.jeecg.modules.educationThesis.entity.EducationDocument; +import org.jeecg.modules.educationThesis.mapper.EducationProcessMapper; import org.jeecg.modules.educationThesis.mapper.EducationTargetMapper; import org.jeecg.modules.educationThesis.mapper.EducationTeacherMapper; import org.jeecg.modules.educationThesis.mapper.EducationCourseMapper; @@ -24,7 +26,7 @@ import java.util.Collection; /** * @Description: 论文信息表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Service @@ -33,6 +35,8 @@ public class EducationThesisServiceImpl extends ServiceImpl educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) { + public void saveMain(EducationThesis educationThesis, List educationProcessList,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) { educationThesisMapper.insert(educationThesis); + if(educationProcessList!=null && educationProcessList.size()>0) { + for(EducationProcess entity:educationProcessList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationProcessMapper.insert(entity); + } + } if(educationTargetList!=null && educationTargetList.size()>0) { for(EducationTarget entity:educationTargetList) { //外键设置 @@ -86,10 +97,11 @@ public class EducationThesisServiceImpl extends ServiceImpl educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) { + public void updateMain(EducationThesis educationThesis,List educationProcessList,List educationTargetList,List educationTeacherList,List educationCourseList,List educationPeriodicalList,List educationDocumentList) { educationThesisMapper.updateById(educationThesis); //1.先删除子表数据 + educationProcessMapper.deleteByMainId(educationThesis.getId()); educationTargetMapper.deleteByMainId(educationThesis.getId()); educationTeacherMapper.deleteByMainId(educationThesis.getId()); educationCourseMapper.deleteByMainId(educationThesis.getId()); @@ -97,6 +109,13 @@ public class EducationThesisServiceImpl extends ServiceImpl0) { + for(EducationProcess entity:educationProcessList) { + //外键设置 + entity.setThesisId(educationThesis.getId()); + educationProcessMapper.insert(entity); + } + } if(educationTargetList!=null && educationTargetList.size()>0) { for(EducationTarget entity:educationTargetList) { //外键设置 @@ -137,6 +156,7 @@ public class EducationThesisServiceImpl extends ServiceImpl idList) { for(Serializable id:idList) { + educationProcessMapper.deleteByMainId(id.toString()); educationTargetMapper.deleteByMainId(id.toString()); educationTeacherMapper.deleteByMainId(id.toString()); educationCourseMapper.deleteByMainId(id.toString()); diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java index a67632f..0236cf2 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vo/EducationThesisPage.java @@ -2,6 +2,7 @@ package org.jeecg.modules.educationThesis.vo; import java.util.List; import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesis.entity.EducationProcess; import org.jeecg.modules.educationThesis.entity.EducationTarget; import org.jeecg.modules.educationThesis.entity.EducationTeacher; import org.jeecg.modules.educationThesis.entity.EducationCourse; @@ -21,7 +22,7 @@ import io.swagger.annotations.ApiModelProperty; /** * @Description: 论文信息表 * @Author: jeecg-boot - * @Date: 2025-07-28 + * @Date: 2025-08-12 * @Version: V1.0 */ @Data @@ -48,7 +49,8 @@ public class EducationThesisPage { @ApiModelProperty(value = "一级分类") private java.lang.String categoryOne; /**二级分类*/ - @Excel(name = "二级分类", width = 15) + @Excel(name = "二级分类", width = 15, dictTable = "education_category_thesis", dicText = "title", dicCode = "id") + @Dict(dictTable = "education_category_thesis", dicText = "title", dicCode = "id") @ApiModelProperty(value = "二级分类") private java.lang.String categoryTwo; /**标题*/ @@ -59,9 +61,9 @@ public class EducationThesisPage { @Excel(name = "副标题", width = 15) @ApiModelProperty(value = "副标题") private java.lang.String shortTitle; - /**封面*/ - @Excel(name = "封面", width = 15) - @ApiModelProperty(value = "封面") + /**详情页图片*/ + @Excel(name = "详情页图片", width = 15) + @ApiModelProperty(value = "详情页图片") private java.lang.String image; /**发表全流程辅导*/ @Excel(name = "发表全流程辅导", width = 15) @@ -71,15 +73,18 @@ public class EducationThesisPage { @Excel(name = "适用人群", width = 15) @ApiModelProperty(value = "适用人群") private java.lang.String suit; - /**海报图片*/ - @Excel(name = "海报图片", width = 15) - @ApiModelProperty(value = "海报图片") + /**封面/海报图片*/ + @Excel(name = "封面/海报图片", width = 15) + @ApiModelProperty(value = "封面/海报图片") private java.lang.String paperImage; /**海报文字描述*/ @Excel(name = "海报文字描述", width = 15) @ApiModelProperty(value = "海报文字描述") private java.lang.String paperDesc; + @ExcelCollection(name="发表全流程辅导") + @ApiModelProperty(value = "发表全流程辅导") + private List educationProcessList; @ExcelCollection(name="发表方向表") @ApiModelProperty(value = "发表方向表") private List educationTargetList; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue index 89eafe4..fd9d3f7 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/EducationThesisList.vue @@ -4,6 +4,26 @@
+ + + + + + + + + + + + + 查询 + 重置 + + {{ toggleSearchStatus ? '收起' : '展开' }} + + + +
@@ -97,6 +117,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import EducationThesisModal from './modules/EducationThesisModal' + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import '@/assets/less/TableExpand.less' export default { @@ -141,7 +162,7 @@ dataIndex: 'shortTitle' }, { - title:'封面', + title:'详情页图片', align:"center", dataIndex: 'image', scopedSlots: {customRender: 'imgSlot'} @@ -159,7 +180,7 @@ scopedSlots: {customRender: 'htmlSlot'} }, { - title:'海报图片', + title:'封面/海报图片', align:"center", dataIndex: 'paperImage', scopedSlots: {customRender: 'imgSlot'} @@ -204,13 +225,13 @@ getSuperFieldList(){ let fieldList=[]; fieldList.push({type:'string',value:'categoryOne',text:'一级分类'}) - fieldList.push({type:'string',value:'categoryTwo',text:'二级分类',dictCode:''}) - fieldList.push({type:'string',value:'title',text:'标题',dictCode:''}) + fieldList.push({type:'string',value:'categoryTwo',text:'二级分类',dictCode:"education_category_thesis,title,id"}) + fieldList.push({type:'Text',value:'title',text:'标题',dictCode:''}) fieldList.push({type:'Text',value:'shortTitle',text:'副标题',dictCode:''}) - fieldList.push({type:'Text',value:'image',text:'封面',dictCode:''}) + fieldList.push({type:'Text',value:'image',text:'详情页图片',dictCode:''}) fieldList.push({type:'Text',value:'process',text:'发表全流程辅导',dictCode:''}) fieldList.push({type:'Text',value:'suit',text:'适用人群',dictCode:''}) - fieldList.push({type:'Text',value:'paperImage',text:'海报图片',dictCode:''}) + fieldList.push({type:'Text',value:'paperImage',text:'封面/海报图片',dictCode:''}) fieldList.push({type:'Text',value:'paperDesc',text:'海报文字描述',dictCode:''}) this.superFieldList = fieldList } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue index 5a67070..2ad6960 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesis/vue/modules/EducationThesisForm.vue @@ -11,7 +11,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -54,9 +54,21 @@ - + + + + - + - + - + - + > queryPageList(EducationThesisTwo educationThesisTwo, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationThesisTwo, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = educationThesisTwoService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param educationThesisTwoPage + * @return + */ + @AutoLog(value = "论文信息表二-添加") + @ApiOperation(value="论文信息表二-添加", notes="论文信息表二-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody EducationThesisTwoPage educationThesisTwoPage) { + EducationThesisTwo educationThesisTwo = new EducationThesisTwo(); + BeanUtils.copyProperties(educationThesisTwoPage, educationThesisTwo); + educationThesisTwoService.saveMain(educationThesisTwo, educationThesisTwoPage.getEducationExcelOneList(),educationThesisTwoPage.getEducationExcelTwoList(),educationThesisTwoPage.getEducationDocumentTwoList()); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param educationThesisTwoPage + * @return + */ + @AutoLog(value = "论文信息表二-编辑") + @ApiOperation(value="论文信息表二-编辑", notes="论文信息表二-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody EducationThesisTwoPage educationThesisTwoPage) { + EducationThesisTwo educationThesisTwo = new EducationThesisTwo(); + BeanUtils.copyProperties(educationThesisTwoPage, educationThesisTwo); + EducationThesisTwo educationThesisTwoEntity = educationThesisTwoService.getById(educationThesisTwo.getId()); + if(educationThesisTwoEntity==null) { + return Result.error("未找到对应数据"); + } + educationThesisTwoService.updateMain(educationThesisTwo, educationThesisTwoPage.getEducationExcelOneList(),educationThesisTwoPage.getEducationExcelTwoList(),educationThesisTwoPage.getEducationDocumentTwoList()); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "论文信息表二-通过id删除") + @ApiOperation(value="论文信息表二-通过id删除", notes="论文信息表二-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + educationThesisTwoService.delMain(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "论文信息表二-批量删除") + @ApiOperation(value="论文信息表二-批量删除", notes="论文信息表二-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.educationThesisTwoService.delBatchMain(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) { + EducationThesisTwo educationThesisTwo = educationThesisTwoService.getById(id); + if(educationThesisTwo==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(educationThesisTwo); + + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "表格一通过主表ID查询") + @ApiOperation(value="表格一主表ID查询", notes="表格一-通主表ID查询") + @GetMapping(value = "/queryEducationExcelOneByMainId") + public Result> queryEducationExcelOneListByMainId(@RequestParam(name="id",required=true) String id) { + List educationExcelOneList = educationExcelOneService.selectByMainId(id); + return Result.OK(educationExcelOneList); + } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "表格二通过主表ID查询") + @ApiOperation(value="表格二主表ID查询", notes="表格二-通主表ID查询") + @GetMapping(value = "/queryEducationExcelTwoByMainId") + public Result> queryEducationExcelTwoListByMainId(@RequestParam(name="id",required=true) String id) { + List educationExcelTwoList = educationExcelTwoService.selectByMainId(id); + return Result.OK(educationExcelTwoList); + } + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "附加材料表二通过主表ID查询") + @ApiOperation(value="附加材料表二主表ID查询", notes="附加材料表二-通主表ID查询") + @GetMapping(value = "/queryEducationDocumentTwoByMainId") + public Result> queryEducationDocumentTwoListByMainId(@RequestParam(name="id",required=true) String id) { + List educationDocumentTwoList = educationDocumentTwoService.selectByMainId(id); + return Result.OK(educationDocumentTwoList); + } + + /** + * 导出excel + * + * @param request + * @param educationThesisTwo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EducationThesisTwo educationThesisTwo) { + // Step.1 组装查询条件查询数据 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(educationThesisTwo, request.getParameterMap()); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + //Step.2 获取导出数据 + List queryList = educationThesisTwoService.list(queryWrapper); + // 过滤选中数据 + String selections = request.getParameter("selections"); + List educationThesisTwoList = new ArrayList(); + if(oConvertUtils.isEmpty(selections)) { + educationThesisTwoList = queryList; + }else { + List selectionList = Arrays.asList(selections.split(",")); + educationThesisTwoList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList()); + } + + // Step.3 组装pageList + List pageList = new ArrayList(); + for (EducationThesisTwo main : educationThesisTwoList) { + EducationThesisTwoPage vo = new EducationThesisTwoPage(); + BeanUtils.copyProperties(main, vo); + List educationExcelOneList = educationExcelOneService.selectByMainId(main.getId()); + vo.setEducationExcelOneList(educationExcelOneList); + List educationExcelTwoList = educationExcelTwoService.selectByMainId(main.getId()); + vo.setEducationExcelTwoList(educationExcelTwoList); + List educationDocumentTwoList = educationDocumentTwoService.selectByMainId(main.getId()); + vo.setEducationDocumentTwoList(educationDocumentTwoList); + pageList.add(vo); + } + + // Step.4 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + mv.addObject(NormalExcelConstants.FILE_NAME, "论文信息表二列表"); + mv.addObject(NormalExcelConstants.CLASS, EducationThesisTwoPage.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("论文信息表二数据", "导出人:"+sysUser.getRealname(), "论文信息表二")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List list = ExcelImportUtil.importExcel(file.getInputStream(), EducationThesisTwoPage.class, params); + for (EducationThesisTwoPage page : list) { + EducationThesisTwo po = new EducationThesisTwo(); + BeanUtils.copyProperties(page, po); + educationThesisTwoService.saveMain(po, page.getEducationExcelOneList(),page.getEducationExcelTwoList(),page.getEducationDocumentTwoList()); + } + return Result.OK("文件导入成功!数据行数:" + list.size()); + } catch (Exception e) { + log.error(e.getMessage(),e); + return Result.error("文件导入失败:"+e.getMessage()); + } finally { + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return Result.OK("文件导入失败!"); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationDocumentTwo.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationDocumentTwo.java new file mode 100644 index 0000000..c24b1de --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationDocumentTwo.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesisTwo.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 附加材料表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@ApiModel(value="education_document_two对象", description="附加材料表二") +@Data +@TableName("education_document_two") +public class EducationDocumentTwo implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**文件*/ + @Excel(name = "文件", width = 15) + @ApiModelProperty(value = "文件") + private java.lang.String document; + /**关联论文id*/ + @ApiModelProperty(value = "关联论文id") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationExcelOne.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationExcelOne.java new file mode 100644 index 0000000..a137636 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationExcelOne.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesisTwo.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 表格一 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@ApiModel(value="education_excel_one对象", description="表格一") +@Data +@TableName("education_excel_one") +public class EducationExcelOne implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**第一列*/ + @Excel(name = "第一列", width = 15) + @ApiModelProperty(value = "第一列") + private java.lang.String columnOne; + /**第二列*/ + @Excel(name = "第二列", width = 15) + @ApiModelProperty(value = "第二列") + private java.lang.String columnTwo; + /**关联论文id*/ + @ApiModelProperty(value = "关联论文id") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationExcelTwo.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationExcelTwo.java new file mode 100644 index 0000000..5528e60 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationExcelTwo.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.educationThesisTwo.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.UnsupportedEncodingException; + +/** + * @Description: 表格二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@ApiModel(value="education_excel_two对象", description="表格二") +@Data +@TableName("education_excel_two") +public class EducationExcelTwo implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**第一列*/ + @Excel(name = "第一列", width = 15) + @ApiModelProperty(value = "第一列") + private java.lang.String columnOne; + /**第二列*/ + @Excel(name = "第二列", width = 15) + @ApiModelProperty(value = "第二列") + private java.lang.String columnTwo; + /**关联论文id*/ + @ApiModelProperty(value = "关联论文id") + private java.lang.String thesisId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationThesisTwo.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationThesisTwo.java new file mode 100644 index 0000000..cacf91e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/entity/EducationThesisTwo.java @@ -0,0 +1,144 @@ +package org.jeecg.modules.educationThesisTwo.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.util.List; + +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 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; + +/** + * @Description: 论文信息表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@ApiModel(value="education_thesis_two对象", description="论文信息表二") +@Data +@TableName("education_thesis_two") +public class EducationThesisTwo implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**一级分类*/ + @Excel(name = "一级分类", width = 15) + @ApiModelProperty(value = "一级分类") + private java.lang.String categoryOne; + /**二级分类*/ + @Excel(name = "二级分类", width = 15) + @ApiModelProperty(value = "二级分类") + private java.lang.String categoryTwo; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**封面/海报图片*/ + @Excel(name = "封面/海报图片", width = 15) + @ApiModelProperty(value = "封面/海报图片") + private java.lang.String paperImage; + /**详情页图片*/ + @Excel(name = "详情页图片", width = 15) + @ApiModelProperty(value = "详情页图片") + private java.lang.String image; + /**模块标题一*/ + @Excel(name = "模块标题一", width = 15) + @ApiModelProperty(value = "模块标题一") + private java.lang.String titleModuleOne; + /**模块内容一*/ + @Excel(name = "模块内容一", width = 15) + @ApiModelProperty(value = "模块内容一") + private java.lang.String cotentModuleOne; + /**模块标题二*/ + @Excel(name = "模块标题二", width = 15) + @ApiModelProperty(value = "模块标题二") + private java.lang.String titleModuleTwo; + /**模块内容二*/ + @Excel(name = "模块内容二", width = 15) + @ApiModelProperty(value = "模块内容二") + private java.lang.String cotentModuleTwo; + /**模块标题三*/ + @Excel(name = "模块标题三", width = 15) + @ApiModelProperty(value = "模块标题三") + private java.lang.String titleModuleThree; + /**模块内容三*/ + @Excel(name = "模块内容三", width = 15) + @ApiModelProperty(value = "模块内容三") + private java.lang.String cotentModuleThree; + /**模块标题四*/ + @Excel(name = "模块标题四", width = 15) + @ApiModelProperty(value = "模块标题四") + private java.lang.String titleModuleFour; + /**模块内容四*/ + @Excel(name = "模块内容四", width = 15) + @ApiModelProperty(value = "模块内容四") + private java.lang.String cotentModuleFour; + /**模块标题五*/ + @Excel(name = "模块标题五", width = 15) + @ApiModelProperty(value = "模块标题五") + private java.lang.String titleModuleFive; + /**模块内容五*/ + @Excel(name = "模块内容五", width = 15) + @ApiModelProperty(value = "模块内容五") + private java.lang.String cotentModuleFive; + /**模块标题六*/ + @Excel(name = "模块标题六", width = 15) + @ApiModelProperty(value = "模块标题六") + private java.lang.String titleModuleSix; + /**模块内容六*/ + @Excel(name = "模块内容六", width = 15) + @ApiModelProperty(value = "模块内容六") + private java.lang.String cotentModuleSix; + /**模块标题七*/ + @Excel(name = "模块标题七", width = 15) + @ApiModelProperty(value = "模块标题七") + private java.lang.String titleModuleSeven; + /**模块内容七*/ + @Excel(name = "模块内容七", width = 15) + @ApiModelProperty(value = "模块内容七") + private java.lang.String cotentModuleSeven; + /**表格标题一*/ + @Excel(name = "表格标题一", width = 15) + @ApiModelProperty(value = "表格标题一") + private java.lang.String titleExcelOne; + /**表格标题二*/ + @Excel(name = "表格标题二", width = 15) + @ApiModelProperty(value = "表格标题二") + private java.lang.String titleExcelTwo; + + //表格一 + @TableField(exist = false) + List educationExcelOneList; + + //表格二 + @TableField(exist = false) + List educationExcelTwoList; + + //附加材料列表二 + @TableField(exist = false) + List educationDocumentTwoList; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationDocumentTwoMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationDocumentTwoMapper.java new file mode 100644 index 0000000..6758cd6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationDocumentTwoMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesisTwo.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 附加材料表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface EducationDocumentTwoMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationExcelOneMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationExcelOneMapper.java new file mode 100644 index 0000000..e89d598 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationExcelOneMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesisTwo.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 表格一 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface EducationExcelOneMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationExcelTwoMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationExcelTwoMapper.java new file mode 100644 index 0000000..b20bcc8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationExcelTwoMapper.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.educationThesisTwo.mapper; + +import java.util.List; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 表格二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface EducationExcelTwoMapper extends BaseMapper { + + public boolean deleteByMainId(@Param("mainId") String mainId); + + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationThesisTwoMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationThesisTwoMapper.java new file mode 100644 index 0000000..1e53ff4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/EducationThesisTwoMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.educationThesisTwo.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 论文信息表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface EducationThesisTwoMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationDocumentTwoMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationDocumentTwoMapper.xml new file mode 100644 index 0000000..13cd7e8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationDocumentTwoMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_document_two + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationExcelOneMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationExcelOneMapper.xml new file mode 100644 index 0000000..2e70674 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationExcelOneMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_excel_one + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationExcelTwoMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationExcelTwoMapper.xml new file mode 100644 index 0000000..12a9097 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationExcelTwoMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM education_excel_two + WHERE + thesis_id = #{mainId} + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationThesisTwoMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationThesisTwoMapper.xml new file mode 100644 index 0000000..2c609fa --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/mapper/xml/EducationThesisTwoMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationDocumentTwoService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationDocumentTwoService.java new file mode 100644 index 0000000..ce982b1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationDocumentTwoService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesisTwo.service; + +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 附加材料表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface IEducationDocumentTwoService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationExcelOneService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationExcelOneService.java new file mode 100644 index 0000000..b437d30 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationExcelOneService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesisTwo.service; + +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 表格一 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface IEducationExcelOneService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationExcelTwoService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationExcelTwoService.java new file mode 100644 index 0000000..1fb19e3 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationExcelTwoService.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.educationThesisTwo.service; + +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 表格二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface IEducationExcelTwoService extends IService { + + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationThesisTwoService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationThesisTwoService.java new file mode 100644 index 0000000..7b694d1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/IEducationThesisTwoService.java @@ -0,0 +1,42 @@ +package org.jeecg.modules.educationThesisTwo.service; + +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; +import com.baomidou.mybatisplus.extension.service.IService; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; + +/** + * @Description: 论文信息表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +public interface IEducationThesisTwoService extends IService { + + /** + * 添加一对多 + * + */ + public void saveMain(EducationThesisTwo educationThesisTwo,List educationExcelOneList,List educationExcelTwoList,List educationDocumentTwoList) ; + + /** + * 修改一对多 + * + */ + public void updateMain(EducationThesisTwo educationThesisTwo,List educationExcelOneList,List educationExcelTwoList,List educationDocumentTwoList); + + /** + * 删除一对多 + */ + public void delMain (String id); + + /** + * 批量删除一对多 + */ + public void delBatchMain (Collection idList); + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationDocumentTwoServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationDocumentTwoServiceImpl.java new file mode 100644 index 0000000..336f239 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationDocumentTwoServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesisTwo.service.impl; + +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import org.jeecg.modules.educationThesisTwo.mapper.EducationDocumentTwoMapper; +import org.jeecg.modules.educationThesisTwo.service.IEducationDocumentTwoService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 附加材料表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Service +public class EducationDocumentTwoServiceImpl extends ServiceImpl implements IEducationDocumentTwoService { + + @Autowired + private EducationDocumentTwoMapper educationDocumentTwoMapper; + + @Override + public List selectByMainId(String mainId) { + return educationDocumentTwoMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationExcelOneServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationExcelOneServiceImpl.java new file mode 100644 index 0000000..84a7b9a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationExcelOneServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesisTwo.service.impl; + +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import org.jeecg.modules.educationThesisTwo.mapper.EducationExcelOneMapper; +import org.jeecg.modules.educationThesisTwo.service.IEducationExcelOneService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 表格一 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Service +public class EducationExcelOneServiceImpl extends ServiceImpl implements IEducationExcelOneService { + + @Autowired + private EducationExcelOneMapper educationExcelOneMapper; + + @Override + public List selectByMainId(String mainId) { + return educationExcelOneMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationExcelTwoServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationExcelTwoServiceImpl.java new file mode 100644 index 0000000..2485e80 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationExcelTwoServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.educationThesisTwo.service.impl; + +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import org.jeecg.modules.educationThesisTwo.mapper.EducationExcelTwoMapper; +import org.jeecg.modules.educationThesisTwo.service.IEducationExcelTwoService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 表格二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Service +public class EducationExcelTwoServiceImpl extends ServiceImpl implements IEducationExcelTwoService { + + @Autowired + private EducationExcelTwoMapper educationExcelTwoMapper; + + @Override + public List selectByMainId(String mainId) { + return educationExcelTwoMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationThesisTwoServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationThesisTwoServiceImpl.java new file mode 100644 index 0000000..8ef316f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/service/impl/EducationThesisTwoServiceImpl.java @@ -0,0 +1,119 @@ +package org.jeecg.modules.educationThesisTwo.service.impl; + +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import org.jeecg.modules.educationThesisTwo.mapper.EducationExcelOneMapper; +import org.jeecg.modules.educationThesisTwo.mapper.EducationExcelTwoMapper; +import org.jeecg.modules.educationThesisTwo.mapper.EducationDocumentTwoMapper; +import org.jeecg.modules.educationThesisTwo.mapper.EducationThesisTwoMapper; +import org.jeecg.modules.educationThesisTwo.service.IEducationThesisTwoService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import java.io.Serializable; +import java.util.List; +import java.util.Collection; + +/** + * @Description: 论文信息表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Service +public class EducationThesisTwoServiceImpl extends ServiceImpl implements IEducationThesisTwoService { + + @Autowired + private EducationThesisTwoMapper educationThesisTwoMapper; + @Autowired + private EducationExcelOneMapper educationExcelOneMapper; + @Autowired + private EducationExcelTwoMapper educationExcelTwoMapper; + @Autowired + private EducationDocumentTwoMapper educationDocumentTwoMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveMain(EducationThesisTwo educationThesisTwo, List educationExcelOneList,List educationExcelTwoList,List educationDocumentTwoList) { + educationThesisTwoMapper.insert(educationThesisTwo); + if(educationExcelOneList!=null && educationExcelOneList.size()>0) { + for(EducationExcelOne entity:educationExcelOneList) { + //外键设置 + entity.setThesisId(educationThesisTwo.getId()); + educationExcelOneMapper.insert(entity); + } + } + if(educationExcelTwoList!=null && educationExcelTwoList.size()>0) { + for(EducationExcelTwo entity:educationExcelTwoList) { + //外键设置 + entity.setThesisId(educationThesisTwo.getId()); + educationExcelTwoMapper.insert(entity); + } + } + if(educationDocumentTwoList!=null && educationDocumentTwoList.size()>0) { + for(EducationDocumentTwo entity:educationDocumentTwoList) { + //外键设置 + entity.setThesisId(educationThesisTwo.getId()); + educationDocumentTwoMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMain(EducationThesisTwo educationThesisTwo,List educationExcelOneList,List educationExcelTwoList,List educationDocumentTwoList) { + educationThesisTwoMapper.updateById(educationThesisTwo); + + //1.先删除子表数据 + educationExcelOneMapper.deleteByMainId(educationThesisTwo.getId()); + educationExcelTwoMapper.deleteByMainId(educationThesisTwo.getId()); + educationDocumentTwoMapper.deleteByMainId(educationThesisTwo.getId()); + + //2.子表数据重新插入 + if(educationExcelOneList!=null && educationExcelOneList.size()>0) { + for(EducationExcelOne entity:educationExcelOneList) { + //外键设置 + entity.setThesisId(educationThesisTwo.getId()); + educationExcelOneMapper.insert(entity); + } + } + if(educationExcelTwoList!=null && educationExcelTwoList.size()>0) { + for(EducationExcelTwo entity:educationExcelTwoList) { + //外键设置 + entity.setThesisId(educationThesisTwo.getId()); + educationExcelTwoMapper.insert(entity); + } + } + if(educationDocumentTwoList!=null && educationDocumentTwoList.size()>0) { + for(EducationDocumentTwo entity:educationDocumentTwoList) { + //外键设置 + entity.setThesisId(educationThesisTwo.getId()); + educationDocumentTwoMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delMain(String id) { + educationExcelOneMapper.deleteByMainId(id); + educationExcelTwoMapper.deleteByMainId(id); + educationDocumentTwoMapper.deleteByMainId(id); + educationThesisTwoMapper.deleteById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delBatchMain(Collection idList) { + for(Serializable id:idList) { + educationExcelOneMapper.deleteByMainId(id.toString()); + educationExcelTwoMapper.deleteByMainId(id.toString()); + educationDocumentTwoMapper.deleteByMainId(id.toString()); + educationThesisTwoMapper.deleteById(id); + } + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vo/EducationThesisTwoPage.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vo/EducationThesisTwoPage.java new file mode 100644 index 0000000..c057ec0 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vo/EducationThesisTwoPage.java @@ -0,0 +1,139 @@ +package org.jeecg.modules.educationThesisTwo.vo; + +import java.util.List; +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelEntity; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 论文信息表二 + * @Author: jeecg-boot + * @Date: 2025-08-12 + * @Version: V1.0 + */ +@Data +@ApiModel(value="education_thesis_twoPage对象", description="论文信息表二") +public class EducationThesisTwoPage { + + /**主键*/ + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**一级分类*/ + @Excel(name = "一级分类", width = 15) + @ApiModelProperty(value = "一级分类") + private java.lang.String categoryOne; + /**二级分类*/ + @Excel(name = "二级分类", width = 15) + @ApiModelProperty(value = "二级分类") + private java.lang.String categoryTwo; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**封面/海报图片*/ + @Excel(name = "封面/海报图片", width = 15) + @ApiModelProperty(value = "封面/海报图片") + private java.lang.String paperImage; + /**详情页图片*/ + @Excel(name = "详情页图片", width = 15) + @ApiModelProperty(value = "详情页图片") + private java.lang.String image; + /**模块标题一*/ + @Excel(name = "模块标题一", width = 15) + @ApiModelProperty(value = "模块标题一") + private java.lang.String titleModuleOne; + /**模块内容一*/ + @Excel(name = "模块内容一", width = 15) + @ApiModelProperty(value = "模块内容一") + private java.lang.String cotentModuleOne; + /**模块标题二*/ + @Excel(name = "模块标题二", width = 15) + @ApiModelProperty(value = "模块标题二") + private java.lang.String titleModuleTwo; + /**模块内容二*/ + @Excel(name = "模块内容二", width = 15) + @ApiModelProperty(value = "模块内容二") + private java.lang.String cotentModuleTwo; + /**模块标题三*/ + @Excel(name = "模块标题三", width = 15) + @ApiModelProperty(value = "模块标题三") + private java.lang.String titleModuleThree; + /**模块内容三*/ + @Excel(name = "模块内容三", width = 15) + @ApiModelProperty(value = "模块内容三") + private java.lang.String cotentModuleThree; + /**模块标题四*/ + @Excel(name = "模块标题四", width = 15) + @ApiModelProperty(value = "模块标题四") + private java.lang.String titleModuleFour; + /**模块内容四*/ + @Excel(name = "模块内容四", width = 15) + @ApiModelProperty(value = "模块内容四") + private java.lang.String cotentModuleFour; + /**模块标题五*/ + @Excel(name = "模块标题五", width = 15) + @ApiModelProperty(value = "模块标题五") + private java.lang.String titleModuleFive; + /**模块内容五*/ + @Excel(name = "模块内容五", width = 15) + @ApiModelProperty(value = "模块内容五") + private java.lang.String cotentModuleFive; + /**模块标题六*/ + @Excel(name = "模块标题六", width = 15) + @ApiModelProperty(value = "模块标题六") + private java.lang.String titleModuleSix; + /**模块内容六*/ + @Excel(name = "模块内容六", width = 15) + @ApiModelProperty(value = "模块内容六") + private java.lang.String cotentModuleSix; + /**模块标题七*/ + @Excel(name = "模块标题七", width = 15) + @ApiModelProperty(value = "模块标题七") + private java.lang.String titleModuleSeven; + /**模块内容七*/ + @Excel(name = "模块内容七", width = 15) + @ApiModelProperty(value = "模块内容七") + private java.lang.String cotentModuleSeven; + /**表格标题一*/ + @Excel(name = "表格标题一", width = 15) + @ApiModelProperty(value = "表格标题一") + private java.lang.String titleExcelOne; + /**表格标题二*/ + @Excel(name = "表格标题二", width = 15) + @ApiModelProperty(value = "表格标题二") + private java.lang.String titleExcelTwo; + + @ExcelCollection(name="表格一") + @ApiModelProperty(value = "表格一") + private List educationExcelOneList; + @ExcelCollection(name="表格二") + @ApiModelProperty(value = "表格二") + private List educationExcelTwoList; + @ExcelCollection(name="附加材料表二") + @ApiModelProperty(value = "附加材料表二") + private List educationDocumentTwoList; + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/EducationThesisTwoList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/EducationThesisTwoList.vue new file mode 100644 index 0000000..611dbc4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/EducationThesisTwoList.vue @@ -0,0 +1,299 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/modules/EducationThesisTwoForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/modules/EducationThesisTwoForm.vue new file mode 100644 index 0000000..f7fd177 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/modules/EducationThesisTwoForm.vue @@ -0,0 +1,347 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/modules/EducationThesisTwoModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/modules/EducationThesisTwoModal.vue new file mode 100644 index 0000000..e6288bf --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/educationThesisTwo/vue/modules/EducationThesisTwoModal.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/ConfigController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/ConfigController.java index 2ab03dc..5899e83 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/ConfigController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/ConfigController.java @@ -53,12 +53,19 @@ public class ConfigController { } //获取论文分类列表 - @ApiOperation(value="系统配置-获取论文分类列表", notes="系统配置-获取论文分类列表") + @ApiOperation(value="系统配置-获取论文分类列表一", notes="系统配置-获取论文分类列表一") @RequestMapping(value = "/queryCategoryThesisList", method = {RequestMethod.GET}) public Result queryCategoryThesisList(String pid, PageBean pageBean){ return configService.queryCategoryThesisList(pid, pageBean); } + //获取论文分类列表 + @ApiOperation(value="系统配置-获取论文分类列表二", notes="系统配置-获取论文分类列表二") + @RequestMapping(value = "/queryCategoryThesisTwoList", method = {RequestMethod.GET}) + public Result queryCategoryThesisTwoList(String pid, PageBean pageBean){ + return configService.queryCategoryThesisTwoList(pid, pageBean); + } + //获取服务分类列表 @ApiOperation(value="系统配置-获取服务分类列表", notes="系统配置-获取服务分类列表") @RequestMapping(value = "/queryCategoryServiceList", method = {RequestMethod.GET}) diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/IndexController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/IndexController.java index a06e88a..854c5f6 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/IndexController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/educationController/IndexController.java @@ -9,6 +9,7 @@ import org.jeecg.modules.api.service.IndexService; import org.jeecg.modules.educationArticle.entity.EducationArticle; import org.jeecg.modules.educationBanner.entity.EducationBanner; import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @@ -34,19 +35,33 @@ public class IndexController { } //获取论文文章列表 - @ApiOperation(value="首页-获取论文文章列表", notes="首页-获取论文文章列表") + @ApiOperation(value="首页-获取论文文章列表一", notes="首页-获取论文文章列表一") @RequestMapping(value = "/queryThesisList", method = {RequestMethod.GET}) public Result queryThesisList(EducationThesis educationThesis, PageBean pageBean){ return indexService.queryThesisList(educationThesis, pageBean); } + //获取论文文章列表二 + @ApiOperation(value="首页-获取论文文章列表二", notes="首页-获取论文文章列表二") + @RequestMapping(value = "/queryThesisTwoList", method = {RequestMethod.GET}) + public Result queryThesisTwoList(EducationThesisTwo educationThesisTwo, PageBean pageBean){ + return indexService.queryThesisTwoList(educationThesisTwo, pageBean); + } + //获取论文文章详情 - @ApiOperation(value="首页-获取论文文章详情", notes="首页-获取论文文章详情") + @ApiOperation(value="首页-获取论文文章详情一", notes="首页-获取论文文章详情一") @RequestMapping(value = "/queryThesisById", method = {RequestMethod.GET}) public Result queryThesisById(String thesisId){ return indexService.queryThesisById(thesisId); } + //获取论文文章详情二 + @ApiOperation(value="首页-获取论文文章详情二", notes="首页-获取论文文章详情二") + @RequestMapping(value = "/queryThesisTwoById", method = {RequestMethod.GET}) + public Result queryThesisTwoById(String thesisId){ + return indexService.queryThesisTwoById(thesisId); + } + //获取案例文章列表 @ApiOperation(value="首页-获取案例文章列表", notes="首页-获取案例文章列表") @RequestMapping(value = "/queryAriticleList", method = {RequestMethod.GET}) diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ConfigService.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ConfigService.java index 1469007..adaeb82 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ConfigService.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ConfigService.java @@ -16,8 +16,10 @@ public interface ConfigService { public Result querySummaryList(PageBean pageBean); //查看概述说明详情 public Result querySummaryByParamCode(String paramCode); - //获取论文分类列表 + //获取论文分类列表二 public Result queryCategoryThesisList(String pid, PageBean pageBean); + //获取论文分类列表二 + public Result queryCategoryThesisTwoList(String pid, PageBean pageBean); //获取服务分类列表 public Result queryCategoryServiceList(PageBean pageBean); //获取专业分类列表 diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/IndexService.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/IndexService.java index aa3d8c9..2d7f2dd 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/IndexService.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/IndexService.java @@ -6,6 +6,7 @@ import org.jeecg.modules.api.bean.PageBean; import org.jeecg.modules.educationArticle.entity.EducationArticle; import org.jeecg.modules.educationBanner.entity.EducationBanner; import org.jeecg.modules.educationThesis.entity.EducationThesis; +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -17,9 +18,15 @@ public interface IndexService { //获取论文文章列表 public Result queryThesisList(EducationThesis educationThesis, PageBean pageBean); + //获取论文文章列表二 + public Result queryThesisTwoList(EducationThesisTwo educationThesisTwo, PageBean pageBean); + //获取论文文章详情 public Result queryThesisById(String thesisId); + //获取论文文章详情二 + public Result queryThesisTwoById(String thesisId); + //获取案例文章列表 public Result queryAriticleList(EducationArticle educationArticle, PageBean pageBean); diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/ConfigServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/ConfigServiceImpl.java index 8c9b1e0..8d002ef 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/ConfigServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/ConfigServiceImpl.java @@ -23,6 +23,8 @@ import org.jeecg.modules.educationCategoryService.entity.EducationCategoryServic import org.jeecg.modules.educationCategoryService.service.IEducationCategoryServiceService; import org.jeecg.modules.educationCategoryThesis.entity.EducationCategoryThesis; import org.jeecg.modules.educationCategoryThesis.service.IEducationCategoryThesisService; +import org.jeecg.modules.educationCategoryThesisTwo.entity.EducationCategoryThesisTwo; +import org.jeecg.modules.educationCategoryThesisTwo.service.IEducationCategoryThesisTwoService; import org.jeecg.modules.educationConfig.entity.EducationConfig; import org.jeecg.modules.educationConfig.service.IEducationConfigService; import org.jeecg.modules.educationSummary.entity.EducationSummary; @@ -67,16 +69,19 @@ public class ConfigServiceImpl implements ConfigService { //概述说明信息 @Resource private IEducationSummaryService educationSummaryService; - //概述说明信息 + //论文分类信息一 @Resource private IEducationCategoryThesisService educationCategoryThesisService; - //概述说明信息 + //论文分类信息一 + @Resource + private IEducationCategoryThesisTwoService educationCategoryThesisTwoService; + //服务分类信息 @Resource private IEducationCategoryServiceService educationCategoryServiceService; - //概述说明信息 + //专业分类信息 @Resource private IEducationCategoryMajorService educationCategoryMajorService; - //概述说明信息 + //阶段分类信息 @Resource private IEducationCategoryPeriodService educationCategoryPeriodService; /******************************************************************************************************************/ @@ -233,6 +238,45 @@ public class ConfigServiceImpl implements ConfigService { } } + //获取论文分类列表二 + @Override + public Result queryCategoryThesisTwoList(String pid, PageBean pageBean) { + log.info("开始查询论文分类二列表"); + //返回信息 + String massege = ""; + //分页信息 + Page page = null; + //查询信息 + LambdaQueryChainWrapper query = null; + //返回信息 + Page pageList = null; + + try{ + //分页 + page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + query = educationCategoryThesisTwoService + .lambdaQuery(); + + //组装查询条件 + if(StringUtils.isNotEmpty(pid)){ + query.eq(EducationCategoryThesisTwo::getPid, pid); + } + + //按照创建时间降序排列 + query.orderByDesc(EducationCategoryThesisTwo::getCreateTime); + + //获取论文分类列表信息 + pageList = query.page(page); + + log.info("论文分类二查询结束"); + return Result.OK("论文分类二列表", pageList); + }catch (Exception e){ + log.error("论文分类二查询失败"); + e.printStackTrace(); + return Result.error("论文分类二列表查询失败"); + } + } + //获取服务分类列表 @Override public Result queryCategoryServiceList(PageBean pageBean) { diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/IndexServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/IndexServiceImpl.java index a8a5342..a1d0277 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/IndexServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/IndexServiceImpl.java @@ -14,6 +14,14 @@ import org.jeecg.modules.educationBanner.entity.EducationBanner; import org.jeecg.modules.educationBanner.service.IEducationBannerService; import org.jeecg.modules.educationThesis.entity.*; import org.jeecg.modules.educationThesis.service.*; +import org.jeecg.modules.educationThesisTwo.entity.EducationDocumentTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelOne; +import org.jeecg.modules.educationThesisTwo.entity.EducationExcelTwo; +import org.jeecg.modules.educationThesisTwo.entity.EducationThesisTwo; +import org.jeecg.modules.educationThesisTwo.service.IEducationDocumentTwoService; +import org.jeecg.modules.educationThesisTwo.service.IEducationExcelOneService; +import org.jeecg.modules.educationThesisTwo.service.IEducationExcelTwoService; +import org.jeecg.modules.educationThesisTwo.service.IEducationThesisTwoService; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.springframework.stereotype.Service; @@ -29,12 +37,18 @@ public class IndexServiceImpl implements IndexService { //轮播图信息 @Resource private IEducationBannerService educationBannerService; - //论文文章信息 + //论文文章信息一 @Resource private IEducationThesisService educationThesisService; + //论文文章信息二 + @Resource + private IEducationThesisTwoService educationThesisTwoService; //案例文章信息 @Resource private IEducationArticleService educationArticleService; + //发表全流程辅导 + @Resource + private IEducationProcessService educationProcessService; //发表方向信息 @Resource private IEducationTargetService educationTargetService; @@ -47,9 +61,18 @@ public class IndexServiceImpl implements IndexService { //期刊推荐信息 @Resource private IEducationPeriodicalService educationPeriodicalService; - //附加材料信息 + //附加材料信息一 @Resource private IEducationDocumentService educationDocumentService; + //表格一 + @Resource + private IEducationExcelOneService educationExcelOneService; + //表格二 + @Resource + private IEducationExcelTwoService educationExcelTwoService; + //附加材料信息二 + @Resource + private IEducationDocumentTwoService educationDocumentTwoService; /******************************************************************************************************************/ //获取banner图列表 @@ -96,7 +119,7 @@ public class IndexServiceImpl implements IndexService { } } - //获取论文文章列表 + //获取论文文章列表一 @Override public Result queryThesisList(EducationThesis educationThesis, PageBean pageBean) { log.info("开始查询论文文章信息"); @@ -144,7 +167,55 @@ public class IndexServiceImpl implements IndexService { } } - //获取论文文章详情 + //获取论文文章列表二 + @Override + public Result queryThesisTwoList(EducationThesisTwo educationThesisTwo, PageBean pageBean) { + log.info("开始查询论文文章信息"); + //返回信息 + String massege = ""; + //分页信息 + Page page = null; + //查询信息 + LambdaQueryChainWrapper query = null; + //返回信息 + Page pageList = null; + + try{ + //分页 + page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + query = educationThesisTwoService + .lambdaQuery(); + + //组装查询条件 + if(StringUtils.isNotBlank(educationThesisTwo.getTitle())){ + //标题 + query.like(EducationThesisTwo::getTitle, educationThesisTwo.getTitle()); + } + if(StringUtils.isNotBlank(educationThesisTwo.getCategoryOne())){ + //论文一级分类 + query.eq(EducationThesisTwo::getCategoryOne, educationThesisTwo.getCategoryOne()); + } + if(StringUtils.isNotBlank(educationThesisTwo.getCategoryTwo())){ + //论文二级分类 + query.eq(EducationThesisTwo::getCategoryTwo, educationThesisTwo.getCategoryTwo()); + } + + //按照创建时间降序排列 + query.orderByDesc(EducationThesisTwo::getCreateTime); + + //获取论文文章信息 + pageList = query.page(page); + + log.info("论文文章信息列表二查询结束"); + return Result.OK("论文文章列表二", pageList); + }catch (Exception e){ + log.info("论文文章信息列表二查询失败"); + e.printStackTrace(); + return Result.error("论文文章列表二查询失败"); + } + } + + //获取论文文章详情一 @Override public Result queryThesisById(String thesisId) { log.info("开始查询论文文章信息"); @@ -159,6 +230,13 @@ public class IndexServiceImpl implements IndexService { return Result.OK("论文文章不存在,请检查论文文章编号:{}", thesisId); } + //发表全流程辅导 + List processList = educationProcessService + .lambdaQuery() + .eq(EducationProcess::getThesisId, thesisId) + .list(); + one.setEducationProcessList(processList); + //发表方向 List targetList = educationTargetService .lambdaQuery() @@ -204,6 +282,52 @@ public class IndexServiceImpl implements IndexService { } } + //获取论文文章详情二 + @Override + public Result queryThesisTwoById(String thesisId) { + log.info("开始查询论文文章信息"); + //返回信息 + String massege = ""; + + try{ + //1、查询论文文章详情 + EducationThesisTwo one = educationThesisTwoService.getById(thesisId); + if(null == one){ + log.info("论文文章不存在,请检查论文文章编号:{}", thesisId); + return Result.OK("论文文章不存在,请检查论文文章编号:{}", thesisId); + } + + //表格一 + List excelOneList = educationExcelOneService + .lambdaQuery() + .eq(EducationExcelOne::getThesisId, thesisId) + .list(); + one.setEducationExcelOneList(excelOneList); + + //表格二 + List excelTwoList = educationExcelTwoService + .lambdaQuery() + .eq(EducationExcelTwo::getThesisId, thesisId) + .list(); + one.setEducationExcelTwoList(excelTwoList); + + //附加材料 + List documentTwoList = educationDocumentTwoService + .lambdaQuery() + .eq(EducationDocumentTwo::getThesisId, thesisId) + .list(); + one.setEducationDocumentTwoList(documentTwoList); + + //2、返回案例文章信息 + log.info("论文文章信息查询结束"); + return Result.OK("论文文章信息", one); + }catch (Exception e){ + log.info("论文文章信息查询失败"); + e.printStackTrace(); + return Result.error("论文文章信息查询失败"); + } + } + //获取案例文章列表 @Override public Result queryAriticleList(EducationArticle educationArticle, PageBean pageBean) {