From 7352d2df76d6735492d1343112cdda826e645b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Mon, 7 Oct 2024 22:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/domain/BusTrainingVideo.java | 96 ++-- .../manage/domain/BusTrainingVideoUser.java | 52 ++- .../manage/mapper/BusExamInfoQuesMapper.java | 61 --- .../mapper/BusExamQuestionResultMapper.java | 61 --- .../mapper/BusExamUserResultMapper.java | 61 --- .../manage/mapper/BusTrainingVideoMapper.java | 10 + .../mapper/manage/BusExamInfoMapper.xml | 13 +- .../mapper/manage/BusExamInfoQuesMapper.xml | 69 --- .../mapper/manage/BusExamQuestionMapper.xml | 3 +- .../manage/BusExamQuestionResultMapper.xml | 91 ---- .../mapper/manage/BusExamUserMapper.xml | 15 +- .../mapper/manage/BusExamUserResultMapper.xml | 79 ---- .../mapper/manage/BusTrainingVideoMapper.xml | 89 ++-- .../manage/BusTrainingVideoUserMapper.xml | 50 ++- .../service/FastDfsSysFileServiceImpl.java | 5 - .../yanzhu/file/service/ISysFileService.java | 9 - .../file/service/LocalSysFileServiceImpl.java | 17 +- .../file/service/MinioSysFileServiceImpl.java | 5 - .../BusTrainingVideoController.java | 13 + .../service/IBusExamInfoQuesService.java | 61 --- .../IBusExamQuestionResultService.java | 61 --- .../service/IBusExamUserResultService.java | 61 --- .../service/IBusTrainingVideoService.java | 10 + .../impl/BusExamInfoQuesServiceImpl.java | 101 ----- .../service/impl/BusExamInfoServiceImpl.java | 3 + .../BusExamQuestionResultServiceImpl.java | 100 ----- .../impl/BusExamUserResultServiceImpl.java | 100 ----- .../impl/BusTrainingVideoServiceImpl.java | 17 + .../impl/BusTrainingVideoUserServiceImpl.java | 3 + .../system/controller/SysUserController.java | 24 +- .../src/api/manage/busTrainingVideo.js | 9 + .../views/manage/busExamQuestion/index.vue | 6 +- .../views/manage/busTrainingVideo/index.vue | 423 +++++++++++------- .../manage/busTrainingVideoUser/index.vue | 71 +-- 34 files changed, 570 insertions(+), 1279 deletions(-) delete mode 100644 yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamInfoQuesMapper.java delete mode 100644 yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamQuestionResultMapper.java delete mode 100644 yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserResultMapper.java delete mode 100644 yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoQuesMapper.xml delete mode 100644 yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionResultMapper.xml delete mode 100644 yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserResultMapper.xml delete mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamInfoQuesService.java delete mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamQuestionResultService.java delete mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserResultService.java delete mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoQuesServiceImpl.java delete mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamQuestionResultServiceImpl.java delete mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserResultServiceImpl.java diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideo.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideo.java index 8ab6e604..93410097 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideo.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideo.java @@ -18,24 +18,20 @@ public class BusTrainingVideo extends BaseEntity /** 主键 */ private Long id; - /** 部门主键 */ - @Excel(name = "部门主键") - private Long deptId; + /** 公司主键 */ + private Long comId; - public String getDeptName() { - return deptName; - } - - public void setDeptName(String deptName) { - this.deptName = deptName; - } - - private String deptName; + /** 公司名称 */ + @Excel(name = "公司名称") + private String comName; /** 项目主键 */ - @Excel(name = "项目主键") private Long projectId; + /** 项目名称 */ + @Excel(name = "项目名称") + private String projectName; + /** 培训名称 */ @Excel(name = "培训名称") private String trainTitle; @@ -72,21 +68,18 @@ public class BusTrainingVideo extends BaseEntity @Excel(name = "培训文件时长") private String trainFileTimes; + /** 播放时长 */ + @Excel(name = "播放时长") + private int palyTimes; + + /** 播放顺序 */ + @Excel(name = "播放顺序") + private int sortBy; + /** 删除标识 */ @Excel(name = "删除标识") private Long isDel; - - private int ord; - - public int getOrd() { - return ord; - } - - public void setOrd(int ord) { - this.ord = ord; - } - public void setId(Long id) { this.id = id; @@ -96,16 +89,24 @@ public class BusTrainingVideo extends BaseEntity { return id; } - public void setDeptId(Long deptId) - { - this.deptId = deptId; + + public Long getComId() { + return comId; } - public Long getDeptId() - { - return deptId; + public void setComId(Long comId) { + this.comId = comId; } - public void setProjectId(Long projectId) + + public String getComName() { + return comName; + } + + public void setComName(String comName) { + this.comName = comName; + } + + public void setProjectId(Long projectId) { this.projectId = projectId; } @@ -114,7 +115,16 @@ public class BusTrainingVideo extends BaseEntity { return projectId; } - public void setTrainTitle(String trainTitle) + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public void setTrainTitle(String trainTitle) { this.trainTitle = trainTitle; } @@ -195,7 +205,24 @@ public class BusTrainingVideo extends BaseEntity { return trainFileTimes; } - public void setIsDel(Long isDel) + + public int getSortBy() { + return sortBy; + } + + public void setSortBy(int sortBy) { + this.sortBy = sortBy; + } + + public int getPalyTimes() { + return palyTimes; + } + + public void setPalyTimes(int palyTimes) { + this.palyTimes = palyTimes; + } + + public void setIsDel(Long isDel) { this.isDel = isDel; } @@ -209,7 +236,7 @@ public class BusTrainingVideo extends BaseEntity public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) - .append("deptId", getDeptId()) + .append("comId", getComId()) .append("projectId", getProjectId()) .append("trainTitle", getTrainTitle()) .append("trainType", getTrainType()) @@ -220,6 +247,7 @@ public class BusTrainingVideo extends BaseEntity .append("trainFilePath", getTrainFilePath()) .append("trainFileImage", getTrainFileImage()) .append("trainFileTimes", getTrainFileTimes()) + .append("sortBy", getSortBy()) .append("isDel", getIsDel()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java index 18d2d6a1..1e8be729 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java @@ -18,18 +18,32 @@ public class BusTrainingVideoUser extends BaseEntity /** 主键 */ private Long id; - /** 部门主键 */ - @Excel(name = "部门主键") + /** 公司主键 */ private Long deptId; + /** 公司名称 */ + @Excel(name = "公司名称") + private String comName; + /** 项目主键 */ - @Excel(name = "项目主键") private Long projectId; + /** 项目名称 */ + @Excel(name = "项目名称") + private String projectName; + /** 用户主键 */ @Excel(name = "用户主键") private Long userId; + /** 用户名称 */ + @Excel(name = "用户名称") + private String userNick; + + /** 用户账号 */ + @Excel(name = "用户账号") + private String userName; + /** 视频主键 */ @Excel(name = "视频主键") private Long videoId; @@ -119,6 +133,38 @@ public class BusTrainingVideoUser extends BaseEntity return isDel; } + public String getComName() { + return comName; + } + + public void setComName(String comName) { + this.comName = comName; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getUserNick() { + return userNick; + } + + public void setUserNick(String userNick) { + this.userNick = userNick; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamInfoQuesMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamInfoQuesMapper.java deleted file mode 100644 index 4b822c59..00000000 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamInfoQuesMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.yanzhu.manage.mapper; - -import java.util.List; -import com.yanzhu.manage.domain.BusExamInfoQues; - -/** - * 试卷问题Mapper接口 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -public interface BusExamInfoQuesMapper -{ - /** - * 查询试卷问题 - * - * @param examId 试卷问题主键 - * @return 试卷问题 - */ - public BusExamInfoQues selectBusExamInfoQuesByExamId(Long examId); - - /** - * 查询试卷问题列表 - * - * @param busExamInfoQues 试卷问题 - * @return 试卷问题集合 - */ - public List selectBusExamInfoQuesList(BusExamInfoQues busExamInfoQues); - - /** - * 新增试卷问题 - * - * @param busExamInfoQues 试卷问题 - * @return 结果 - */ - public int insertBusExamInfoQues(BusExamInfoQues busExamInfoQues); - - /** - * 修改试卷问题 - * - * @param busExamInfoQues 试卷问题 - * @return 结果 - */ - public int updateBusExamInfoQues(BusExamInfoQues busExamInfoQues); - - /** - * 删除试卷问题 - * - * @param examId 试卷问题主键 - * @return 结果 - */ - public int deleteBusExamInfoQuesByExamId(Long examId); - - /** - * 批量删除试卷问题 - * - * @param examIds 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteBusExamInfoQuesByExamIds(Long[] examIds); -} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamQuestionResultMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamQuestionResultMapper.java deleted file mode 100644 index aba294f6..00000000 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamQuestionResultMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.yanzhu.manage.mapper; - -import java.util.List; -import com.yanzhu.manage.domain.BusExamQuestionResult; - -/** - * 题库问题Mapper接口 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -public interface BusExamQuestionResultMapper -{ - /** - * 查询题库问题 - * - * @param id 题库问题主键 - * @return 题库问题 - */ - public BusExamQuestionResult selectBusExamQuestionResultById(Long id); - - /** - * 查询题库问题列表 - * - * @param busExamQuestionResult 题库问题 - * @return 题库问题集合 - */ - public List selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult); - - /** - * 新增题库问题 - * - * @param busExamQuestionResult 题库问题 - * @return 结果 - */ - public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult); - - /** - * 修改题库问题 - * - * @param busExamQuestionResult 题库问题 - * @return 结果 - */ - public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult); - - /** - * 删除题库问题 - * - * @param id 题库问题主键 - * @return 结果 - */ - public int deleteBusExamQuestionResultById(Long id); - - /** - * 批量删除题库问题 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteBusExamQuestionResultByIds(Long[] ids); -} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserResultMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserResultMapper.java deleted file mode 100644 index 67357ff7..00000000 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserResultMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.yanzhu.manage.mapper; - -import java.util.List; -import com.yanzhu.manage.domain.BusExamUserResult; - -/** - * 用户试卷结果Mapper接口 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -public interface BusExamUserResultMapper -{ - /** - * 查询用户试卷结果 - * - * @param examUserId 用户试卷结果主键 - * @return 用户试卷结果 - */ - public BusExamUserResult selectBusExamUserResultByExamUserId(Long examUserId); - - /** - * 查询用户试卷结果列表 - * - * @param busExamUserResult 用户试卷结果 - * @return 用户试卷结果集合 - */ - public List selectBusExamUserResultList(BusExamUserResult busExamUserResult); - - /** - * 新增用户试卷结果 - * - * @param busExamUserResult 用户试卷结果 - * @return 结果 - */ - public int insertBusExamUserResult(BusExamUserResult busExamUserResult); - - /** - * 修改用户试卷结果 - * - * @param busExamUserResult 用户试卷结果 - * @return 结果 - */ - public int updateBusExamUserResult(BusExamUserResult busExamUserResult); - - /** - * 删除用户试卷结果 - * - * @param examUserId 用户试卷结果主键 - * @return 结果 - */ - public int deleteBusExamUserResultByExamUserId(Long examUserId); - - /** - * 批量删除用户试卷结果 - * - * @param examUserIds 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteBusExamUserResultByExamUserIds(Long[] examUserIds); -} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java index 02b22ad7..2333026f 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java @@ -1,6 +1,8 @@ package com.yanzhu.manage.mapper; import java.util.List; +import java.util.Map; + import com.yanzhu.manage.domain.BusTrainingVideo; /** @@ -27,6 +29,14 @@ public interface BusTrainingVideoMapper */ public List selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo); + /** + * 统计培训视频列表 + * + * @param busTrainingVideo 培训视频 + * @return 培训视频集合 + */ + public List> findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo); + /** * 新增培训视频 * diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoMapper.xml index c7636579..73df197d 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoMapper.xml @@ -56,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bei.project_id = #{projectId} and bei.com_id = #{activeComId} and bei.project_id = #{activeProjectId} + and pi.project_name like concat('%', #{projectName}, '%') and bei.exam_title = #{examTitle} and bei.exam_type = #{examType} and bei.craft_type = #{craftType} @@ -157,16 +158,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update bus_exam_info set use_number = use_number+1 where id = #{id} - - delete from bus_exam_info where id = #{id} - + + update bus_exam_info set is_del=2 where id = #{id} + - - delete from bus_exam_info where id in + + update bus_exam_info set is_del=2 where id in #{id} - + delete from bus_exam_info_ques where exam_id in diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoQuesMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoQuesMapper.xml deleted file mode 100644 index c5c6cb0a..00000000 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamInfoQuesMapper.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - select exam_id, question_id, marks, sort_by from bus_exam_info_ques - - - - - - - - insert into bus_exam_info_ques - - exam_id, - question_id, - marks, - sort_by, - - - #{examId}, - #{questionId}, - #{marks}, - #{sortBy}, - - - - - update bus_exam_info_ques - - question_id = #{questionId}, - marks = #{marks}, - sort_by = #{sortBy}, - - where exam_id = #{examId} - - - - delete from bus_exam_info_ques where exam_id = #{examId} - - - - delete from bus_exam_info_ques where exam_id in - - #{examId} - - - \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionMapper.xml index fba11ba3..158642a2 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionMapper.xml @@ -56,7 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and (beq.project_id = #{projectId} or beq.project_id is null) and (beq.com_id = #{activeComId} or beq.com_id is null) and (beq.project_id = #{activeProjectId} or beq.project_id is null) - and beq.craft_type = #{craftType} + and pi.project_name like concat('%', #{projectName}, '%') + and find_in_set(#{craftType}, beq.craft_type) and find_in_set(#{craftPost}, beq.craft_post) and beq.question_diff = #{questionDiff} and beq.question_type = #{questionType} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionResultMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionResultMapper.xml deleted file mode 100644 index d5efef0b..00000000 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamQuestionResultMapper.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - select id, question_id, opt, result, is_ok, create_by, create_time, update_by, update_time, remark from bus_exam_question_result - - - - - - - - insert into bus_exam_question_result - - question_id, - opt, - result, - is_ok, - create_by, - create_time, - update_by, - update_time, - remark, - - - #{questionId}, - #{opt}, - #{result}, - #{isOk}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update bus_exam_question_result - - question_id = #{questionId}, - opt = #{opt}, - result = #{result}, - is_ok = #{isOk}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where id = #{id} - - - - delete from bus_exam_question_result where id = #{id} - - - - delete from bus_exam_question_result where id in - - #{id} - - - \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml index b5f3ce50..6b81e86d 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml @@ -64,7 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and beu.com_id = #{activeComId} and beu.project_id = #{activeProjectId} and beu.user_id = #{userId} - and (beu.com_id = #{activeComId} or ) + and pi.project_name like concat('%', #{projectName}, '%') + and (su.nick_name like concat('%', #{userName}, '%') or su.user_name like concat('%', #{userName}, '%') ) and beu.exam_title = #{examTitle} and beu.exam_type = #{examType} and beu.craft_type = #{craftType} @@ -158,16 +159,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from bus_exam_user where id = #{id} - + + update bus_exam_user set is_del=2 where id = #{id} + - - delete from bus_exam_user where id in + + update bus_exam_user set is_del=2 where id in #{id} - + delete from bus_exam_user_result where exam_user_id in diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserResultMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserResultMapper.xml deleted file mode 100644 index 6b9bcdec..00000000 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserResultMapper.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - select exam_user_id, question_id, answers, sort_by, use_res, use_mark from bus_exam_user_result - - - - - - - - insert into bus_exam_user_result - - exam_user_id, - question_id, - answers, - sort_by, - use_res, - use_mark, - - - #{examUserId}, - #{questionId}, - #{answers}, - #{sortBy}, - #{useRes}, - #{useMark}, - - - - - update bus_exam_user_result - - question_id = #{questionId}, - answers = #{answers}, - sort_by = #{sortBy}, - use_res = #{useRes}, - use_mark = #{useMark}, - - where exam_user_id = #{examUserId} - - - - delete from bus_exam_user_result where exam_user_id = #{examUserId} - - - - delete from bus_exam_user_result where exam_user_id in - - #{examUserId} - - - \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml index a13ec1d8..d6d93a5f 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml @@ -6,9 +6,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + + @@ -18,7 +19,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + @@ -28,36 +30,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select bus_training_video.*,sys_dept.dept_name - from bus_training_video - left join sys_dept on bus_training_video.dept_id=sys_dept.dept_id + select btv.*, sd.dept_name as com_name, pi.project_name + from bus_training_video btv + left join pro_project_info pi on pi.id = btv.project_id + left join sys_dept sd on sd.dept_id = btv.com_id + + insert into bus_training_video - dept_id, + com_id, project_id, train_title, train_type, @@ -68,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" train_file_path, train_file_image, train_file_times, - ord, + paly_times, + sort_by, is_del, create_by, create_time, @@ -77,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, - #{deptId}, + #{comId}, #{projectId}, #{trainTitle}, #{trainType}, @@ -88,7 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{trainFilePath}, #{trainFileImage}, #{trainFileTimes}, - #{ord}, + #{palyTimes}, + #{sortBy}, #{isDel}, #{createBy}, #{createTime}, @@ -101,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update bus_training_video - dept_id = #{deptId}, + com_id = #{comId}, project_id = #{projectId}, train_title = #{trainTitle}, train_type = #{trainType}, @@ -112,7 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" train_file_path = #{trainFilePath}, train_file_image = #{trainFileImage}, train_file_times = #{trainFileTimes}, - ord = #{ord}, + paly_times = #{palyTimes}, + sort_by = #{sortBy}, is_del = #{isDel}, create_by = #{createBy}, create_time = #{createTime}, @@ -123,14 +152,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from bus_training_video where id = #{id} - + + update bus_training_video set is_del=2 where id = #{id} + - - delete from bus_training_video where id in + + update bus_training_video set is_del=2 where id in #{id} - + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoUserMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoUserMapper.xml index 50d1de52..837d630e 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoUserMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoUserMapper.xml @@ -6,9 +6,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + + @@ -21,31 +25,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, dept_id, project_id, user_id, video_id, play_status, sort_by, is_del, create_by, create_time, update_by, update_time, remark from bus_training_video_user + select btvu.id, btvu.com_id, sd.dept_name as com_name, btvu.project_id, pi.project_name, btvu.user_id, su.nick_name as user_nick, su.user_name, btvu.video_id, btvu.play_status, btvu.sort_by, btvu.is_del, btvu.create_by, btvu.create_time, btvu.update_by, btvu.update_time, btvu.remark from bus_training_video_user btvu + left join pro_project_info pi on pi.id = btvu.project_id + left join sys_dept sd on sd.com_id = btvu.com_id + left join sys_user su on su.user_id = btvu.user_id insert into bus_training_video_user - dept_id, + com_id, project_id, user_id, video_id, @@ -59,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, - #{deptId}, + #{comId}, #{projectId}, #{userId}, #{videoId}, @@ -77,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update bus_training_video_user - dept_id = #{deptId}, + com_id = #{comId}, project_id = #{projectId}, user_id = #{userId}, video_id = #{videoId}, @@ -93,14 +103,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from bus_training_video_user where id = #{id} - + + update bus_training_video_user set is_del=2 where id = #{id} + - - delete from bus_training_video_user where id in + + update bus_training_video_user set is_del=2 where id in #{id} - + \ No newline at end of file diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/FastDfsSysFileServiceImpl.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/FastDfsSysFileServiceImpl.java index e46eed0f..9dcdca9d 100644 --- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/FastDfsSysFileServiceImpl.java +++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/FastDfsSysFileServiceImpl.java @@ -39,9 +39,4 @@ public class FastDfsSysFileServiceImpl implements ISysFileService FileTypeUtils.getExtension(file), null); return domain + "/" + storePath.getFullPath(); } - - @Override - public String uploadFilePath(MultipartFile file, String path) throws Exception { - return null; - } } diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/ISysFileService.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/ISysFileService.java index e88d0286..b30dc4f1 100644 --- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/ISysFileService.java +++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/ISysFileService.java @@ -17,13 +17,4 @@ public interface ISysFileService * @throws Exception */ public String uploadFile(MultipartFile file) throws Exception; - - /** - * 文件上传接口 - * - * @param file 上传的文件 - * @return 访问地址 - * @throws Exception - */ - public String uploadFilePath(MultipartFile file,String path) throws Exception; } diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/LocalSysFileServiceImpl.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/LocalSysFileServiceImpl.java index 2293f3ca..f95875d7 100644 --- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/LocalSysFileServiceImpl.java +++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/LocalSysFileServiceImpl.java @@ -44,21 +44,6 @@ public class LocalSysFileServiceImpl implements ISysFileService public String uploadFile(MultipartFile file) throws Exception { String name = FileUploadUtils.upload(localFilePath, file); - String url = domain + localFilePrefix + name; - return url; - } - - /** - * 本地文件上传接口 && 自定义目录 - * - * @param file 上传的文件 - * @return 访问地址 - * @throws Exception - */ - @Override - public String uploadFilePath(MultipartFile file, String path) throws Exception { - String name = FileUploadUtils.upload(localFilePath+"/"+path, file); - String url = domain + localFilePrefix + name; - return url; + return localFilePrefix + name; } } diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/MinioSysFileServiceImpl.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/MinioSysFileServiceImpl.java index 218f92c4..a2a2ff35 100644 --- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/MinioSysFileServiceImpl.java +++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/service/MinioSysFileServiceImpl.java @@ -42,9 +42,4 @@ public class MinioSysFileServiceImpl implements ISysFileService client.putObject(args); return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName; } - - @Override - public String uploadFilePath(MultipartFile file, String path) throws Exception { - return null; - } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/BusTrainingVideoController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/BusTrainingVideoController.java index b3114114..488b8eaa 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/BusTrainingVideoController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/BusTrainingVideoController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * 培训视频Controller @@ -40,6 +41,18 @@ public class BusTrainingVideoController extends BaseController return getDataTable(list); } + /** + * 统计培训视频列表 + * @RequiresPermissions("manage:busTrainingVideo:list") + * + * @param busTrainingVideo 培训视频 + * @return 培训视频集合 + */ + @GetMapping("/findGroupByLevel") + public AjaxResult findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo){ + return success(busTrainingVideoService.findBusTrainingVideoByLevel(busTrainingVideo)); + } + /** * 导出培训视频列表 */ diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamInfoQuesService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamInfoQuesService.java deleted file mode 100644 index 18ff9b19..00000000 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamInfoQuesService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.yanzhu.manage.service; - -import java.util.List; -import com.yanzhu.manage.domain.BusExamInfoQues; - -/** - * 试卷问题Service接口 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -public interface IBusExamInfoQuesService -{ - /** - * 查询试卷问题 - * - * @param examId 试卷问题主键 - * @return 试卷问题 - */ - public BusExamInfoQues selectBusExamInfoQuesByExamId(Long examId); - - /** - * 查询试卷问题列表 - * - * @param busExamInfoQues 试卷问题 - * @return 试卷问题集合 - */ - public List selectBusExamInfoQuesList(BusExamInfoQues busExamInfoQues); - - /** - * 新增试卷问题 - * - * @param busExamInfoQues 试卷问题 - * @return 结果 - */ - public int insertBusExamInfoQues(BusExamInfoQues busExamInfoQues); - - /** - * 修改试卷问题 - * - * @param busExamInfoQues 试卷问题 - * @return 结果 - */ - public int updateBusExamInfoQues(BusExamInfoQues busExamInfoQues); - - /** - * 批量删除试卷问题 - * - * @param examIds 需要删除的试卷问题主键集合 - * @return 结果 - */ - public int deleteBusExamInfoQuesByExamIds(Long[] examIds); - - /** - * 删除试卷问题信息 - * - * @param examId 试卷问题主键 - * @return 结果 - */ - public int deleteBusExamInfoQuesByExamId(Long examId); -} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamQuestionResultService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamQuestionResultService.java deleted file mode 100644 index 4ef68740..00000000 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamQuestionResultService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.yanzhu.manage.service; - -import java.util.List; -import com.yanzhu.manage.domain.BusExamQuestionResult; - -/** - * 题库问题Service接口 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -public interface IBusExamQuestionResultService -{ - /** - * 查询题库问题 - * - * @param id 题库问题主键 - * @return 题库问题 - */ - public BusExamQuestionResult selectBusExamQuestionResultById(Long id); - - /** - * 查询题库问题列表 - * - * @param busExamQuestionResult 题库问题 - * @return 题库问题集合 - */ - public List selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult); - - /** - * 新增题库问题 - * - * @param busExamQuestionResult 题库问题 - * @return 结果 - */ - public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult); - - /** - * 修改题库问题 - * - * @param busExamQuestionResult 题库问题 - * @return 结果 - */ - public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult); - - /** - * 批量删除题库问题 - * - * @param ids 需要删除的题库问题主键集合 - * @return 结果 - */ - public int deleteBusExamQuestionResultByIds(Long[] ids); - - /** - * 删除题库问题信息 - * - * @param id 题库问题主键 - * @return 结果 - */ - public int deleteBusExamQuestionResultById(Long id); -} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserResultService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserResultService.java deleted file mode 100644 index a6a681f2..00000000 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserResultService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.yanzhu.manage.service; - -import java.util.List; -import com.yanzhu.manage.domain.BusExamUserResult; - -/** - * 用户试卷结果Service接口 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -public interface IBusExamUserResultService -{ - /** - * 查询用户试卷结果 - * - * @param examUserId 用户试卷结果主键 - * @return 用户试卷结果 - */ - public BusExamUserResult selectBusExamUserResultByExamUserId(Long examUserId); - - /** - * 查询用户试卷结果列表 - * - * @param busExamUserResult 用户试卷结果 - * @return 用户试卷结果集合 - */ - public List selectBusExamUserResultList(BusExamUserResult busExamUserResult); - - /** - * 新增用户试卷结果 - * - * @param busExamUserResult 用户试卷结果 - * @return 结果 - */ - public int insertBusExamUserResult(BusExamUserResult busExamUserResult); - - /** - * 修改用户试卷结果 - * - * @param busExamUserResult 用户试卷结果 - * @return 结果 - */ - public int updateBusExamUserResult(BusExamUserResult busExamUserResult); - - /** - * 批量删除用户试卷结果 - * - * @param examUserIds 需要删除的用户试卷结果主键集合 - * @return 结果 - */ - public int deleteBusExamUserResultByExamUserIds(Long[] examUserIds); - - /** - * 删除用户试卷结果信息 - * - * @param examUserId 用户试卷结果主键 - * @return 结果 - */ - public int deleteBusExamUserResultByExamUserId(Long examUserId); -} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java index 0ab2e494..4c15424f 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java @@ -1,6 +1,8 @@ package com.yanzhu.manage.service; import java.util.List; +import java.util.Map; + import com.yanzhu.manage.domain.BusTrainingVideo; /** @@ -27,6 +29,14 @@ public interface IBusTrainingVideoService */ public List selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo); + /** + * 统计培训视频列表 + * + * @param busTrainingVideo 培训视频 + * @return 培训视频集合 + */ + public List> findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo); + /** * 新增培训视频 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoQuesServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoQuesServiceImpl.java deleted file mode 100644 index a041f8cc..00000000 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoQuesServiceImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.yanzhu.manage.service.impl; - -import java.util.Date; -import java.util.List; - -import com.yanzhu.common.core.context.SecurityContextHolder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.yanzhu.manage.mapper.BusExamInfoQuesMapper; -import com.yanzhu.manage.domain.BusExamInfoQues; -import com.yanzhu.manage.service.IBusExamInfoQuesService; - -/** - * 试卷问题Service业务层处理 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -@Service -public class BusExamInfoQuesServiceImpl implements IBusExamInfoQuesService -{ - @Autowired - private BusExamInfoQuesMapper busExamInfoQuesMapper; - - /** - * 查询试卷问题 - * - * @param examId 试卷问题主键 - * @return 试卷问题 - */ - @Override - public BusExamInfoQues selectBusExamInfoQuesByExamId(Long examId) - { - return busExamInfoQuesMapper.selectBusExamInfoQuesByExamId(examId); - } - - /** - * 查询试卷问题列表 - * - * @param busExamInfoQues 试卷问题 - * @return 试卷问题 - */ - @Override - public List selectBusExamInfoQuesList(BusExamInfoQues busExamInfoQues) - { - return busExamInfoQuesMapper.selectBusExamInfoQuesList(busExamInfoQues); - } - - /** - * 新增试卷问题 - * - * @param busExamInfoQues 试卷问题 - * @return 结果 - */ - @Override - public int insertBusExamInfoQues(BusExamInfoQues busExamInfoQues) - { - busExamInfoQues.setCreateBy(SecurityContextHolder.getUserName()); - busExamInfoQues.setCreateTime(new Date()); - return busExamInfoQuesMapper.insertBusExamInfoQues(busExamInfoQues); - } - - /** - * 修改试卷问题 - * - * @param busExamInfoQues 试卷问题 - * @return 结果 - */ - @Override - public int updateBusExamInfoQues(BusExamInfoQues busExamInfoQues) - { - - busExamInfoQues.setUpdateBy(SecurityContextHolder.getUserName()); - busExamInfoQues.setUpdateTime(new Date()); - return busExamInfoQuesMapper.updateBusExamInfoQues(busExamInfoQues); - } - - /** - * 批量删除试卷问题 - * - * @param examIds 需要删除的试卷问题主键 - * @return 结果 - */ - @Override - public int deleteBusExamInfoQuesByExamIds(Long[] examIds) - { - return busExamInfoQuesMapper.deleteBusExamInfoQuesByExamIds(examIds); - } - - /** - * 删除试卷问题信息 - * - * @param examId 试卷问题主键 - * @return 结果 - */ - @Override - public int deleteBusExamInfoQuesByExamId(Long examId) - { - return busExamInfoQuesMapper.deleteBusExamInfoQuesByExamId(examId); - } -} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoServiceImpl.java index 7a379c8c..cb494e6b 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamInfoServiceImpl.java @@ -5,6 +5,7 @@ import java.util.List; import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.StringUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -47,6 +48,8 @@ public class BusExamInfoServiceImpl implements IBusExamInfoService @Override public List selectBusExamInfoList(BusExamInfo busExamInfo) { + busExamInfo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId()); + busExamInfo.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId()); return busExamInfoMapper.selectBusExamInfoList(busExamInfo); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamQuestionResultServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamQuestionResultServiceImpl.java deleted file mode 100644 index d16b187e..00000000 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamQuestionResultServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.yanzhu.manage.service.impl; - -import java.util.List; - -import com.yanzhu.common.core.context.SecurityContextHolder; -import com.yanzhu.common.core.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.yanzhu.manage.mapper.BusExamQuestionResultMapper; -import com.yanzhu.manage.domain.BusExamQuestionResult; -import com.yanzhu.manage.service.IBusExamQuestionResultService; - -/** - * 题库问题Service业务层处理 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -@Service -public class BusExamQuestionResultServiceImpl implements IBusExamQuestionResultService -{ - @Autowired - private BusExamQuestionResultMapper busExamQuestionResultMapper; - - /** - * 查询题库问题 - * - * @param id 题库问题主键 - * @return 题库问题 - */ - @Override - public BusExamQuestionResult selectBusExamQuestionResultById(Long id) - { - return busExamQuestionResultMapper.selectBusExamQuestionResultById(id); - } - - /** - * 查询题库问题列表 - * - * @param busExamQuestionResult 题库问题 - * @return 题库问题 - */ - @Override - public List selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult) - { - return busExamQuestionResultMapper.selectBusExamQuestionResultList(busExamQuestionResult); - } - - /** - * 新增题库问题 - * - * @param busExamQuestionResult 题库问题 - * @return 结果 - */ - @Override - public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult) - { - busExamQuestionResult.setCreateTime(DateUtils.getNowDate()); - busExamQuestionResult.setCreateBy(SecurityContextHolder.getUserName()); - return busExamQuestionResultMapper.insertBusExamQuestionResult(busExamQuestionResult); - } - - /** - * 修改题库问题 - * - * @param busExamQuestionResult 题库问题 - * @return 结果 - */ - @Override - public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult) - { - busExamQuestionResult.setUpdateTime(DateUtils.getNowDate()); - busExamQuestionResult.setUpdateBy(SecurityContextHolder.getUserName()); - return busExamQuestionResultMapper.updateBusExamQuestionResult(busExamQuestionResult); - } - - /** - * 批量删除题库问题 - * - * @param ids 需要删除的题库问题主键 - * @return 结果 - */ - @Override - public int deleteBusExamQuestionResultByIds(Long[] ids) - { - return busExamQuestionResultMapper.deleteBusExamQuestionResultByIds(ids); - } - - /** - * 删除题库问题信息 - * - * @param id 题库问题主键 - * @return 结果 - */ - @Override - public int deleteBusExamQuestionResultById(Long id) - { - return busExamQuestionResultMapper.deleteBusExamQuestionResultById(id); - } -} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserResultServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserResultServiceImpl.java deleted file mode 100644 index 506b420c..00000000 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserResultServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.yanzhu.manage.service.impl; - -import java.util.Date; -import java.util.List; - -import com.yanzhu.common.core.context.SecurityContextHolder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.yanzhu.manage.mapper.BusExamUserResultMapper; -import com.yanzhu.manage.domain.BusExamUserResult; -import com.yanzhu.manage.service.IBusExamUserResultService; - -/** - * 用户试卷结果Service业务层处理 - * - * @author JiangYuQi - * @date 2024-08-25 - */ -@Service -public class BusExamUserResultServiceImpl implements IBusExamUserResultService -{ - @Autowired - private BusExamUserResultMapper busExamUserResultMapper; - - /** - * 查询用户试卷结果 - * - * @param examUserId 用户试卷结果主键 - * @return 用户试卷结果 - */ - @Override - public BusExamUserResult selectBusExamUserResultByExamUserId(Long examUserId) - { - return busExamUserResultMapper.selectBusExamUserResultByExamUserId(examUserId); - } - - /** - * 查询用户试卷结果列表 - * - * @param busExamUserResult 用户试卷结果 - * @return 用户试卷结果 - */ - @Override - public List selectBusExamUserResultList(BusExamUserResult busExamUserResult) - { - return busExamUserResultMapper.selectBusExamUserResultList(busExamUserResult); - } - - /** - * 新增用户试卷结果 - * - * @param busExamUserResult 用户试卷结果 - * @return 结果 - */ - @Override - public int insertBusExamUserResult(BusExamUserResult busExamUserResult) - { - busExamUserResult.setCreateBy(SecurityContextHolder.getUserName()); - busExamUserResult.setCreateTime(new Date()); - return busExamUserResultMapper.insertBusExamUserResult(busExamUserResult); - } - - /** - * 修改用户试卷结果 - * - * @param busExamUserResult 用户试卷结果 - * @return 结果 - */ - @Override - public int updateBusExamUserResult(BusExamUserResult busExamUserResult) - { - busExamUserResult.setUpdateBy(SecurityContextHolder.getUserName()); - busExamUserResult.setUpdateTime(new Date()); - return busExamUserResultMapper.updateBusExamUserResult(busExamUserResult); - } - - /** - * 批量删除用户试卷结果 - * - * @param examUserIds 需要删除的用户试卷结果主键 - * @return 结果 - */ - @Override - public int deleteBusExamUserResultByExamUserIds(Long[] examUserIds) - { - return busExamUserResultMapper.deleteBusExamUserResultByExamUserIds(examUserIds); - } - - /** - * 删除用户试卷结果信息 - * - * @param examUserId 用户试卷结果主键 - * @return 结果 - */ - @Override - public int deleteBusExamUserResultByExamUserId(Long examUserId) - { - return busExamUserResultMapper.deleteBusExamUserResultByExamUserId(examUserId); - } -} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java index 8be6774c..88a88547 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java @@ -1,9 +1,11 @@ package com.yanzhu.manage.service.impl; import java.util.List; +import java.util.Map; import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.yanzhu.manage.mapper.BusTrainingVideoMapper; @@ -43,9 +45,24 @@ public class BusTrainingVideoServiceImpl implements IBusTrainingVideoService @Override public List selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo) { + busTrainingVideo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId()); + busTrainingVideo.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId()); return busTrainingVideoMapper.selectBusTrainingVideoList(busTrainingVideo); } + /** + * 统计培训视频列表 + * + * @param busTrainingVideo 培训视频 + * @return 培训视频集合 + */ + @Override + public List> findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo){ + busTrainingVideo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId()); + busTrainingVideo.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId()); + return busTrainingVideoMapper.findBusTrainingVideoByLevel(busTrainingVideo); + } + /** * 新增培训视频 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java index 4832f644..3e9cdd54 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java @@ -2,6 +2,7 @@ package com.yanzhu.manage.service.impl; import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.manage.domain.BusTrainingVideoUser; import com.yanzhu.manage.mapper.BusTrainingVideoUserMapper; import com.yanzhu.manage.service.IBusTrainingVideoUserService; @@ -43,6 +44,8 @@ public class BusTrainingVideoUserServiceImpl implements IBusTrainingVideoUserSer @Override public List selectBusTrainingVideoUserList(BusTrainingVideoUser busTrainingVideoUser) { + busTrainingVideoUser.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId()); + busTrainingVideoUser.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId()); return busTrainingVideoUserMapper.selectBusTrainingVideoUserList(busTrainingVideoUser); } diff --git a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysUserController.java b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysUserController.java index 82930bd0..30e503de 100644 --- a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysUserController.java +++ b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/controller/SysUserController.java @@ -144,8 +144,8 @@ public class SysUserController extends BaseController { } // 以项目人员身份登录 sysUser = userService.selectUserByUserName(username, Convert.toLong(list.get(0).get("project_id"))); - sysUser.setActiveComId(sysUser.getComId()); - sysUser.setActiveComName(sysUser.getComName()); + sysUser.setActiveComId(Convert.toLong(list.get(0).get("com_id"))); + sysUser.setActiveComName(Convert.toStr(list.get(0).get("com_name"))); sysUser.setActiveProjectId(Convert.toLong(list.get(0).get("project_id"))); sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name"))); } @@ -171,8 +171,8 @@ public class SysUserController extends BaseController { SysUser sysUser = userService.selectUserByUserName(username, deptId); List> list = userService.selectProjectsByUserId(sysUser.getUserId()); - sysUser.setActiveComId(sysUser.getComId()); - sysUser.setActiveComName(sysUser.getComName()); + sysUser.setActiveComId(Convert.toLong(list.get(0).get("com_id"))); + sysUser.setActiveComName(Convert.toStr(list.get(0).get("com_name"))); sysUser.setActiveProjectId(Convert.toLong(list.get(0).get("project_id"))); sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name"))); @@ -222,21 +222,7 @@ public class SysUserController extends BaseController { */ @GetMapping("getInfo") public AjaxResult getInfo() { - SysUser cache = SecurityUtils.getLoginUser().getSysUser(); - SysUser user; - if (SecurityUtils.isAdmin(cache.getUserId())) { - user = userService.selectUserById(cache.getUserId()); - } else { - if (SecurityUtils.isGSAdmin()) { - user = userService.selectUserByIdAndDept(cache.getUserId(), cache.getComId()); - } else { - user = userService.selectUserByIdAndDept(cache.getUserId(), cache.getActiveProjectId()); - } - } - user.setActiveComId(cache.getComId()); - user.setActiveComName(cache.getComName()); - user.setActiveProjectId(cache.getActiveProjectId()); - user.setActiveProjectName(cache.getActiveProjectName()); + SysUser user = SecurityUtils.getLoginUser().getSysUser(); // 角色集合 Set roles = permissionService.getRolePermission(user); // 权限集合 diff --git a/yanzhu-ui-vue3/src/api/manage/busTrainingVideo.js b/yanzhu-ui-vue3/src/api/manage/busTrainingVideo.js index 93bf19ba..0d21b33b 100644 --- a/yanzhu-ui-vue3/src/api/manage/busTrainingVideo.js +++ b/yanzhu-ui-vue3/src/api/manage/busTrainingVideo.js @@ -9,6 +9,15 @@ export function listBusTrainingVideo(query) { }) } +// 统计培训视频列表 +export function findBusTrainingVideo(query) { + return request({ + url: '/manage/busTrainingVideo/findGroupByLevel', + method: 'get', + params: query + }) +} + // 查询培训视频详细 export function getBusTrainingVideo(id) { return request({ diff --git a/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue b/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue index 2eb76051..eedb4c85 100644 --- a/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/busExamQuestion/index.vue @@ -498,7 +498,7 @@ function submitForm() { let craftPostValues = []; form.value.craftPost.forEach((item) => { if(craftTypeValues.indexOf(item[0])<0){ - craftTypeValues.push(item[0]) + craftTypeValues.push(item[0]); } craftPostValues.push(item[1]); }); @@ -626,8 +626,8 @@ function initPage() { } } +/** 初始化岗位 */ function initPost() { - // 初始化岗位选择 let craftTypeDatas=pro_craft_type._object.pro_craft_type; let craftPostDatas=pro_craft_post._object.pro_craft_post; craftTypeDatas.forEach(item =>{ @@ -654,7 +654,7 @@ getList();