From 10aac03ce305d20fa57fe0a4d8de12c0e95376b7 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 25 Sep 2023 16:10:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9B=AE=E6=A0=87=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E6=AF=95=E4=B8=9A=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/py/PyBasicCourseList.vue | 21 ++- .../views/py/SeCourseobjectivesTypeList.vue | 176 ++++++++++++++++++ .../py/modules/SeCourseobjectivesTypeForm.vue | 171 +++++++++++++++++ .../modules/SeCourseobjectivesTypeModal.vue | 60 ++++++ .../course/entity/SeCourseobjectives.java | 1 + .../controller/PyBasicCourseController.java | 59 ++++++ .../jeecg/modules/py/entity/PyGraRequire.java | 11 +- 7 files changed, 495 insertions(+), 4 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/py/SeCourseobjectivesTypeList.vue create mode 100644 ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeForm.vue create mode 100644 ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeModal.vue diff --git a/ant-design-vue-jeecg/src/views/py/PyBasicCourseList.vue b/ant-design-vue-jeecg/src/views/py/PyBasicCourseList.vue index 34a4ca6..bf420c3 100644 --- a/ant-design-vue-jeecg/src/views/py/PyBasicCourseList.vue +++ b/ant-design-vue-jeecg/src/views/py/PyBasicCourseList.vue @@ -54,6 +54,8 @@ > + 设置毕业要求 + 删除 @@ -89,6 +91,11 @@ export default { }, data() { return { + tokenid: { + basicId:'', + courseId:'', + courseobjectivesId:'', + }, description: '培养方案设置课程', visible: false, basicId: '', @@ -216,7 +223,6 @@ export default { dataIndex: 'action', align: 'center', fixed: 'right', - width: 50, scopedSlots: {customRender: 'action'}, }, ], @@ -252,6 +258,19 @@ export default { }, }, methods: { + byyq(record){ + console.log(record) + this.tokenid = { + basicId: record.basicId, + courseId: record.courseId, + courseobjectivesId:'', + }; + //basicId,courseId + this.$router.push({ + path: '/py/SeCourseobjectivesTypeList', + query: this.tokenid + }) + }, //学院选定时,级联查询该学院关联的专业 getMajor1() { this.dicode1 = "se_major,name,id,dep='" + this.queryParam.depid + "'" diff --git a/ant-design-vue-jeecg/src/views/py/SeCourseobjectivesTypeList.vue b/ant-design-vue-jeecg/src/views/py/SeCourseobjectivesTypeList.vue new file mode 100644 index 0000000..5000837 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/py/SeCourseobjectivesTypeList.vue @@ -0,0 +1,176 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeForm.vue b/ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeForm.vue new file mode 100644 index 0000000..3ecec58 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeForm.vue @@ -0,0 +1,171 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeModal.vue b/ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeModal.vue new file mode 100644 index 0000000..b24adbd --- /dev/null +++ b/ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/entity/SeCourseobjectives.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/entity/SeCourseobjectives.java index 2451dd4..4feb564 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/entity/SeCourseobjectives.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/entity/SeCourseobjectives.java @@ -101,6 +101,7 @@ public class SeCourseobjectives implements Serializable { /**课程目标类型*/ @Excel(name = "课程目标类型", width = 15) + @Dict(dicCode = "id", dicText = "name", dictTable = "se_courseobjectives_type") @ApiModelProperty(value = "课程目标类型") private String sctype; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/controller/PyBasicCourseController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/controller/PyBasicCourseController.java index e83253a..df6db59 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/controller/PyBasicCourseController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/controller/PyBasicCourseController.java @@ -1,6 +1,7 @@ package org.jeecg.modules.py.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; @@ -11,15 +12,20 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.vo.DictModel; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.course.entity.SeCourse; +import org.jeecg.modules.course.entity.SeCourseobjectives; import org.jeecg.modules.course.service.ISeCourseService; +import org.jeecg.modules.course.service.ISeCourseobjectivesService; import org.jeecg.modules.py.entity.PyBasicCourse; +import org.jeecg.modules.py.entity.PyGraRequire; import org.jeecg.modules.py.entity.vo.TeachPlanVo; import org.jeecg.modules.py.service.BasicInfoService; import org.jeecg.modules.py.service.IPyBasicCourseService; import org.jeecg.modules.py.service.IPyCourseConstituteService; +import org.jeecg.modules.py.service.IPyGraRequireService; import org.jeecg.modules.py.utils.MessageConstant; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysDictService; @@ -29,6 +35,7 @@ import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; import java.util.*; /** @@ -60,6 +67,58 @@ public class PyBasicCourseController extends JeecgController queryCourseobjectivesList(@RequestParam(name = "courseId") String courseId, HttpServletRequest req) { + //筛除掉pid=0的数据 + SeCourseobjectives seCourseobjectives = new SeCourseobjectives(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(seCourseobjectives, req.getParameterMap()); + queryWrapper.eq("courseid",courseId); + queryWrapper.ne("pid",0); + List list = seCourseobjectivesService.list(queryWrapper); + IPage pageList = new Page<>(); + pageList.setRecords(list); + return Result.OK(pageList); + } + + @AutoLog(value = "查询培养方案对应的毕业要求") + @ApiOperation(value = "查询培养方案对应的毕业要求") + @GetMapping(value = "/queryPyGraRequireList") + public Result queryPyGraRequireList(@RequestParam(name = "basicId") String basicId, HttpServletRequest req) { + //只要has_child不等于1的数据 + PyGraRequire pyGraRequire = new PyGraRequire(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(pyGraRequire, req.getParameterMap()); + queryWrapper.eq("basic_id",basicId); + queryWrapper.isNull("has_child"); + List list = pyGraRequireService.list(queryWrapper); + return Result.OK(list); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "知识点课程目标-通过id查询") + @ApiOperation(value = "知识点课程目标-通过id查询", notes = "知识点课程目标-通过id查询") + @GetMapping(value = "/szbyyq") + public Result szbyyq(@RequestParam(name = "id", required = true) String id,@RequestParam(name = "courseobjectivesId") String courseobjectivesId) { + PyGraRequire pyGraRequire = pyGraRequireService.getById(id); + SeCourseobjectives seCourseobjectives = seCourseobjectivesService.getById(courseobjectivesId); + seCourseobjectives.setRequireid(pyGraRequire.getId()); + seCourseobjectives.setTemp(pyGraRequire.getGraduateRequire()); + seCourseobjectivesService.updateById(seCourseobjectives); + return Result.OK("绑定成功"); + } + @AutoLog(value = "培养方案管理-设置课程-根据条件培养方案列表") @ApiOperation(value = "培养方案管理-设置课程-根据条件培养方案列表", notes = "培养方案管理-设置课程-根据条件培养方案列表") @GetMapping(value = "/queryBasicInfoList") diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/entity/PyGraRequire.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/entity/PyGraRequire.java index e4f1a99..dba6d22 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/entity/PyGraRequire.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/entity/PyGraRequire.java @@ -3,9 +3,8 @@ package org.jeecg.modules.py.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 com.baomidou.mybatisplus.annotation.*; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; @@ -51,4 +50,10 @@ public class PyGraRequire implements Serializable { @Dict(dicCode = "yn") @ApiModelProperty(value = "是否有子节点") private String hasChild; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; }