diff --git a/README.md b/README.md
index 83d23cb..27327ad 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@
- 考试管理
- 题库管理
- 成绩统计
+- AI题目生成
## 微信扫码登录配置
@@ -39,6 +40,42 @@ wechat:
4. 在微信中确认登录
5. 系统将自动跳转到主页
+## AI题目生成功能
+
+系统集成了AI题目生成功能,可以通过调用AI大模型API来自动生成各种类型的题目。
+
+### 配置步骤
+
+1. 在`exam-online-api/ruoyi-admin/src/main/resources/application.yml`中配置AI API参数:
+
+```yaml
+ai:
+ # DeepSeek API配置
+ api-url: https://api.deepseek.com/v1/chat/completions
+ model-name: deepseek-chat
+ api-key: your_deepseek_api_key
+ connect-timeout: 30
+ read-timeout: 60
+ write-timeout: 30
+
+ # OpenRouter API配置
+ openrouter:
+ api-url: https://openrouter.ai/api/v1/chat/completions
+ model-name: deepseek/deepseek-v3-0324-free
+ api-key: your_openrouter_api_key
+ enabled: false
+```
+
+2. 执行数据库脚本`doc/ai_question_permissions.sql`添加相关权限
+
+### 使用说明
+
+1. 进入"题库管理"模块
+2. 选择一个题库或创建新题库
+3. 点击"AI生成题目"按钮
+4. 配置生成参数并生成题目
+5. 点击"保存到题库"将题目保存到当前题库中
+
## 技术栈
- 后端:Spring Boot + MyBatis + Spring Security
diff --git a/doc/ai_question_generation_guide.md b/doc/ai_question_generation_guide.md
new file mode 100644
index 0000000..cc593b4
--- /dev/null
+++ b/doc/ai_question_generation_guide.md
@@ -0,0 +1,219 @@
+# AI题目生成功能使用指南
+
+## 功能概述
+
+AI题目生成功能是yzexam在线考试系统的一个扩展功能,通过调用AI大模型API(如DeepSeek、OpenRouter等)来自动生成各种类型的题目,包括选择题、简答题和论述题等,以提高教师出题效率,丰富题库内容。
+
+## 功能特性
+
+- 支持生成多种题型:单选题、多选题、简答题、论述题
+- 支持"全部题型"选项,一次性生成多种类型的题目
+- 支持设置题目数量(1-20题)
+- 支持设置题目难度等级:简单、中等、困难
+- 支持指定知识点范围生成题目
+- 支持指定关键词生成题目(多个关键词用逗号分隔)
+- 支持指定题目方向生成题目(理解、应用、分析、综合、评价)
+- 支持指定适合学段生成题目(初中、高中、大学、研究生)
+- 生成的题目可直接保存到题库中
+
+## 技术架构
+
+### 后端技术栈
+- Java + Spring Boot
+- OkHttp(用于调用AI API)
+- FastJSON(用于JSON处理)
+- MyBatis(用于数据库操作)
+
+### 前端技术栈
+- Vue.js 2.x
+- Element UI
+- Axios
+
+## 部署配置
+
+### 1. 配置AI API密钥
+
+在[application.yml](file:///Volumes/macData/code/yzexam/examapi/ruoyi-admin/src/main/resources/application.yml)中配置AI API相关信息:
+
+```yaml
+# AI题目生成配置
+ai:
+ # DeepSeek API配置
+ api-url: https://api.deepseek.com/v1/chat/completions
+ model-name: deepseek-chat
+ api-key: ${AI_API_KEY:}
+ connect-timeout: 30
+ read-timeout: 60
+ write-timeout: 30
+
+ # OpenRouter API配置
+ openrouter:
+ api-url: https://openrouter.ai/api/v1/chat/completions
+ model-name: deepseek/deepseek-v3-0324-free
+ api-key: ${OPENROUTER_API_KEY:}
+ enabled: false
+```
+
+### 2. 设置环境变量
+
+可以选择使用DeepSeek API或OpenRouter API:
+
+使用DeepSeek API:
+```bash
+export AI_API_KEY="your_deepseek_api_key_here"
+```
+
+使用OpenRouter API:
+```bash
+export OPENROUTER_API_KEY="your_openrouter_api_key_here"
+```
+
+### 3. 数据库权限配置
+
+运行[ai_question_permissions.sql](file:///Volumes/macData/code/yzexam/doc/ai_question_permissions.sql)脚本,为系统添加AI题目生成功能所需的菜单和权限。
+
+## 使用说明
+
+### 1. 访问AI题目生成功能
+
+1. 登录系统后,进入"题库管理"模块
+2. 选择一个题库或创建新题库
+3. 点击"AI生成题目"按钮
+4. 系统将跳转到AI题目生成页面
+
+### 2. 配置生成参数
+
+在AI题目生成页面中,配置以下参数:
+
+- **题目类型**:选择要生成的题目类型(单选题、多选题、简答题、论述题或全部题型)
+- **题目数量**:输入要生成的题目数量(1-20题)
+- **知识点范围**:输入题目涉及的知识点范围
+- **关键词**:输入与题目相关的关键词(多个关键词用逗号分隔)
+- **难易程度**:选择题目的难度等级(简单、中等、困难)
+- **题目方向**:选择题目的考查方向(理解、应用、分析、综合、评价)
+- **适合学段**:选择题目适合的学段(初中、高中、大学、研究生)
+
+### 3. 生成题目
+
+点击"生成题目"按钮,系统将调用AI API生成指定类型的题目,并在页面中显示生成结果。
+
+### 4. 保存题目
+
+生成题目后,可以点击"保存到题库"按钮将题目保存到当前题库中。
+
+## API接口说明
+
+### 1. 生成选择题
+```
+POST /ai/questions/choice
+Content-Type: application/json
+
+{
+ "knowledgePoint": "马克思主义基本原理",
+ "keywords": "唯物主义,辩证法,实践",
+ "difficulty": "medium",
+ "direction": "comprehension",
+ "gradeLevel": "college",
+ "multiple": false
+}
+```
+
+### 2. 生成简答题
+```
+POST /ai/questions/short-answer
+Content-Type: application/json
+
+{
+ "knowledgePoint": "社会主义核心价值观",
+ "keywords": "爱国,敬业,诚信,友善",
+ "difficulty": "medium",
+ "direction": "application",
+ "gradeLevel": "college"
+}
+```
+
+### 3. 生成论述题
+```
+POST /ai/questions/essay
+Content-Type: application/json
+
+{
+ "knowledgePoint": "新时代党的建设",
+ "keywords": "全面从严治党,反腐倡康,制度建设",
+ "difficulty": "hard",
+ "direction": "evaluation",
+ "gradeLevel": "postgraduate"
+}
+```
+
+### 4. 批量生成题目
+```
+POST /ai/questions/batch
+Content-Type: application/json
+
+{
+ "questionType": "choice",
+ "count": 5,
+ "knowledgePoint": "马克思主义基本原理",
+ "keywords": "唯物主义,辩证法,实践",
+ "difficulty": "medium",
+ "direction": "comprehension",
+ "gradeLevel": "college",
+ "multiple": false
+}
+```
+
+### 5. 保存AI生成的题目
+```
+POST /ai/questions/save
+Content-Type: application/json
+
+{
+ "questions": [...], // AI生成的题目列表
+ "bankCode": "题库代码"
+}
+```
+
+## 安全注意事项
+
+1. API密钥应妥善保管,不要硬编码在代码中
+2. 建议通过环境变量或配置中心管理API密钥
+3. 实际部署时应添加身份验证和权限控制
+4. 添加API调用频率限制,防止滥用
+
+## 常见问题
+
+### 1. 生成题目失败
+
+可能原因:
+- API密钥配置错误
+- 网络连接问题
+- AI API服务不可用
+
+解决方案:
+- 检查API密钥是否正确配置
+- 检查网络连接是否正常
+- 确认AI API服务是否可用
+
+### 2. 保存题目失败
+
+可能原因:
+- 题库代码不正确
+- 数据库连接问题
+- 权限不足
+
+解决方案:
+- 检查题库代码是否正确
+- 检查数据库连接是否正常
+- 确认用户是否有保存题目的权限
+
+## 扩展建议
+
+1. 添加题目质量评估功能
+2. 实现题目去重机制
+3. 添加题目版本管理
+4. 支持批量生成题目
+5. 添加题目审核流程
+6. 实现题目分类管理
+7. 添加题目搜索功能
+8. 支持题目导出为不同格式
\ No newline at end of file
diff --git a/doc/ai_question_permissions.sql b/doc/ai_question_permissions.sql
new file mode 100644
index 0000000..d26af6b
--- /dev/null
+++ b/doc/ai_question_permissions.sql
@@ -0,0 +1,19 @@
+-- 添加AI题目生成功能的权限
+-- 菜单权限
+INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES ('AI题目生成', 2000, 1, 'ai/generator', 'questions/ai/AIQuestionGenerator', 1, 0, 'C', '0', '0', 'ai:questions:generate', 'magic', 'admin', sysdate(), '', null, 'AI题目生成菜单');
+
+-- 按钮权限
+INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES ('生成题目', 2001, 1, '#', '', 1, 0, 'F', '0', '0', 'ai:questions:generate', '#', 'admin', sysdate(), '', null, '');
+
+INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES ('保存题目', 2001, 2, '#', '', 1, 0, 'F', '0', '0', 'ai:questions:save', '#', 'admin', sysdate(), '', null, '');
+
+-- 获取新插入菜单的ID
+SET @menu_id = LAST_INSERT_ID();
+
+-- 角色权限关联(给管理员角色分配权限)
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 2001);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 2002);
+INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (1, 2003);
\ No newline at end of file
diff --git a/exam-online-api-DEL/.gitignore b/exam-online-api-DEL/.gitignore
deleted file mode 100644
index 2c0e049..0000000
--- a/exam-online-api-DEL/.gitignore
+++ /dev/null
@@ -1,44 +0,0 @@
-######################################################################
-# Build Tools
-
-.gradle
-/build/
-!gradle/wrapper/gradle-wrapper.jar
-
-target/
-!.mvn/wrapper/maven-wrapper.jar
-
-######################################################################
-# IDE
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-nbproject/private/
-build/*
-nbbuild/
-dist/
-nbdist/
-.nb-gradle/
-
-######################################################################
-# Others
-*.log
-*.xml.versionsBackup
-*.swp
-
-!*/build/*.java
-!*/build/*.html
-!*/build/*.xml
diff --git a/exam-online-api-DEL/LICENSE b/exam-online-api-DEL/LICENSE
deleted file mode 100644
index 8564f29..0000000
--- a/exam-online-api-DEL/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2018 RuoYi
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/exam-online-api-DEL/README.md b/exam-online-api-DEL/README.md
deleted file mode 100644
index 96c1e9e..0000000
--- a/exam-online-api-DEL/README.md
+++ /dev/null
@@ -1,85 +0,0 @@
-## 平台简介
-
-若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
-
-* 前端采用Vue、Element UI。
-* 后端采用Spring Boot、Spring Security、Redis & Jwt。
-* 权限认证使用Jwt,支持多终端认证系统。
-* 支持加载动态权限菜单,多方式轻松权限控制。
-* 高效率开发,使用代码生成器可以一键生成前后端代码。
-* 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
-* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
-* 特别鸣谢:[element](https://github.com/ElemeFE/element),[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://github.com/elunez/eladmin-web)。
-* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
-* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
-
-## 内置功能
-
-1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
-2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
-3. 岗位管理:配置系统用户所属担任职务。
-4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
-5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
-6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
-7. 参数管理:对系统动态配置常用参数。
-8. 通知公告:系统通知公告信息发布维护。
-9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
-10. 登录日志:系统登录日志记录查询包含登录异常。
-11. 在线用户:当前系统中活跃用户状态监控。
-12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
-13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
-14. 系统接口:根据业务代码自动生成相关的api接口文档。
-15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
-16. 缓存监控:对系统的缓存信息查询,命令统计等。
-17. 在线构建器:拖动表单元素生成相应的HTML代码。
-18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
-
-## 在线体验
-
-- admin/admin123
-- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
-
-演示地址:http://vue.ruoyi.vip
-文档地址:http://doc.ruoyi.vip
-
-## 演示图
-
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-
-
-## 若依前后端分离交流群
-
-QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) 点击按钮入群。
\ No newline at end of file
diff --git a/exam-online-api-DEL/bin/clean b/exam-online-api-DEL/bin/clean
deleted file mode 100755
index 2f3d3e5..0000000
--- a/exam-online-api-DEL/bin/clean
+++ /dev/null
@@ -1 +0,0 @@
-mvn clean
\ No newline at end of file
diff --git a/exam-online-api-DEL/bin/clean.bat b/exam-online-api-DEL/bin/clean.bat
deleted file mode 100644
index 5c2a3b2..0000000
--- a/exam-online-api-DEL/bin/clean.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off
-echo.
-echo [Ϣ] ·
-echo.
-
-%~d0
-cd %~dp0
-
-cd ..
-call mvn clean
-
-pause
\ No newline at end of file
diff --git a/exam-online-api-DEL/bin/package b/exam-online-api-DEL/bin/package
deleted file mode 100755
index 502174c..0000000
--- a/exam-online-api-DEL/bin/package
+++ /dev/null
@@ -1 +0,0 @@
-mvn clean package -Dmaven.test.skip=true
\ No newline at end of file
diff --git a/exam-online-api-DEL/bin/package.bat b/exam-online-api-DEL/bin/package.bat
deleted file mode 100644
index c693ec0..0000000
--- a/exam-online-api-DEL/bin/package.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off
-echo.
-echo [Ϣ] Weḅwar/jarļ
-echo.
-
-%~d0
-cd %~dp0
-
-cd ..
-call mvn clean package -Dmaven.test.skip=true
-
-pause
\ No newline at end of file
diff --git a/exam-online-api-DEL/bin/run b/exam-online-api-DEL/bin/run
deleted file mode 100755
index c1cbfc6..0000000
--- a/exam-online-api-DEL/bin/run
+++ /dev/null
@@ -1 +0,0 @@
-java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar ruoyi-admin/target/examapi.jar
\ No newline at end of file
diff --git a/exam-online-api-DEL/bin/run.bat b/exam-online-api-DEL/bin/run.bat
deleted file mode 100644
index 90073a8..0000000
--- a/exam-online-api-DEL/bin/run.bat
+++ /dev/null
@@ -1,14 +0,0 @@
-@echo off
-echo.
-echo [Ϣ] Web̡
-echo.
-
-cd %~dp0
-cd ../ruoyi-admin/target
-
-set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-
-java -jar %JAVA_OPTS% ruoyi-admin.jar
-
-cd bin
-pause
\ No newline at end of file
diff --git a/exam-online-api-DEL/doc/若依环境使用手册.docx b/exam-online-api-DEL/doc/若依环境使用手册.docx
deleted file mode 100644
index 9e4daef..0000000
Binary files a/exam-online-api-DEL/doc/若依环境使用手册.docx and /dev/null differ
diff --git a/exam-online-api-DEL/hig-application/pom.xml b/exam-online-api-DEL/hig-application/pom.xml
deleted file mode 100644
index 304c777..0000000
--- a/exam-online-api-DEL/hig-application/pom.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-
- 4.0.0
-
- com.ruoyi
- ruoyi
- 3.8.6
-
-
- hig-application
- hig-application
- 应用扩展包
-
- 1.8
- 1.2.83
- 1.18.30
- 12.2.0.1.0
- 1.2.20
- 2.3.2
- 2.10.1
- 3.0.5
- 2.3.2
- 4.5.14
- 4.5.14
- 4.4.16
- 1.15
- 1.2
- 2.11.0
- 3.12.0
- 3.12.0
- 4.5.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
- provided
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- com.alibaba
- fastjson
- ${fastjson.version}
-
-
- org.projectlombok
- lombok
- ${lombok.version}
-
-
- com.google.code.gson
- gson
- ${gson.version}
-
-
- cn.hutool
- hutool-all
- 5.8.25
-
-
- com.github.ulisesbocchio
- jasypt-spring-boot-starter
- ${jasypt.version}
-
-
-
- org.springframework
- spring-context-support
-
-
-
- org.springframework
- spring-tx
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
- ${druid.version}
-
-
-
- org.mybatis.spring.boot
- mybatis-spring-boot-starter
- ${mybatis.version}
-
-
-
- org.quartz-scheduler
- quartz
- ${quartz.version}
-
-
- slf4j-api
- org.slf4j
-
-
-
-
-
- org.apache.httpcomponents
- httpclient
- ${httpclient.version}
-
-
-
- org.apache.httpcomponents
- httpmime
- ${httpmime.version}
-
-
-
- org.apache.httpcomponents
- httpcore
- ${httpcore.version}
-
-
-
- com.thoughtworks.xstream
- xstream
- 1.4.20
-
-
-
-
- commons-io
- commons-io
- ${commons-io.version}
-
-
- commons-lang
- commons-lang
- 2.6
-
-
-
-
- commons-codec
- commons-codec
- ${commons-codec.version}
-
-
-
- commons-logging
- commons-logging
- ${commons-logging.version}
-
-
- org.apache.commons
- commons-lang3
- ${commons-lang3.version}
-
-
- com.github.binarywang
- weixin-java-cp
- ${weixin-java-cp.version}
-
-
- org.json
- json
- 20231013
-
-
- com.ruoyi
- ruoyi-framework
-
-
- com.ruoyi
- ruoyi-system
-
-
- com.ruoyi
- ruoyi-common
-
-
- com.ruoyi
- hig-common
-
-
-
\ No newline at end of file
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/cms/utils/FileUpload.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/cms/utils/FileUpload.java
deleted file mode 100644
index 7ca227a..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/cms/utils/FileUpload.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.hig.cms.utils;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOUtils;
-import org.springframework.web.multipart.MultipartFile;
-
-public class FileUpload {
- /**
- * 文件上传处理
- *
- * @param file
- * @return
- */
- public static String writeUploadFile(MultipartFile file,String path) {
- String filename = file.getOriginalFilename();
- System.out.println("原始文件名:" + filename);
- File fileDir = new File(path);
- if (!fileDir.exists())
- fileDir.mkdirs();
-
- String extname = FilenameUtils.getExtension(filename);
- String allowImgFormat = "gif,jpg,jpeg,png";
- if (!allowImgFormat.contains(extname.toLowerCase())) {
- return "NOT_IMAGE";
- }
-
- filename = Math.abs(file.getOriginalFilename().hashCode()) + RandomUtils.createRandomString( 4 ) + "." + extname;
- InputStream input = null;
- FileOutputStream fos = null;
- try {
- input = file.getInputStream();
- fos = new FileOutputStream(path + "/" + filename);
- IOUtils.copy(input, fos);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- } finally {
- if (input != null) {
- try {
- input.close();
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- if (fos != null) {
- try {
- fos.close();
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- }
- }
- return filename;
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/cms/utils/RandomUtils.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/cms/utils/RandomUtils.java
deleted file mode 100644
index 462d85d..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/cms/utils/RandomUtils.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.hig.cms.utils;
-
-public class RandomUtils {
- private static final String charlist = "0123456789";
-
- public static String createRandomString(int len) {
- String str = new String();
- for (int i = 0; i < len; i++) {
- str += charlist.charAt(getRandom(charlist.length()));
- }
- return str;
- }
-
- public static int getRandom(int mod) {
- if (mod < 1) {
- return 0;
- }
- int ret = getInt() % mod;
- return ret;
- }
-
- private static int getInt() {
- int ret = Math.abs(Long.valueOf(getRandomNumString()).intValue());
- return ret;
- }
-
- private static String getRandomNumString() {
- double d = Math.random();
- String dStr = String.valueOf(d).replaceAll("[^\\d]", "");
- if (dStr.length() > 1) {
- dStr = dStr.substring(0, dStr.length() - 1);
- }
- return dStr;
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskDataController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskDataController.java
deleted file mode 100644
index 57fcfcc..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskDataController.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.hig.exam.controller;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.hig.exam.domain.ExamTaskData;
-import com.hig.exam.service.IExamTaskDataService;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-
-@RestController
-@RequestMapping("/exam/examtask")
-public class ExamTaskDataController extends BaseController{
- @Autowired
- private IExamTaskDataService examTaskDataService;
-
-
- @PostMapping("/save")
- public AjaxResult save(@RequestBody ExamTaskData examTaskData)
- {
- // 数据判断
- if (examTaskData == null) {
- return AjaxResult.error(-1, "传入数据为空!");
- }
-
- if (examTaskData.getExamTaskManager() == null) {
- return AjaxResult.error(-1, "传入任务属性信息为空!");
- }
-
- if (examTaskData.getTaskQuestionsList() == null || examTaskData.getTaskQuestionsList().size() == 0) {
- return AjaxResult.error(-1, "传入题库信息为空!");
- }
-
- if (examTaskData.getTaskGroupList() == null || examTaskData.getTaskGroupList().size() == 0) {
- return AjaxResult.error(-1, "传入人员分组信息为空!");
- }
-
- try
- {
- examTaskDataService.saveData(examTaskData);
- }
- catch(Exception e) {
- return AjaxResult.error(-1, e.getMessage());
- }
- return AjaxResult.success("保存成功");
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskGroupController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskGroupController.java
deleted file mode 100644
index f032899..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskGroupController.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.hig.exam.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.exam.domain.ExamTaskGroup;
-import com.hig.exam.service.IExamTaskGroupService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 任务分组Controller
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-@RestController
-@RequestMapping("/exam/taskgroup")
-public class ExamTaskGroupController extends BaseController
-{
- @Autowired
- private IExamTaskGroupService examTaskGroupService;
-
- /**
- * 查询任务分组列表
- */
- @GetMapping("/list")
- public TableDataInfo list(ExamTaskGroup examTaskGroup)
- {
- startPage();
- List list = examTaskGroupService.selectExamTaskGroupList(examTaskGroup);
- return getDataTable(list);
- }
-
- /**
- * 导出任务分组列表
- */
- @GetMapping("/export")
- public AjaxResult export(ExamTaskGroup examTaskGroup)
- {
- List list = examTaskGroupService.selectExamTaskGroupList(examTaskGroup);
- ExcelUtil util = new ExcelUtil(ExamTaskGroup.class);
- return util.exportExcel(list, "任务分组数据");
- }
-
- /**
- * 获取任务分组详细信息
- */
- @GetMapping(value = "/{examCode}")
- public AjaxResult getInfo(@PathVariable("examCode") String examCode)
- {
- return AjaxResult.success(examTaskGroupService.selectExamTaskGroupById(examCode));
- }
-
- /**
- * 新增任务分组
- */
- @PostMapping
- public AjaxResult add(@RequestBody ExamTaskGroup examTaskGroup)
- {
- return toAjax(examTaskGroupService.insertExamTaskGroup(examTaskGroup));
- }
-
- /**
- * 修改任务分组
- */
- @PostMapping("/update")
- public AjaxResult edit(@RequestBody ExamTaskGroup examTaskGroup)
- {
- return toAjax(examTaskGroupService.updateExamTaskGroup(examTaskGroup));
- }
-
- @PostMapping("/batchupdate")
- public AjaxResult batchUpdate(@RequestBody List examTaskGroupList)
- {
- try
- {
- examTaskGroupService.batchUpdateExamTaskGroup(examTaskGroupList);
- }
- catch(Exception e) {
- return AjaxResult.error(e.getMessage());
- }
-
- return AjaxResult.success();
- }
- /**
- * 删除任务分组
- */
- @GetMapping("/delete/{examCodes}")
- public AjaxResult remove(@PathVariable String[] examCodes)
- {
- return toAjax(examTaskGroupService.deleteExamTaskGroupByIds(examCodes));
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskManagerController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskManagerController.java
deleted file mode 100644
index 2789fd1..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskManagerController.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package com.hig.exam.controller;
-
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.model.LoginUser;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.cms.utils.FileUpload;
-import com.hig.exam.domain.ExamTaskManager;
-import com.hig.exam.domain.ExamTaskPicture;
-import com.hig.exam.service.IExamTaskManagerService;
-import com.hig.exam.service.IExamTaskPictureService;
-import com.hig.questions.domain.ExamBankPicture;
-import com.hig.utils.DateUtils;
-import com.ruoyi.common.utils.ServletUtils;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.framework.web.service.TokenService;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 创建考试Controller
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-@RestController
-@RequestMapping("/exam/examtask")
-public class ExamTaskManagerController extends BaseController
-{
- @Value("${cms.exam.photo-path:/photo/exam}")
- private String photopath;
-
- @Autowired
- private IExamTaskManagerService examTaskManagerService;
-
- @Autowired
- private TokenService tokenService;
-
- @Autowired
- private IExamTaskPictureService examTaskPictureService;
- /**
- * 查询创建考试列表
- */
- @PreAuthorize("@ss.hasPermi('exam:examtask:list')")
- @GetMapping("/list")
- public TableDataInfo list(ExamTaskManager examTaskManager)
- {
-
- if (examTaskManager.getStartTime() != null) {
- examTaskManager.setStartDateText(DateUtils.toShortDateString(examTaskManager.getStartTime()));
- }
-
- if (examTaskManager.getEndTime() != null) {
- examTaskManager.setEndDateText(DateUtils.toShortDateString(examTaskManager.getEndTime()));
- }
-
- startPage();
- List list = examTaskManagerService.selectExamTaskManagerList(examTaskManager);
- return getDataTable(list);
- }
-
- /**
- * 导出创建考试列表
- */
- @PreAuthorize("@ss.hasPermi('exam:examtask:export')")
- @Log(title = "创建考试", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(ExamTaskManager examTaskManager)
- {
- List list = examTaskManagerService.selectExamTaskManagerList(examTaskManager);
- ExcelUtil util = new ExcelUtil(ExamTaskManager.class);
- return util.exportExcel(list, "创建考试数据");
- }
-
- /**
- * 获取创建考试详细信息
- */
- @PreAuthorize("@ss.hasPermi('exam:examtask:query')")
- @GetMapping(value = "/{examCode}")
- public AjaxResult getInfo(@PathVariable("examCode") String examCode)
- {
- return AjaxResult.success(examTaskManagerService.selectExamTaskManagerById(examCode));
- }
-
- /**
- * 新增创建考试
- */
- @PreAuthorize("@ss.hasPermi('exam:examtask:add')")
- @Log(title = "创建考试", businessType = BusinessType.INSERT)
- @PostMapping("/add")
- public AjaxResult add(@RequestBody ExamTaskManager examTaskManager)
- {
- return toAjax(examTaskManagerService.insertExamTaskManager(examTaskManager));
- }
-
- /**
- * 修改创建考试
- */
- @PreAuthorize("@ss.hasPermi('exam:examtask:edit')")
- @Log(title = "创建考试", businessType = BusinessType.UPDATE)
- // @PutMapping
- @PostMapping("/update")
- public AjaxResult edit(@RequestBody ExamTaskManager examTaskManager)
- {
- return toAjax(examTaskManagerService.updateExamTaskManager(examTaskManager));
- }
-
- /**
- * 删除创建考试
- */
- @PreAuthorize("@ss.hasPermi('exam:examtask:remove')")
- @Log(title = "创建考试", businessType = BusinessType.DELETE)
- @GetMapping("/delete/{examCodes}")
- public AjaxResult remove(@PathVariable String[] examCodes)
- {
- return toAjax(examTaskManagerService.deleteExamTaskManagerByIds(examCodes));
- }
-
- /**
- * 新增参数配置
- */
- @PostMapping("/uploadphoto/{examCodes}")
- public AjaxResult uploadPhoto(@PathVariable String examCodes,
- @RequestParam("file") MultipartFile file)
- {
- // 取得原始文件名
- String originalfile = file.getOriginalFilename();
-
- // 拼接路径
- String path = RuoYiConfig.getProfile() + photopath;
- String filename = FileUpload.writeUploadFile(file,path);
- String fileurl = photopath + "/" + filename;
-
- int count = 0;
-
- LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-
- ExamTaskPicture examTaskPicture = new ExamTaskPicture(examCodes,path,fileurl,filename,originalfile,loginUser.getUser().getUserName());
- System.out.println("examTaskPicture:" + examTaskPicture.toString());
-
- try
- {
- examTaskPictureService.deleteExamTaskPictureById(examCodes);
- count = examTaskPictureService.insertExamTaskPicture(examTaskPicture);
- }
- catch(Exception e)
- {
- return AjaxResult.error(e.getMessage());
- }
-
-
- return AjaxResult.success(examTaskPicture);
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskPersonController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskPersonController.java
deleted file mode 100644
index 057442c..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskPersonController.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.hig.exam.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.exam.domain.ExamTaskPerson;
-import com.hig.exam.service.IExamTaskPersonService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 考试人员Controller
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-@RestController
-@RequestMapping("/exam/taskperson")
-public class ExamTaskPersonController extends BaseController
-{
- @Autowired
- private IExamTaskPersonService examTaskPersonService;
-
- /**
- * 查询考试人员列表
- */
- @PreAuthorize("@ss.hasPermi('exam:taskperson:list')")
- @GetMapping("/list")
- public TableDataInfo list(ExamTaskPerson examTaskPerson)
- {
- startPage();
- List list = examTaskPersonService.selectExamTaskPersonList(examTaskPerson);
- return getDataTable(list);
- }
-
- /**
- * 导出考试人员列表
- */
- @PreAuthorize("@ss.hasPermi('exam:taskperson:export')")
- @Log(title = "考试人员", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(ExamTaskPerson examTaskPerson)
- {
- List list = examTaskPersonService.selectExamTaskPersonList(examTaskPerson);
- ExcelUtil util = new ExcelUtil(ExamTaskPerson.class);
- return util.exportExcel(list, "考试人员数据");
- }
-
- /**
- * 获取考试人员详细信息
- */
- @PreAuthorize("@ss.hasPermi('exam:taskperson:query')")
- @GetMapping(value = "/{examCode}")
- public AjaxResult getInfo(@PathVariable("examCode") String examCode)
- {
- return AjaxResult.success(examTaskPersonService.selectExamTaskPersonById(examCode));
- }
-
- /**
- * 新增考试人员
- */
- @PreAuthorize("@ss.hasPermi('exam:taskperson:add')")
- @Log(title = "考试人员", businessType = BusinessType.INSERT)
- @PostMapping("/add")
- public AjaxResult add(@RequestBody ExamTaskPerson examTaskPerson)
- {
- return toAjax(examTaskPersonService.insertExamTaskPerson(examTaskPerson));
- }
-
- /**
- * 修改考试人员
- */
- @PreAuthorize("@ss.hasPermi('exam:taskperson:edit')")
- @Log(title = "考试人员", businessType = BusinessType.UPDATE)
- @PostMapping("/update")
- public AjaxResult edit(@RequestBody ExamTaskPerson examTaskPerson)
- {
- return toAjax(examTaskPersonService.updateExamTaskPerson(examTaskPerson));
- }
-
- /**
- * 更新考试开始时间
- */
- @PostMapping("/starttime")
- public AjaxResult updateStartTime(@RequestBody ExamTaskPerson examTaskPerson)
- {
- return toAjax(examTaskPersonService.updateStartTime(examTaskPerson));
- }
- /**
- * 删除考试人员
- */
- @PreAuthorize("@ss.hasPermi('exam:taskperson:remove')")
- @Log(title = "考试人员", businessType = BusinessType.DELETE)
- @GetMapping("/delete/{examCodes}")
- public AjaxResult remove(@PathVariable String[] examCodes)
- {
- return toAjax(examTaskPersonService.deleteExamTaskPersonByIds(examCodes));
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskPictureController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskPictureController.java
deleted file mode 100644
index 1b91087..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskPictureController.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package com.hig.exam.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.exam.domain.ExamTaskPicture;
-import com.hig.exam.service.IExamTaskPictureService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 考试任务图片管理Controller
- *
- * @author qnsdt
- * @date 2023-01-18
- */
-@RestController
-@RequestMapping("/exam/exampicture")
-public class ExamTaskPictureController extends BaseController
-{
- @Autowired
- private IExamTaskPictureService examTaskPictureService;
-
- /**
- * 查询考试任务图片管理列表
- */
- @PreAuthorize("@ss.hasPermi('exam:exampicture:list')")
- @GetMapping("/list")
- public TableDataInfo list(ExamTaskPicture examTaskPicture)
- {
- startPage();
- List list = examTaskPictureService.selectExamTaskPictureList(examTaskPicture);
- return getDataTable(list);
- }
-
- /**
- * 导出考试任务图片管理列表
- */
- @PreAuthorize("@ss.hasPermi('exam:exampicture:export')")
- @Log(title = "考试任务图片管理", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(ExamTaskPicture examTaskPicture)
- {
- List list = examTaskPictureService.selectExamTaskPictureList(examTaskPicture);
- ExcelUtil util = new ExcelUtil(ExamTaskPicture.class);
- return util.exportExcel(list, "考试任务图片管理数据");
- }
-
- /**
- * 获取考试任务图片管理详细信息
- */
- @PreAuthorize("@ss.hasPermi('exam:exampicture:query')")
- @GetMapping(value = "/{photoCode}")
- public AjaxResult getInfo(@PathVariable("photoCode") String photoCode)
- {
- return AjaxResult.success(examTaskPictureService.selectExamTaskPictureById(photoCode));
- }
-
- /**
- * 新增考试任务图片管理
- */
- @PreAuthorize("@ss.hasPermi('exam:exampicture:add')")
- @Log(title = "考试任务图片管理", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody ExamTaskPicture examTaskPicture)
- {
- return toAjax(examTaskPictureService.insertExamTaskPicture(examTaskPicture));
- }
-
- /**
- * 修改考试任务图片管理
- */
- @PreAuthorize("@ss.hasPermi('exam:exampicture:edit')")
- @Log(title = "考试任务图片管理", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody ExamTaskPicture examTaskPicture)
- {
- return toAjax(examTaskPictureService.updateExamTaskPicture(examTaskPicture));
- }
-
- /**
- * 删除考试任务图片管理
- */
- @PreAuthorize("@ss.hasPermi('exam:exampicture:remove')")
- @Log(title = "考试任务图片管理", businessType = BusinessType.DELETE)
- @DeleteMapping("/{photoCodes}")
- public AjaxResult remove(@PathVariable String[] photoCodes)
- {
- return toAjax(examTaskPictureService.deleteExamTaskPictureByIds(photoCodes));
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskQuestionsController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskQuestionsController.java
deleted file mode 100644
index 066de37..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/controller/ExamTaskQuestionsController.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.hig.exam.controller;
-
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.exam.domain.ExamTaskQuestions;
-import com.hig.exam.service.IExamTaskQuestionsService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 任务题目Controller
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-@RestController
-@RequestMapping("/exam/taskquestions")
-public class ExamTaskQuestionsController extends BaseController
-{
- @Autowired
- private IExamTaskQuestionsService examTaskQuestionsService;
-
- /**
- * 查询任务题目列表
- */
- @GetMapping("/list")
- public TableDataInfo list(ExamTaskQuestions examTaskQuestions)
- {
- startPage();
- List list = examTaskQuestionsService.selectExamTaskQuestionsList(examTaskQuestions);
- return getDataTable(list);
- }
-
- /**
- * 导出任务题目列表
- */
- @GetMapping("/export")
- public AjaxResult export(ExamTaskQuestions examTaskQuestions)
- {
- List list = examTaskQuestionsService.selectExamTaskQuestionsList(examTaskQuestions);
- ExcelUtil util = new ExcelUtil(ExamTaskQuestions.class);
- return util.exportExcel(list, "任务题目数据");
- }
-
- /**
- * 获取任务题目详细信息
- */
- @GetMapping(value = "/{examCode}")
- public AjaxResult getInfo(@PathVariable("examCode") String examCode)
- {
- return AjaxResult.success(examTaskQuestionsService.selectExamTaskQuestionsById(examCode));
- }
-
-
- @PostMapping("/batchupdate")
- public AjaxResult batchUpdate(@RequestBody List examTaskQuestionsList)
- {
- int count = -1;
-
- try
- {
- count = examTaskQuestionsService.batchUpdateExamTaskQuestions(examTaskQuestionsList);
- }
- catch(Exception e) {
- return AjaxResult.error(e.getMessage());
- }
- return AjaxResult.success("更新成功");
- }
-
- /**
- * 修改任务题目
- */
- @PostMapping("/update")
- public AjaxResult edit(@RequestBody ExamTaskQuestions examTaskQuestions)
- {
- return toAjax(examTaskQuestionsService.updateExamTaskQuestions(examTaskQuestions));
- }
-
- /**
- * 删除任务题目
- */
- @GetMapping("/delete/{examCodes}")
- public AjaxResult remove(@PathVariable String[] examCodes)
- {
- return toAjax(examTaskQuestionsService.deleteExamTaskQuestionsByIds(examCodes));
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskData.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskData.java
deleted file mode 100644
index 1fd07fc..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskData.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.hig.exam.domain;
-
-import java.util.List;
-
-import lombok.Data;
-
-@Data
-public class ExamTaskData {
- private ExamTaskManager examTaskManager;
- private List taskGroupList;
- private List taskQuestionsList;
-
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskGroup.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskGroup.java
deleted file mode 100644
index 5b41d58..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskGroup.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.hig.exam.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 任务分组对象 exam_task_group
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-public class ExamTaskGroup extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 考试代码 */
- @Excel(name = "考试代码")
- private String examCode;
-
- /** 分组代码 */
- @Excel(name = "分组代码")
- private String groupCode;
-
- /** 排序编号 */
- @Excel(name = "排序编号")
- private Long orderId;
-
- public void setExamCode(String examCode)
- {
- this.examCode = examCode;
- }
-
- public String getExamCode()
- {
- return examCode;
- }
- public void setGroupCode(String groupCode)
- {
- this.groupCode = groupCode;
- }
-
- public String getGroupCode()
- {
- return groupCode;
- }
- public void setOrderId(Long orderId)
- {
- this.orderId = orderId;
- }
-
- public Long getOrderId()
- {
- return orderId;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("examCode", getExamCode())
- .append("groupCode", getGroupCode())
- .append("orderId", getOrderId())
- .toString();
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskManager.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskManager.java
deleted file mode 100644
index 4749a89..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskManager.java
+++ /dev/null
@@ -1,270 +0,0 @@
-package com.hig.exam.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 创建考试对象 exam_task_manager
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-public class ExamTaskManager extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 考试序号 */
- @Excel(name = "考试序号")
- private Long examId;
-
- /** 考试代码 */
- @Excel(name = "考试代码")
- private String examCode;
-
- /** 考试名称 */
- @Excel(name = "考试名称")
- private String examName;
-
- /** 考试说明 */
- @Excel(name = "考试说明")
- private String examDescribe;
-
- /** 组卷方式 */
- @Excel(name = "组卷方式")
- private String buildType;
-
- /** 强制抽卷 */
- @Excel(name = "强制抽卷")
- private String forceDone;
-
- /** 考试题库 */
- @Excel(name = "考试题库")
- private String examBank;
-
- /** 考试题库文字 */
- @Excel(name = "考试题库文字")
- private String examBankText;
-
- @Excel(name = "考试类型1 固定时间考试 2固定时间段考试")
- private Integer examType;
-
- public Integer getExamType() {
- return examType;
- }
-
- public void setExamType(Integer examType) {
- this.examType = examType;
- }
-
- public Integer getExamTimes() {
- return examTimes;
- }
-
- public void setExamTimes(Integer examTimes) {
- this.examTimes = examTimes;
- }
-
- @Excel(name = "考试次数")
- private Integer examTimes;
-
- /** 图片链接 */
- @Excel(name = "图片链接")
- private String pictureUrl;
-
- /** 开始时间 */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
- private Date startTime;
-
- /** 结束时间 */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
- private Date endTime;
-
-
- /** 考试时长 */
- @Excel(name = "考试时长")
- private String examDuration;
-
- /** 状态 */
- @Excel(name = "状态")
- private Long status;
-
- private String startDateText;
-
- public String getStartDateText() {
- return startDateText;
- }
-
- public void setStartDateText(String startDateText) {
- this.startDateText = startDateText;
- }
-
-
- private String endDateText;
-
- public String getEndDateText() {
- return endDateText;
- }
-
- public void setEndDateText(String endDateText) {
- this.endDateText = endDateText;
- }
-
- /** 创建部门 */
- private Long createDept;
-
- public void setExamId(Long examId)
- {
- this.examId = examId;
- }
-
- public Long getExamId()
- {
- return examId;
- }
- public void setExamCode(String examCode)
- {
- this.examCode = examCode;
- }
-
- public String getExamCode()
- {
- return examCode;
- }
- public void setExamName(String examName)
- {
- this.examName = examName;
- }
-
- public String getExamName()
- {
- return examName;
- }
- public void setExamDescribe(String examDescribe)
- {
- this.examDescribe = examDescribe;
- }
-
- public String getExamDescribe()
- {
- return examDescribe;
- }
- public void setBuildType(String buildType)
- {
- this.buildType = buildType;
- }
-
- public String getBuildType()
- {
- return buildType;
- }
- public void setForceDone(String forceDone)
- {
- this.forceDone = forceDone;
- }
-
- public String getForceDone()
- {
- return forceDone;
- }
- public void setExamBank(String examBank)
- {
- this.examBank = examBank;
- }
-
- public String getExamBank()
- {
- return examBank;
- }
- public void setPictureUrl(String pictureUrl)
- {
- this.pictureUrl = pictureUrl;
- }
-
- public void setExamBankText(String examBankText)
- {
- this.examBankText = examBankText;
- }
-
- public String getExamBankText()
- {
- return examBankText;
- }
-
- public String getPictureUrl()
- {
- return pictureUrl;
- }
- public void setStartTime(Date startTime)
- {
- this.startTime = startTime;
- }
-
- public Date getStartTime()
- {
- return startTime;
- }
- public void setEndTime(Date endTime)
- {
- this.endTime = endTime;
- }
-
- public Date getEndTime()
- {
- return endTime;
- }
- public void setExamDuration(String examDuration)
- {
- this.examDuration = examDuration;
- }
-
- public String getExamDuration()
- {
- return examDuration;
- }
- public void setStatus(Long status)
- {
- this.status = status;
- }
-
- public Long getStatus()
- {
- return status;
- }
- public void setCreateDept(Long createDept)
- {
- this.createDept = createDept;
- }
-
- public Long getCreateDept()
- {
- return createDept;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("examId", getExamId())
- .append("examCode", getExamCode())
- .append("examName", getExamName())
- .append("examDescribe", getExamDescribe())
- .append("buildType", getBuildType())
- .append("forceDone", getForceDone())
- .append("examBank", getExamBank())
- .append("examBankText", getExamBankText())
- .append("pictureUrl", getPictureUrl())
- .append("startTime", getStartTime())
- .append("endTime", getEndTime())
- .append("examDuration", getExamDuration())
- .append("status", getStatus())
- .append("createBy", getCreateBy())
- .append("createDept", getCreateDept())
- .append("createTime", getCreateTime())
- .toString();
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskPerson.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskPerson.java
deleted file mode 100644
index 732eacd..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskPerson.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.hig.exam.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 考试人员对象 exam_task_person
- *
- * @author qnsdt
- * @date 2023-02-14
- */
-public class ExamTaskPerson extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 考试代码 */
- @Excel(name = "考试代码")
- private String examCode;
-
- /** 考试人员 */
- @Excel(name = "考试人员")
- private String userCode;
-
- /** 个人任务码 */
- private String taskCode;
-
- /** 开始时间 */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
- private Date startTime;
-
- /** 结束时间 */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
- private Date endTime;
-
- /** 状态 */
- @Excel(name = "状态")
- private Long status;
-
- public void setExamCode(String examCode)
- {
- this.examCode = examCode;
- }
-
- public String getExamCode()
- {
- return examCode;
- }
- public void setuserCode(String userCode)
- {
- this.userCode = userCode;
- }
-
- public String getuserCode()
- {
- return userCode;
- }
- public void setTaskCode(String taskCode)
- {
- this.taskCode = taskCode;
- }
-
- public String getTaskCode()
- {
- return taskCode;
- }
- public void setStartTime(Date startTime)
- {
- this.startTime = startTime;
- }
-
- public Date getStartTime()
- {
- return startTime;
- }
- public void setEndTime(Date endTime)
- {
- this.endTime = endTime;
- }
-
- public Date getEndTime()
- {
- return endTime;
- }
- public void setStatus(Long status)
- {
- this.status = status;
- }
-
- public Long getStatus()
- {
- return status;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("examCode", getExamCode())
- .append("userCode", getuserCode())
- .append("taskCode", getTaskCode())
- .append("startTime", getStartTime())
- .append("endTime", getEndTime())
- .append("status", getStatus())
- .toString();
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskPicture.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskPicture.java
deleted file mode 100644
index ba00487..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskPicture.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package com.hig.exam.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 考试任务图片管理对象 exam_task_picture
- *
- * @author qnsdt
- * @date 2023-01-18
- */
-public class ExamTaskPicture extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 图片序号 */
- private Long photoId;
-
- /** 图片代码 */
- private String photoCode;
-
- /** 文档代码 */
- @Excel(name = "文档代码")
- private String photoPath;
-
- /** 图片链接 */
- @Excel(name = "图片链接")
- private String photoUrl;
-
- /** 文件名称 */
- @Excel(name = "文件名称")
- private String fileName;
-
- /** 原始名称 */
- @Excel(name = "原始名称")
- private String originalName;
-
- private String createBy;
- public String getCreateBy() {
- return createBy;
- }
-
- public void setCreateBy(String createBy) {
- this.createBy = createBy;
- }
-
- /** 状态 */
- @Excel(name = "状态")
- private Long status;
-
- public void setPhotoId(Long photoId)
- {
- this.photoId = photoId;
- }
-
- public Long getPhotoId()
- {
- return photoId;
- }
- public void setPhotoCode(String photoCode)
- {
- this.photoCode = photoCode;
- }
-
- public String getPhotoCode()
- {
- return photoCode;
- }
- public void setPhotoPath(String photoPath)
- {
- this.photoPath = photoPath;
- }
-
- public String getPhotoPath()
- {
- return photoPath;
- }
- public void setPhotoUrl(String photoUrl)
- {
- this.photoUrl = photoUrl;
- }
-
- public String getPhotoUrl()
- {
- return photoUrl;
- }
- public void setFileName(String fileName)
- {
- this.fileName = fileName;
- }
-
- public String getFileName()
- {
- return fileName;
- }
- public void setOriginalName(String originalName)
- {
- this.originalName = originalName;
- }
-
- public String getOriginalName()
- {
- return originalName;
- }
- public void setStatus(Long status)
- {
- this.status = status;
- }
-
- public Long getStatus()
- {
- return status;
- }
-
-
-
-
- public ExamTaskPicture(String photoCode, String photoPath, String photoUrl, String fileName, String originalName,
- String createBy) {
- super();
- this.photoCode = photoCode;
- this.photoPath = photoPath;
- this.photoUrl = photoUrl;
- this.fileName = fileName;
- this.originalName = originalName;
- this.createBy = createBy;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("photoId", getPhotoId())
- .append("photoCode", getPhotoCode())
- .append("photoPath", getPhotoPath())
- .append("photoUrl", getPhotoUrl())
- .append("fileName", getFileName())
- .append("originalName", getOriginalName())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("status", getStatus())
- .toString();
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskQuestions.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskQuestions.java
deleted file mode 100644
index f98cd0d..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/domain/ExamTaskQuestions.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.hig.exam.domain;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 任务题目对象 exam_task_questions
- *
- * @author qnsdt
- * @date 2023-02-15
- */
-public class ExamTaskQuestions extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 考试代码 */
- @Excel(name = "考试代码")
- private String examCode;
-
- /** 题目代码 */
- @Excel(name = "题目代码")
- private String questionsCode;
-
- /** 题号 */
- @Excel(name = "题号")
- private int questionsNumber;
-
- public void setExamCode(String examCode)
- {
- this.examCode = examCode;
- }
-
- public String getExamCode()
- {
- return examCode;
- }
- public void setQuestionsCode(String questionsCode)
- {
- this.questionsCode = questionsCode;
- }
-
- public String getQuestionsCode()
- {
- return questionsCode;
- }
- public void setQuestionsNumber(int questionsNumber)
- {
- this.questionsNumber = questionsNumber;
- }
-
- public int getQuestionsNumber()
- {
- return questionsNumber;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("examCode", getExamCode())
- .append("questionsCode", getQuestionsCode())
- .append("questionsNumber", getQuestionsNumber())
- .toString();
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskGroupMapper.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskGroupMapper.java
deleted file mode 100644
index 58d00ae..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskGroupMapper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.hig.exam.mapper;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskGroup;
-
-/**
- * 任务分组Mapper接口
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-public interface ExamTaskGroupMapper
-{
- /**
- * 查询任务分组
- *
- * @param examCode 任务分组ID
- * @return 任务分组
- */
- public ExamTaskGroup selectExamTaskGroupById(String examCode);
-
- /**
- * 查询任务分组列表
- *
- * @param examTaskGroup 任务分组
- * @return 任务分组集合
- */
- public List selectExamTaskGroupList(ExamTaskGroup examTaskGroup);
-
- /**
- * 新增任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- */
- public int insertExamTaskGroup(ExamTaskGroup examTaskGroup);
-
- /**
- * 修改任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- */
- public int updateExamTaskGroup(ExamTaskGroup examTaskGroup);
-
- /**
- * 删除任务分组
- *
- * @param examCode 任务分组ID
- * @return 结果
- */
- public int deleteExamTaskGroupById(String examCode);
-
- /**
- * 批量删除任务分组
- *
- * @param examCodes 需要删除的数据ID
- * @return 结果
- */
- public int deleteExamTaskGroupByIds(String[] examCodes);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskManagerMapper.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskManagerMapper.java
deleted file mode 100644
index 476fbaf..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskManagerMapper.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.hig.exam.mapper;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskManager;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 创建考试Mapper接口
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-public interface ExamTaskManagerMapper
-{
- /**
- * 查询创建考试
- *
- * @param examCode 创建考试ID
- * @return 创建考试
- */
- public ExamTaskManager selectExamTaskManagerById(String examCode);
-
-
- /**
- * 查询创建考试列表
- *
- * @param examTaskManager 创建考试
- * @return 创建考试集合
- */
- public List selectExamTaskManagerList(ExamTaskManager examTaskManager);
-
- /**
- * 新增创建考试
- *
- * @param examTaskManager 创建考试
- * @return 结果
- */
- public int insertExamTaskManager(ExamTaskManager examTaskManager);
-
- /**
- * 修改创建考试
- *
- * @param examTaskManager 创建考试
- * @return 结果
- */
- public int updateExamTaskManager(ExamTaskManager examTaskManager);
-
- /**
- * 删除创建考试
- *
- * @param examCode 创建考试ID
- * @return 结果
- */
- public int deleteExamTaskManagerById(String examCode);
-
- /**
- * 批量删除创建考试
- *
- * @param examCodes 需要删除的数据ID
- * @return 结果
- */
- public int deleteExamTaskManagerByIds(String[] examCodes);
-
- public List selectCurrentExam(@Param("userCode") String userCode);
-
- public List countExamScore(@Param("examCodeList") List examCodeList);
-
- public List groupExamTypeCount(@Param("examCodeList") List examCodeList);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskPersonMapper.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskPersonMapper.java
deleted file mode 100644
index 1e15c9a..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskPersonMapper.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.hig.exam.mapper;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskPerson;
-
-/**
- * 考试人员Mapper接口
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-public interface ExamTaskPersonMapper
-{
- /**
- * 查询考试人员
- *
- * @param examCode 考试人员ID
- * @return 考试人员
- */
- public ExamTaskPerson selectExamTaskPersonById(String examCode);
-
- /**
- * 查询考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 考试人员
- */
- public ExamTaskPerson selectExamTaskPerson(ExamTaskPerson examTaskPerson);
-
- /**
- * 查询考试人员列表
- *
- * @param examTaskPerson 考试人员
- * @return 考试人员集合
- */
- public List selectExamTaskPersonList(ExamTaskPerson examTaskPerson);
-
- /**
- * 新增考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int insertExamTaskPerson(ExamTaskPerson examTaskPerson);
-
- /**
- * 批量拷贝考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int batchInsertPerson(String examCode);
-
- /**
- * 修改考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int updateExamTaskPerson(ExamTaskPerson examTaskPerson);
-
- /**
- * 更新考试开始时间
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int updateStartTime(ExamTaskPerson examTaskPerson);
-
- /**
- * 更新完成状态
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int updateDoneStatus(ExamTaskPerson examTaskPerson);
-
- /**
- * 删除考试人员
- *
- * @param examCode 考试人员ID
- * @return 结果
- */
- public int deleteExamTaskPersonById(String examCode);
-
- /**
- * 批量删除考试人员
- *
- * @param examCodes 需要删除的数据ID
- * @return 结果
- */
- public int deleteExamTaskPersonByIds(String[] examCodes);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskPictureMapper.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskPictureMapper.java
deleted file mode 100644
index 1524578..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskPictureMapper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.hig.exam.mapper;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskPicture;
-
-/**
- * 考试任务图片管理Mapper接口
- *
- * @author qnsdt
- * @date 2023-01-18
- */
-public interface ExamTaskPictureMapper
-{
- /**
- * 查询考试任务图片管理
- *
- * @param photoCode 考试任务图片管理ID
- * @return 考试任务图片管理
- */
- public ExamTaskPicture selectExamTaskPictureById(String photoCode);
-
- /**
- * 查询考试任务图片管理列表
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 考试任务图片管理集合
- */
- public List selectExamTaskPictureList(ExamTaskPicture examTaskPicture);
-
- /**
- * 新增考试任务图片管理
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 结果
- */
- public int insertExamTaskPicture(ExamTaskPicture examTaskPicture);
-
- /**
- * 修改考试任务图片管理
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 结果
- */
- public int updateExamTaskPicture(ExamTaskPicture examTaskPicture);
-
- /**
- * 删除考试任务图片管理
- *
- * @param photoCode 考试任务图片管理ID
- * @return 结果
- */
- public int deleteExamTaskPictureById(String photoCode);
-
- /**
- * 批量删除考试任务图片管理
- *
- * @param photoCodes 需要删除的数据ID
- * @return 结果
- */
- public int deleteExamTaskPictureByIds(String[] photoCodes);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskQuestionsMapper.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskQuestionsMapper.java
deleted file mode 100644
index e512df9..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/mapper/ExamTaskQuestionsMapper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.hig.exam.mapper;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskQuestions;
-
-/**
- * 任务题目Mapper接口
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-public interface ExamTaskQuestionsMapper
-{
- /**
- * 查询任务题目
- *
- * @param examCode 任务题目ID
- * @return 任务题目
- */
- public ExamTaskQuestions selectExamTaskQuestionsById(String examCode);
-
- /**
- * 查询任务题目列表
- *
- * @param examTaskQuestions 任务题目
- * @return 任务题目集合
- */
- public List selectExamTaskQuestionsList(ExamTaskQuestions examTaskQuestions);
-
- /**
- * 新增任务题目
- *
- * @param examTaskQuestions 任务题目
- * @return 结果
- */
- public int insertExamTaskQuestions(ExamTaskQuestions examTaskQuestions);
-
- /**
- * 修改任务题目
- *
- * @param examTaskQuestions 任务题目
- * @return 结果
- */
- public int updateExamTaskQuestions(ExamTaskQuestions examTaskQuestions);
-
- /**
- * 删除任务题目
- *
- * @param examCode 任务题目ID
- * @return 结果
- */
- public int deleteExamTaskQuestionsById(String examCode);
-
- /**
- * 批量删除任务题目
- *
- * @param examCodes 需要删除的数据ID
- * @return 结果
- */
- public int deleteExamTaskQuestionsByIds(String[] examCodes);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskDataService.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskDataService.java
deleted file mode 100644
index b38c22e..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskDataService.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.hig.exam.service;
-
-import com.hig.exam.domain.ExamTaskData;
-
-public interface IExamTaskDataService {
- public int saveData(ExamTaskData examTaskData) throws Exception;
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskGroupService.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskGroupService.java
deleted file mode 100644
index d2b4fc3..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskGroupService.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.hig.exam.service;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskGroup;
-
-/**
- * 任务分组Service接口
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-public interface IExamTaskGroupService
-{
- /**
- * 查询任务分组
- *
- * @param examCode 任务分组ID
- * @return 任务分组
- */
- public ExamTaskGroup selectExamTaskGroupById(String examCode);
-
- /**
- * 查询任务分组列表
- *
- * @param examTaskGroup 任务分组
- * @return 任务分组集合
- */
- public List selectExamTaskGroupList(ExamTaskGroup examTaskGroup);
-
- /**
- * 新增任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- */
- public int insertExamTaskGroup(ExamTaskGroup examTaskGroup);
-
- /**
- * 修改任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- */
- public int updateExamTaskGroup(ExamTaskGroup examTaskGroup);
-
- /**
- * 修改任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- * @throws Exception
- */
- public int batchUpdateExamTaskGroup(List examTaskGroupList) throws Exception;
-
- /**
- * 批量删除任务分组
- *
- * @param examCodes 需要删除的任务分组ID
- * @return 结果
- */
- public int deleteExamTaskGroupByIds(String[] examCodes);
-
- /**
- * 删除任务分组信息
- *
- * @param examCode 任务分组ID
- * @return 结果
- */
- public int deleteExamTaskGroupById(String examCode);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskManagerService.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskManagerService.java
deleted file mode 100644
index bda4e0f..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskManagerService.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.hig.exam.service;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskManager;
-import com.hig.onlineexam.domain.dto.ExamTitleData;
-
-/**
- * 创建考试Service接口
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-public interface IExamTaskManagerService
-{
- /**
- * 查询创建考试
- *
- * @param examCode 创建考试ID
- * @return 创建考试
- */
- public ExamTaskManager selectExamTaskManagerById(String examCode);
-
- /**
- * 查询创建考试列表
- *
- * @param examTaskManager 创建考试
- * @return 创建考试集合
- */
- public List selectExamTaskManagerList(ExamTaskManager examTaskManager);
-
- /**
- * 新增创建考试
- *
- * @param examTaskManager 创建考试
- * @return 结果
- */
- public int insertExamTaskManager(ExamTaskManager examTaskManager);
-
- /**
- * 修改创建考试
- *
- * @param examTaskManager 创建考试
- * @return 结果
- */
- public int updateExamTaskManager(ExamTaskManager examTaskManager);
-
- /**
- * 批量删除创建考试
- *
- * @param examCodes 需要删除的创建考试ID
- * @return 结果
- */
- public int deleteExamTaskManagerByIds(String[] examCodes);
-
- /**
- * 删除创建考试信息
- *
- * @param examCode 创建考试ID
- * @return 结果
- */
- public int deleteExamTaskManagerById(String examCode);
-
- /**
- * 获取当前用户可以参加的考试
- * @param userCode
- * @return
- */
- public List selectCurrentExam(String userCode);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskPersonService.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskPersonService.java
deleted file mode 100644
index 8ca9ce6..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskPersonService.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.hig.exam.service;
-
-import java.util.List;
-
-import com.hig.exam.domain.ExamTaskManager;
-import com.hig.exam.domain.ExamTaskPerson;
-
-/**
- * 考试人员Service接口
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-public interface IExamTaskPersonService
-{
- /**
- * 查询考试人员
- *
- * @param examCode 考试人员ID
- * @return 考试人员
- */
- public ExamTaskPerson selectExamTaskPersonById(String examCode);
-
- /**
- * 查询考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 考试人员
- */
- public ExamTaskPerson selectExamTaskPerson(ExamTaskPerson examTaskPerson);
-
- /**
- * 查询考试人员列表
- *
- * @param examTaskPerson 考试人员
- * @return 考试人员集合
- */
- public List selectExamTaskPersonList(ExamTaskPerson examTaskPerson);
-
- /**
- * 新增考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int insertExamTaskPerson(ExamTaskPerson examTaskPerson);
-
- /**
- * 批量拷贝考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int batchInsertPerson(String examCode);
-
- /**
- * 修改考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int updateExamTaskPerson(ExamTaskPerson examTaskPerson);
-
-
- /**
- * 更新考试开始时间
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int updateStartTime(ExamTaskPerson examTaskPerson);
-
- /**
- * 更新完成状态
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- public int updateDoneStatus(ExamTaskPerson examTaskPerson);
-
-
- /**
- * 批量删除考试人员
- *
- * @param examCodes 需要删除的考试人员ID
- * @return 结果
- */
- public int deleteExamTaskPersonByIds(String[] examCodes);
-
- /**
- * 删除考试人员信息
- *
- * @param examCode 考试人员ID
- * @return 结果
- */
- public int deleteExamTaskPersonById(String examCode);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskPictureService.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskPictureService.java
deleted file mode 100644
index 7b34bbf..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskPictureService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.hig.exam.service;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskPicture;
-
-/**
- * 考试任务图片管理Service接口
- *
- * @author qnsdt
- * @date 2023-01-18
- */
-public interface IExamTaskPictureService
-{
- /**
- * 查询考试任务图片管理
- *
- * @param photoCode 考试任务图片管理ID
- * @return 考试任务图片管理
- */
- public ExamTaskPicture selectExamTaskPictureById(String photoCode);
-
- /**
- * 查询考试任务图片管理列表
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 考试任务图片管理集合
- */
- public List selectExamTaskPictureList(ExamTaskPicture examTaskPicture);
-
- /**
- * 新增考试任务图片管理
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 结果
- */
- public int insertExamTaskPicture(ExamTaskPicture examTaskPicture);
-
- /**
- * 修改考试任务图片管理
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 结果
- */
- public int updateExamTaskPicture(ExamTaskPicture examTaskPicture);
-
- /**
- * 批量删除考试任务图片管理
- *
- * @param photoCodes 需要删除的考试任务图片管理ID
- * @return 结果
- */
- public int deleteExamTaskPictureByIds(String[] photoCodes);
-
- /**
- * 删除考试任务图片管理信息
- *
- * @param photoCode 考试任务图片管理ID
- * @return 结果
- */
- public int deleteExamTaskPictureById(String photoCode);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskQuestionsService.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskQuestionsService.java
deleted file mode 100644
index 9a78fcc..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/IExamTaskQuestionsService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.hig.exam.service;
-
-import java.util.List;
-import com.hig.exam.domain.ExamTaskQuestions;
-
-/**
- * 任务题目Service接口
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-public interface IExamTaskQuestionsService
-{
- /**
- * 查询任务题目
- *
- * @param examCode 任务题目ID
- * @return 任务题目
- */
- public ExamTaskQuestions selectExamTaskQuestionsById(String examCode);
-
- /**
- * 查询任务题目列表
- *
- * @param examTaskQuestions 任务题目
- * @return 任务题目集合
- */
- public List selectExamTaskQuestionsList(ExamTaskQuestions examTaskQuestions);
-
- /**
- * 新增任务题目
- *
- * @param examTaskQuestions 任务题目
- * @return 结果
- */
- public int insertExamTaskQuestions(ExamTaskQuestions examTaskQuestions);
-
- public int batchUpdateExamTaskQuestions(List examTaskQuestionsList) throws Exception;
-
- /**
- * 修改任务题目
- *
- * @param examTaskQuestions 任务题目
- * @return 结果
- */
- public int updateExamTaskQuestions(ExamTaskQuestions examTaskQuestions);
-
- /**
- * 批量删除任务题目
- *
- * @param examCodes 需要删除的任务题目ID
- * @return 结果
- */
- public int deleteExamTaskQuestionsByIds(String[] examCodes);
-
- /**
- * 删除任务题目信息
- *
- * @param examCode 任务题目ID
- * @return 结果
- */
- public int deleteExamTaskQuestionsById(String examCode);
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskDataServiceImpl.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskDataServiceImpl.java
deleted file mode 100644
index 125c9ff..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskDataServiceImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.hig.exam.service.impl;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import com.hig.exam.domain.ExamTaskData;
-import com.hig.exam.domain.ExamTaskGroup;
-import com.hig.exam.domain.ExamTaskManager;
-import com.hig.exam.domain.ExamTaskQuestions;
-import com.hig.exam.service.IExamTaskDataService;
-import com.hig.exam.service.IExamTaskGroupService;
-import com.hig.exam.service.IExamTaskManagerService;
-import com.hig.exam.service.IExamTaskPersonService;
-import com.hig.exam.service.IExamTaskQuestionsService;
-
-@Service
-public class ExamTaskDataServiceImpl implements IExamTaskDataService {
- @Autowired
- private IExamTaskGroupService examTaskGroupService;
-
- @Autowired
- private IExamTaskManagerService examTaskManagerService;
-
- @Autowired
- private IExamTaskQuestionsService examTaskQuestionsService;
-
- @Autowired
- private IExamTaskPersonService examTaskPersonService;
-
-
- @Override
- public int saveData(ExamTaskData examTaskData) throws Exception {
- // TODO Auto-generated method stub
- ExamTaskManager examTaskManager = examTaskData.getExamTaskManager();
-
- int count = 0;
- try
- {
- // 安全删除
- examTaskManagerService.deleteExamTaskManagerById(examTaskManager.getExamCode());
-
- // 保存数据
- count = examTaskManagerService.insertExamTaskManager(examTaskManager);
- }
- catch(Exception e) {
- throw new Exception("保存属性出错,信息:" + e.getMessage());
- }
-
- List questionsList = examTaskData.getTaskQuestionsList();
-
- // 安全删除
- examTaskQuestionsService.deleteExamTaskQuestionsById(examTaskManager.getExamCode());
-
- for(ExamTaskQuestions examTaskQuestions: questionsList) {
- try
- {
- count = examTaskQuestionsService.insertExamTaskQuestions(examTaskQuestions);
- }
- catch(Exception e) {
- throw new Exception("保存题目信息出错,信息:" + e.getMessage());
- }
- }
-
- List groupList = examTaskData.getTaskGroupList();
-
- // 安全删除
- examTaskGroupService.deleteExamTaskGroupById(examTaskManager.getExamCode());
-
- for (ExamTaskGroup examTaskGroup: groupList) {
- try
- {
- count = examTaskGroupService.insertExamTaskGroup(examTaskGroup);
- }
- catch(Exception e) {
- throw new Exception("保存分组信息出错,信息:" + e.getMessage());
- }
- }
-
- // 安全删除
- examTaskPersonService.deleteExamTaskPersonById(examTaskManager.getExamCode());
-
- try
- {
- count = examTaskPersonService.batchInsertPerson(examTaskManager.getExamCode());
- }
- catch(Exception e) {
- throw new Exception("保存考试人员信息出错,信息:" + e.getMessage());
- }
-
- return 1;
- }
-
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskGroupServiceImpl.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskGroupServiceImpl.java
deleted file mode 100644
index 1b2c470..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskGroupServiceImpl.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package com.hig.exam.service.impl;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.hig.exam.mapper.ExamTaskGroupMapper;
-import com.hig.exam.domain.ExamTaskGroup;
-import com.hig.exam.service.IExamTaskGroupService;
-import com.hig.exam.service.IExamTaskPersonService;
-
-/**
- * 任务分组Service业务层处理
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-@Service
-public class ExamTaskGroupServiceImpl implements IExamTaskGroupService
-{
- @Autowired
- private ExamTaskGroupMapper examTaskGroupMapper;
-
- @Autowired
- private IExamTaskPersonService examTaskPersonService;
- /**
- * 查询任务分组
- *
- * @param examCode 任务分组ID
- * @return 任务分组
- */
- @Override
- public ExamTaskGroup selectExamTaskGroupById(String examCode)
- {
- return examTaskGroupMapper.selectExamTaskGroupById(examCode);
- }
-
- /**
- * 查询任务分组列表
- *
- * @param examTaskGroup 任务分组
- * @return 任务分组
- */
- @Override
- public List selectExamTaskGroupList(ExamTaskGroup examTaskGroup)
- {
- return examTaskGroupMapper.selectExamTaskGroupList(examTaskGroup);
- }
-
- /**
- * 新增任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- */
- @Override
- public int insertExamTaskGroup(ExamTaskGroup examTaskGroup)
- {
- return examTaskGroupMapper.insertExamTaskGroup(examTaskGroup);
- }
-
- /**
- * 修改任务分组
- *
- * @param examTaskGroup 任务分组
- * @return 结果
- */
- @Override
- public int updateExamTaskGroup(ExamTaskGroup examTaskGroup)
- {
- return examTaskGroupMapper.updateExamTaskGroup(examTaskGroup);
- }
-
- /**
- * 批量删除任务分组
- *
- * @param examCodes 需要删除的任务分组ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskGroupByIds(String[] examCodes)
- {
- return examTaskGroupMapper.deleteExamTaskGroupByIds(examCodes);
- }
-
- /**
- * 删除任务分组信息
- *
- * @param examCode 任务分组ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskGroupById(String examCode)
- {
- return examTaskGroupMapper.deleteExamTaskGroupById(examCode);
- }
-
- @Override
- public int batchUpdateExamTaskGroup(List examTaskGroupList) throws Exception {
- // TODO Auto-generated method stub
- // 安全删除
- int count = 0;
- String examCode = examTaskGroupList.get(0).getExamCode();
- examTaskGroupMapper.deleteExamTaskGroupById(examCode);
-
- for (ExamTaskGroup examTaskGroup: examTaskGroupList) {
- try
- {
- count = examTaskGroupMapper.insertExamTaskGroup(examTaskGroup);
- }
- catch(Exception e) {
- throw new Exception("保存分组信息出错,信息:" + e.getMessage());
- }
- }
-
- // 安全删除
- examTaskPersonService.deleteExamTaskPersonById(examCode);
-
- try
- {
- count = examTaskPersonService.batchInsertPerson(examCode);
- }
- catch(Exception e) {
- throw new Exception("保存考试人员信息出错,信息:" + e.getMessage());
- }
- return 1;
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskManagerServiceImpl.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskManagerServiceImpl.java
deleted file mode 100644
index 4421563..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskManagerServiceImpl.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package com.hig.exam.service.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import cn.hutool.core.date.DateField;
-import cn.hutool.core.date.DateTime;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.bean.BeanUtil;
-import com.hig.onlineexam.domain.dto.ExamTitleData;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.hig.exam.mapper.ExamTaskManagerMapper;
-import com.hig.exam.domain.ExamTaskManager;
-import com.hig.exam.service.IExamTaskGroupService;
-import com.hig.exam.service.IExamTaskManagerService;
-import com.hig.exam.service.IExamTaskPersonService;
-import com.hig.exam.service.IExamTaskQuestionsService;
-
-/**
- * 创建考试Service业务层处理
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-@Service
-public class ExamTaskManagerServiceImpl implements IExamTaskManagerService
-{
- @Autowired
- private ExamTaskManagerMapper examTaskManagerMapper;
-
- @Autowired
- private IExamTaskGroupService examTaskGroupService;
-
- @Autowired
- private IExamTaskQuestionsService examTaskQuestionsService;
-
- @Autowired
- private IExamTaskPersonService examTaskPersonService;
-
- /**
- * 查询创建考试
- *
- * @param examCode 创建考试ID
- * @return 创建考试
- */
- @Override
- public ExamTaskManager selectExamTaskManagerById(String examCode)
- {
- return examTaskManagerMapper.selectExamTaskManagerById(examCode);
- }
-
- /**
- * 查询创建考试列表
- *
- * @param examTaskManager 创建考试
- * @return 创建考试
- */
- @Override
- public List selectExamTaskManagerList(ExamTaskManager examTaskManager)
- {
- return examTaskManagerMapper.selectExamTaskManagerList(examTaskManager);
- }
-
- /**
- * 新增创建考试
- *
- * @param examTaskManager 创建考试
- * @return 结果
- */
- @Override
- public int insertExamTaskManager(ExamTaskManager examTaskManager)
- {
- examTaskManager.setCreateTime(DateUtils.getNowDate());
- return examTaskManagerMapper.insertExamTaskManager(examTaskManager);
- }
-
- /**
- * 修改创建考试
- *
- * @param examTaskManager 创建考试
- * @return 结果
- */
- @Override
- public int updateExamTaskManager(ExamTaskManager examTaskManager)
- {
- return examTaskManagerMapper.updateExamTaskManager(examTaskManager);
- }
-
- /**
- * 批量删除创建考试
- *
- * @param examCodes 需要删除的创建考试ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskManagerByIds(String[] examCodes)
- {
- // 删除题目
- examTaskQuestionsService.deleteExamTaskQuestionsByIds(examCodes);
- // 删除人员分组
- examTaskGroupService.deleteExamTaskGroupByIds(examCodes);
- // 删除人员
- examTaskPersonService.deleteExamTaskPersonByIds(examCodes);
-
- return examTaskManagerMapper.deleteExamTaskManagerByIds(examCodes);
- }
-
- /**
- * 删除创建考试信息
- *
- * @param examCode 创建考试ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskManagerById(String examCode)
- {
- return examTaskManagerMapper.deleteExamTaskManagerById(examCode);
- }
-
- /**
- * 获取当前用户可以参加的考试
- * @param userCode
- * @return
- */
- @Override
- public List selectCurrentExam(String userCode) {
- //先根据当前时间和startDate和endDate过滤一下
- List list=examTaskManagerMapper.selectCurrentExam(userCode);
- List retList=new ArrayList<>();
- List examCodeList=new ArrayList<>();
- for(ExamTaskManager examTaskManager:list){
- if(examTaskManager.getExamType()==1){
- if(!checkCanRun(examTaskManager)){
- continue;
- }
- }else{
-
- }
- ExamTitleData ed=new ExamTitleData();
- examCodeList.add(examTaskManager.getExamCode());
- // 使用 Hutool 的 BeanUtil.copyProperties 方法复制属性
- BeanUtil.copyProperties(examTaskManager, ed);
- retList.add(ed);
- }
- List listScore=examTaskManagerMapper.countExamScore(examCodeList);
- List listTypeCount=examTaskManagerMapper.groupExamTypeCount(examCodeList);
- for(ExamTitleData item :retList){
- List tmp= listScore.stream().filter(d->d.getExamCode().equals(item.getExamCode())).collect(Collectors.toList());
- if(tmp.size()>0){
- item.setQuestionsScore(tmp.get(0).getExamType());
- }
- tmp=listTypeCount.stream().filter(d->d.getExamCode().equals(item.getExamCode()) && d.getExamId()==1).collect(Collectors.toList());
- if(tmp.size()>0){
- item.setJudgeNumber(tmp.get(0).getExamType());
- }
- tmp=listTypeCount.stream().filter(d->d.getExamCode().equals(item.getExamCode()) && d.getExamId()==2).collect(Collectors.toList());
- if(tmp.size()>0){
- item.setRadioNumber(tmp.get(0).getExamType());
- }
- tmp=listTypeCount.stream().filter(d->d.getExamCode().equals(item.getExamCode()) && d.getExamId()==3).collect(Collectors.toList());
- if(tmp.size()>0){
- item.setChoiceNumber(tmp.get(0).getExamType());
- }
- }
- return retList;
- }
-
- private boolean checkCanRun(ExamTaskManager examTaskManager) {
- //开始时间+考试时长 小于当前时间表示考试已发结束,大于表示还可能继续考试
- DateTime dtStart=new DateTime( examTaskManager.getStartTime());
- String sp=examTaskManager.getExamDuration();
- String[] timeParts = sp.split(":");
- int hours = Integer.parseInt(timeParts[0]);
- int minutes = Integer.parseInt(timeParts[1]);
- // 计算结束时间
- DateTime endDateTime = dtStart.offset(DateField.HOUR_OF_DAY, hours)
- .offset(DateField.MINUTE, minutes);
- return endDateTime.isAfter(DateUtils.getNowDate());
-
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskPersonServiceImpl.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskPersonServiceImpl.java
deleted file mode 100644
index 9e20984..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskPersonServiceImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package com.hig.exam.service.impl;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.hig.exam.mapper.ExamTaskPersonMapper;
-import com.hig.exam.domain.ExamTaskManager;
-import com.hig.exam.domain.ExamTaskPerson;
-import com.hig.exam.service.IExamTaskPersonService;
-
-/**
- * 考试人员Service业务层处理
- *
- * @author qnsdt
- * @date 2023-01-06
- */
-@Service
-public class ExamTaskPersonServiceImpl implements IExamTaskPersonService
-{
- @Autowired
- private ExamTaskPersonMapper examTaskPersonMapper;
-
- /**
- * 查询考试人员
- *
- * @param examCode 考试人员ID
- * @return 考试人员
- */
- @Override
- public ExamTaskPerson selectExamTaskPersonById(String examCode)
- {
- return examTaskPersonMapper.selectExamTaskPersonById(examCode);
- }
-
- /**
- * 查询考试人员列表
- *
- * @param examTaskPerson 考试人员
- * @return 考试人员
- */
- @Override
- public List selectExamTaskPersonList(ExamTaskPerson examTaskPerson)
- {
- return examTaskPersonMapper.selectExamTaskPersonList(examTaskPerson);
- }
-
- /**
- * 新增考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- @Override
- public int insertExamTaskPerson(ExamTaskPerson examTaskPerson)
- {
- return examTaskPersonMapper.insertExamTaskPerson(examTaskPerson);
- }
-
- /**
- * 修改考试人员
- *
- * @param examTaskPerson 考试人员
- * @return 结果
- */
- @Override
- public int updateExamTaskPerson(ExamTaskPerson examTaskPerson)
- {
- return examTaskPersonMapper.updateExamTaskPerson(examTaskPerson);
- }
-
- /**
- * 批量删除考试人员
- *
- * @param examCodes 需要删除的考试人员ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskPersonByIds(String[] examCodes)
- {
- return examTaskPersonMapper.deleteExamTaskPersonByIds(examCodes);
- }
-
- /**
- * 删除考试人员信息
- *
- * @param examCode 考试人员ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskPersonById(String examCode)
- {
- return examTaskPersonMapper.deleteExamTaskPersonById(examCode);
- }
-
- @Override
- public int batchInsertPerson(String examCode) {
- // TODO Auto-generated method stub
- return examTaskPersonMapper.batchInsertPerson(examCode);
- }
-
- @Override
- public int updateStartTime(ExamTaskPerson examTaskPerson) {
- // TODO Auto-generated method stub
- ExamTaskPerson taskPerson = examTaskPersonMapper.selectExamTaskPerson(examTaskPerson);
-
- if (taskPerson != null && taskPerson.getStartTime() == null) {
- examTaskPersonMapper.updateStartTime(examTaskPerson);
- }
- return 1;
- }
-
- @Override
- public ExamTaskPerson selectExamTaskPerson(ExamTaskPerson examTaskPerson) {
- // TODO Auto-generated method stub
- return examTaskPersonMapper.selectExamTaskPerson(examTaskPerson);
- }
-
- @Override
- public int updateDoneStatus(ExamTaskPerson examTaskPerson) {
- // TODO Auto-generated method stub
- return examTaskPersonMapper.updateDoneStatus(examTaskPerson);
- }
-
-
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskPictureServiceImpl.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskPictureServiceImpl.java
deleted file mode 100644
index dd08981..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskPictureServiceImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.hig.exam.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.hig.exam.mapper.ExamTaskPictureMapper;
-import com.hig.exam.domain.ExamTaskPicture;
-import com.hig.exam.service.IExamTaskPictureService;
-
-/**
- * 考试任务图片管理Service业务层处理
- *
- * @author qnsdt
- * @date 2023-01-18
- */
-@Service
-public class ExamTaskPictureServiceImpl implements IExamTaskPictureService
-{
- @Autowired
- private ExamTaskPictureMapper examTaskPictureMapper;
-
- /**
- * 查询考试任务图片管理
- *
- * @param photoCode 考试任务图片管理ID
- * @return 考试任务图片管理
- */
- @Override
- public ExamTaskPicture selectExamTaskPictureById(String photoCode)
- {
- return examTaskPictureMapper.selectExamTaskPictureById(photoCode);
- }
-
- /**
- * 查询考试任务图片管理列表
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 考试任务图片管理
- */
- @Override
- public List selectExamTaskPictureList(ExamTaskPicture examTaskPicture)
- {
- return examTaskPictureMapper.selectExamTaskPictureList(examTaskPicture);
- }
-
- /**
- * 新增考试任务图片管理
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 结果
- */
- @Override
- public int insertExamTaskPicture(ExamTaskPicture examTaskPicture)
- {
- examTaskPicture.setCreateTime(DateUtils.getNowDate());
- return examTaskPictureMapper.insertExamTaskPicture(examTaskPicture);
- }
-
- /**
- * 修改考试任务图片管理
- *
- * @param examTaskPicture 考试任务图片管理
- * @return 结果
- */
- @Override
- public int updateExamTaskPicture(ExamTaskPicture examTaskPicture)
- {
- return examTaskPictureMapper.updateExamTaskPicture(examTaskPicture);
- }
-
- /**
- * 批量删除考试任务图片管理
- *
- * @param photoCodes 需要删除的考试任务图片管理ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskPictureByIds(String[] photoCodes)
- {
- return examTaskPictureMapper.deleteExamTaskPictureByIds(photoCodes);
- }
-
- /**
- * 删除考试任务图片管理信息
- *
- * @param photoCode 考试任务图片管理ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskPictureById(String photoCode)
- {
- return examTaskPictureMapper.deleteExamTaskPictureById(photoCode);
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskQuestionsServiceImpl.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskQuestionsServiceImpl.java
deleted file mode 100644
index e60ee30..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/exam/service/impl/ExamTaskQuestionsServiceImpl.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package com.hig.exam.service.impl;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.hig.exam.mapper.ExamTaskQuestionsMapper;
-import com.hig.exam.domain.ExamTaskQuestions;
-import com.hig.exam.service.IExamTaskQuestionsService;
-
-/**
- * 任务题目Service业务层处理
- *
- * @author qnsdt
- * @date 2023-02-10
- */
-@Service
-public class ExamTaskQuestionsServiceImpl implements IExamTaskQuestionsService
-{
- @Autowired
- private ExamTaskQuestionsMapper examTaskQuestionsMapper;
-
- /**
- * 查询任务题目
- *
- * @param examCode 任务题目ID
- * @return 任务题目
- */
- @Override
- public ExamTaskQuestions selectExamTaskQuestionsById(String examCode)
- {
- return examTaskQuestionsMapper.selectExamTaskQuestionsById(examCode);
- }
-
- /**
- * 查询任务题目列表
- *
- * @param examTaskQuestions 任务题目
- * @return 任务题目
- */
- @Override
- public List selectExamTaskQuestionsList(ExamTaskQuestions examTaskQuestions)
- {
- return examTaskQuestionsMapper.selectExamTaskQuestionsList(examTaskQuestions);
- }
-
- /**
- * 新增任务题目
- *
- * @param examTaskQuestions 任务题目
- * @return 结果
- */
- @Override
- public int insertExamTaskQuestions(ExamTaskQuestions examTaskQuestions)
- {
- return examTaskQuestionsMapper.insertExamTaskQuestions(examTaskQuestions);
- }
-
- /**
- * 修改任务题目
- *
- * @param examTaskQuestions 任务题目
- * @return 结果
- */
- @Override
- public int updateExamTaskQuestions(ExamTaskQuestions examTaskQuestions)
- {
- return examTaskQuestionsMapper.updateExamTaskQuestions(examTaskQuestions);
- }
-
- /**
- * 批量删除任务题目
- *
- * @param examCodes 需要删除的任务题目ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskQuestionsByIds(String[] examCodes)
- {
- return examTaskQuestionsMapper.deleteExamTaskQuestionsByIds(examCodes);
- }
-
- /**
- * 删除任务题目信息
- *
- * @param examCode 任务题目ID
- * @return 结果
- */
- @Override
- public int deleteExamTaskQuestionsById(String examCode)
- {
- return examTaskQuestionsMapper.deleteExamTaskQuestionsById(examCode);
- }
-
- @Override
- public int batchUpdateExamTaskQuestions(List examTaskQuestionsList) throws Exception {
- // TODO Auto-generated method stub
- // 安全删除
-
- examTaskQuestionsMapper.deleteExamTaskQuestionsById(examTaskQuestionsList.get(0).getExamCode());
-
- for(ExamTaskQuestions examTaskQuestions: examTaskQuestionsList) {
- try
- {
- examTaskQuestionsMapper.insertExamTaskQuestions(examTaskQuestions);
- }
- catch(Exception e) {
- throw new Exception("保存题目信息出错,信息:" + e.getMessage());
- }
-
- }
- return 1;
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/common/NotSameFileExpection.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/common/NotSameFileExpection.java
deleted file mode 100644
index deae362..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/common/NotSameFileExpection.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.hig.fms.common;
-
-public class NotSameFileExpection extends Exception {
- public NotSameFileExpection() {
- super("File MD5 Different");
- }
-}
\ No newline at end of file
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/controller/FmsFilesController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/controller/FmsFilesController.java
deleted file mode 100644
index 4336c86..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/controller/FmsFilesController.java
+++ /dev/null
@@ -1,196 +0,0 @@
-package com.hig.fms.controller;
-
-import java.io.File;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.cms.utils.FileUpload;
-import com.hig.fms.common.NotSameFileExpection;
-import com.hig.fms.domain.FmsFiles;
-import com.hig.fms.domain.MultipartFileParam;
-import com.hig.fms.domain.dto.StdOut;
-import com.hig.fms.service.ChunkService;
-import com.hig.fms.service.IFmsFilesService;
-import com.hig.utils.DateUtils;
-import com.hig.utils.UUIDGenerator;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 文件管理Controller
- *
- * @author qnsdt
- * @date 2021-12-17
- */
-@RestController
-@RequestMapping("/fms/files")
-public class FmsFilesController extends BaseController
-{
- @Autowired
- private IFmsFilesService fmsFilesService;
-
- @Autowired
- ChunkService chunkService;
-
- @Value("${cms.files.photo-path}")
- private String filespath;
-
- /**
- * 查询文件管理列表
- */
- @PreAuthorize("@ss.hasPermi('fms:files:list')")
- @GetMapping("/list")
- public TableDataInfo list(FmsFiles fmsFiles)
- {
- startPage();
- List list = fmsFilesService.selectFmsFilesList(fmsFiles);
- // System.out.println("文件列表:" + list.toString());
- return getDataTable(list);
- }
-
- /**
- * 导出文件管理列表
- */
- @PreAuthorize("@ss.hasPermi('fms:files:export')")
- @Log(title = "文件管理", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(FmsFiles fmsFiles)
- {
- List list = fmsFilesService.selectFmsFilesList(fmsFiles);
- ExcelUtil util = new ExcelUtil(FmsFiles.class);
- return util.exportExcel(list, "文件管理数据");
- }
-
- /**
- * 获取文件管理详细信息
- */
- @PreAuthorize("@ss.hasPermi('fms:files:query')")
- @GetMapping(value = "/{fileId}")
- public AjaxResult getInfo(@PathVariable("fileId") Long fileId)
- {
- return AjaxResult.success(fmsFilesService.selectFmsFilesById(fileId));
- }
-
- /**
- * 新增文件管理
- */
- @PreAuthorize("@ss.hasPermi('fms:files:add')")
- @Log(title = "文件管理", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody FmsFiles fmsFiles)
- {
- return toAjax(fmsFilesService.insertFmsFiles(fmsFiles));
- }
-
- @RequestMapping("/chunkupload/{guid}/{username}")
- // @PostMapping(value = "/chunkupload")
- public StdOut chunkUpload(@PathVariable String guid,@PathVariable String username,MultipartFileParam param, HttpServletRequest request, HttpServletResponse response) {
- StdOut out = new StdOut();
-
- // 在此更换路径
- // File file = new File("D:\\chunk_test");//存储路径
- // 拼接路径
- String fileurl = filespath + "/" + DateUtils.toDateString() + "/" + guid ;
- // System.out.println("拼接地址为:" + fileurl);
- String filepath = RuoYiConfig.getProfile() + fileurl;
- // System.out.println("拼接路径为:" + filepath);
- File file = new File(filepath);//存储路径
-
-
- String path = file.getAbsolutePath();
- response.setContentType("text/html;charset=UTF-8");
-
- try {
- //判断前端Form表单格式是否支持文件上传
- boolean isMultipart = ServletFileUpload.isMultipartContent(request);
- if (!isMultipart) {
- out.setCode(StdOut.PARAMETER_NULL);
- out.setMessage("表单格式错误");
- return out;
- } else {
- param.setTaskId(param.getIdentifier());
- out.setModel(chunkService.chunkUploadByMappedByteBuffer(param, path));
- // System.out.println("保存后:" + out.toString());
- if (out.getModel() != null) {
- // System.out.println("文件名:" + out.getModel().toString());
- // 保存文件信息
- // 取得文件名
- String filename = out.getModel().toString();
- // 取文件类型
- String suffix = getSuffix(filename);
-
- // 开始保存
- // String fileTitle, String fileDescribe, String fileName, String filePath, String fileUrl,
- // String fileSuffix, String originalName, String uploadName
- FmsFiles fmsFiles = new FmsFiles(null, null, filename, filepath, fileurl, suffix, filename, username);
- System.out.println(fmsFiles.toString());
- int count = fmsFilesService.insertFmsFiles(fmsFiles);
-
- }
- return out;
- }
- } catch (NotSameFileExpection e) {
- out.setCode(StdOut.FAIL);
- out.setMessage("MD5校验失败");
- return out;
- } catch (Exception e) {
- out.setCode(StdOut.FAIL);
- out.setMessage("上传失败");
- return out;
- }
- }
-
- private String getSuffix(String filename) {
- String suffix = null;
- try
- {
- suffix = filename.substring(filename.lastIndexOf(".") + 1);
- }
- catch(Exception e) {
-
- }
-
- return suffix;
- }
- /**
- * 修改文件管理
- */
- @PreAuthorize("@ss.hasPermi('fms:files:edit')")
- @Log(title = "文件管理", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody FmsFiles fmsFiles)
- {
- System.out.println("fmsFiles:" + fmsFiles.toString());
- return toAjax(fmsFilesService.updateFmsFiles(fmsFiles));
- }
-
- /**
- * 删除文件管理
- */
- @PreAuthorize("@ss.hasPermi('fms:files:remove')")
- @Log(title = "文件管理", businessType = BusinessType.DELETE)
- @DeleteMapping("/{fileIds}")
- public AjaxResult remove(@PathVariable Long[] fileIds)
- {
- return toAjax(fmsFilesService.deleteFmsFilesByIds(fileIds));
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/controller/FmsPhotoController.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/controller/FmsPhotoController.java
deleted file mode 100644
index 12de578..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/controller/FmsPhotoController.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package com.hig.fms.controller;
-
-import java.util.Date;
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.core.domain.model.LoginUser;
-import com.ruoyi.common.enums.BusinessType;
-import com.hig.cms.utils.FileUpload;
-import com.hig.fms.domain.FmsPhoto;
-import com.hig.fms.service.IFmsPhotoService;
-import com.hig.utils.DateUtils;
-import com.ruoyi.common.utils.ServletUtils;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.framework.web.service.TokenService;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 图片管理Controller
- *
- * @author qnsdt
- * @date 2021-12-14
- */
-@RestController
-@RequestMapping("/fms/photo")
-public class FmsPhotoController extends BaseController
-{
- @Autowired
- private IFmsPhotoService fmsPhotoService;
-
- @Value("${cms.fms.photo-path}")
- private String fmspath;
-
- private TokenService tokenService;
-
- /**
- * 查询图片管理列表
- */
- @PreAuthorize("@ss.hasPermi('fms:photo:list')")
- @GetMapping("/list")
- public TableDataInfo list(FmsPhoto fmsPhoto)
- {
- startPage();
- List list = fmsPhotoService.selectFmsPhotoList(fmsPhoto);
- return getDataTable(list);
- }
-
- /**
- * 导出图片管理列表
- */
- @PreAuthorize("@ss.hasPermi('fms:photo:export')")
- @Log(title = "图片管理", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(FmsPhoto fmsPhoto)
- {
- List list = fmsPhotoService.selectFmsPhotoList(fmsPhoto);
- ExcelUtil util = new ExcelUtil(FmsPhoto.class);
- return util.exportExcel(list, "图片管理数据");
- }
-
- /**
- * 获取图片管理详细信息
- */
- @PreAuthorize("@ss.hasPermi('fms:photo:query')")
- @GetMapping(value = "/{photoId}")
- public AjaxResult getInfo(@PathVariable("photoId") Long photoId)
- {
- return AjaxResult.success(fmsPhotoService.selectFmsPhotoById(photoId));
- }
-
- /**
- * 新增图片管理
- */
- // @PreAuthorize("@ss.hasPermi('fms:photo:add')")
- // @Log(title = "图片管理", businessType = BusinessType.INSERT)
- @PostMapping(value = "/add/{username}")
- public AjaxResult add(@PathVariable String username,@RequestParam("file") MultipartFile file)
- {
- if (username == null || username.trim().equals("")) {
- return AjaxResult.error("用户名不能为空");
- }
- System.out.println("当前日期:" + DateUtils.toDateString());
- // 取得原始文件名
- String originalfile = file.getOriginalFilename();
-
- // 拼接路径
- String path = RuoYiConfig.getProfile() + fmspath + "/" + DateUtils.toDateString();
- System.out.println("拼接路径为:" + path);
- String filename = FileUpload.writeUploadFile(file,path);
- String fileurl = fmspath + "/" + DateUtils.toDateString() + "/" + filename;
- System.out.println(fileurl);
-
-
- int count = 0;
-
- // System.out.println("photoid:" + swipperid);
-
- System.out.println("RuoYiConfig.getProfile()" + RuoYiConfig.getProfile());
-
- /*LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
- SysUser user = loginUser.getUser();
-
- System.out.println("取得用户信息:" + user.toString());*/
-
- // String fileName, String photoPath, String photoUrl, String originalName, String uploadName,String uploadDept, Long status
- FmsPhoto fmsPhoto = new FmsPhoto(filename, path, fileurl, originalfile, username, "", (long) 0);
-
- // System.out.println("fmsPhoto:" + fmsPhoto.toString());
- try
- {
- return toAjax(fmsPhotoService.insertFmsPhoto(fmsPhoto));
- }
- catch(Exception e)
- {
- return AjaxResult.error(e.getMessage());
- }
- // select photo_id,file_name,photo_path,photo_url,original_name,upload_name,upload_dept,upload_time,status from fms_photo;
-
- // 相应赋值
- //int photoId, int swipperId, String photoPath, String photoUrl, String fileName,String originalName
-
- /*SysSwipper sysSwipper = new SysSwipper(Integer.parseInt(swipperid), path, fileurl, filename, originalfile);
-
- System.out.println("sysSwipper:" + sysSwipper.toString());
- try
- {
- count = swipperService.insertSwipper(sysSwipper);
- }
- catch(Exception e)
- {
- return AjaxResult.error(e.getMessage());
- }*/
-
- // FmsPhoto fmsPhoto
-
- // return AjaxResult.success(sysSwipper);
-
-
- }
-
- /**
- * 修改图片管理
- */
- @PreAuthorize("@ss.hasPermi('fms:photo:edit')")
- @Log(title = "图片管理", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody FmsPhoto fmsPhoto)
- {
- return toAjax(fmsPhotoService.updateFmsPhoto(fmsPhoto));
- }
-
- /**
- * 删除图片管理
- */
- @PreAuthorize("@ss.hasPermi('fms:photo:remove')")
- @Log(title = "图片管理", businessType = BusinessType.DELETE)
- @DeleteMapping("/{photoIds}")
- public AjaxResult remove(@PathVariable Long[] photoIds)
- {
- return toAjax(fmsPhotoService.deleteFmsPhotoByIds(photoIds));
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/FmsFiles.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/FmsFiles.java
deleted file mode 100644
index 2dd41de..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/FmsFiles.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.hig.fms.domain;
-
-import java.util.Date;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.annotation.Excel;
-
-import lombok.Data;
-
-@Data
-public class FmsFiles {
- /** 文件序号 */
- private int fileId;
-
- /** 文件标题 */
- @Excel(name = "文件标题")
- private String fileTitle;
-
- /** 文件描述 */
- @Excel(name = "文件描述")
- private String fileDescribe;
-
- /** 文件名称 */
- private String fileName;
-
- /** 文件路径 */
- private String filePath;
-
- /** 文件链接 */
- private String fileUrl;
-
- /** 文件类型 */
- private String fileSuffix;
-
- /** 原始名称 */
- private String originalName;
-
- /** 上传者 */
- @Excel(name = "上传者")
- private String uploadName;
-
- /** 上传部门 */
- private String uploadDept;
-
- /** 上传时间 */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
- private Date uploadTime;
-
- /** 状态 */
- private int status;
-
- public FmsFiles() {
- super();
- }
-
- public FmsFiles(String fileTitle, String fileDescribe, String fileName, String filePath, String fileUrl,
- String fileSuffix, String originalName, String uploadName) {
- super();
- this.fileTitle = fileTitle;
- this.fileDescribe = fileDescribe;
- this.fileName = fileName;
- this.filePath = filePath;
- this.fileUrl = fileUrl;
- this.fileSuffix = fileSuffix;
- this.originalName = originalName;
- this.uploadName = uploadName;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this)
- .append("fileId", getFileId())
- .append("fileTitle", getFileTitle())
- .append("fileDescribe", getFileDescribe())
- .append("fileName", getFileName())
- .append("filePath", getFilePath())
- .append("fileUrl", getFileUrl())
- .append("fileSuffix", getFileSuffix())
- .append("originalName", getOriginalName())
- .append("uploadName", getUploadName())
- .append("uploadDept", getUploadDept())
- .append("uploadTime", getUploadTime())
- .append("status", getStatus())
- .toString();
- }
-
-
-
-
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/FmsPhoto.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/FmsPhoto.java
deleted file mode 100644
index 31e52d7..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/FmsPhoto.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package com.hig.fms.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 图片管理对象 fms_photo
- *
- * @author qnsdt
- * @date 2021-12-14
- */
-public class FmsPhoto extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 图片序号 */
- @Excel(name = "图片序号")
- private Long photoId;
-
- /** 文件名称 */
- @Excel(name = "文件名称")
- private String fileName;
-
- /** 图片路径 */
- @Excel(name = "图片路径")
- private String photoPath;
-
- /** 图片链接 */
- @Excel(name = "图片链接")
- private String photoUrl;
-
- /** 原始名称 */
- @Excel(name = "原始名称")
- private String originalName;
-
- /** 上传者 */
- @Excel(name = "上传者")
- private String uploadName;
-
- /** 上传部门 */
- @Excel(name = "上传部门")
- private String uploadDept;
-
- /** 上传时间 */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
- private Date uploadTime;
-
- /** 状态 */
- @Excel(name = "状态")
- private Long status;
-
- public void setPhotoId(Long photoId)
- {
- this.photoId = photoId;
- }
-
- public Long getPhotoId()
- {
- return photoId;
- }
- public void setFileName(String fileName)
- {
- this.fileName = fileName;
- }
-
- public String getFileName()
- {
- return fileName;
- }
- public void setPhotoPath(String photoPath)
- {
- this.photoPath = photoPath;
- }
-
- public String getPhotoPath()
- {
- return photoPath;
- }
- public void setPhotoUrl(String photoUrl)
- {
- this.photoUrl = photoUrl;
- }
-
- public String getPhotoUrl()
- {
- return photoUrl;
- }
- public void setOriginalName(String originalName)
- {
- this.originalName = originalName;
- }
-
- public String getOriginalName()
- {
- return originalName;
- }
- public void setUploadName(String uploadName)
- {
- this.uploadName = uploadName;
- }
-
- public String getUploadName()
- {
- return uploadName;
- }
- public void setUploadDept(String uploadDept)
- {
- this.uploadDept = uploadDept;
- }
-
- public String getUploadDept()
- {
- return uploadDept;
- }
- public void setUploadTime(Date uploadTime)
- {
- this.uploadTime = uploadTime;
- }
-
- public Date getUploadTime()
- {
- return uploadTime;
- }
- public void setStatus(Long status)
- {
- this.status = status;
- }
-
- public Long getStatus()
- {
- return status;
- }
-
-
- public FmsPhoto(String fileName, String photoPath, String photoUrl, String originalName, String uploadName,
- String uploadDept, Long status) {
- super();
- this.fileName = fileName;
- this.photoPath = photoPath;
- this.photoUrl = photoUrl;
- this.originalName = originalName;
- this.uploadName = uploadName;
- this.uploadDept = uploadDept;
- this.status = status;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("photoId", getPhotoId())
- .append("fileName", getFileName())
- .append("photoPath", getPhotoPath())
- .append("photoUrl", getPhotoUrl())
- .append("originalName", getOriginalName())
- .append("uploadName", getUploadName())
- .append("uploadDept", getUploadDept())
- .append("uploadTime", getUploadTime())
- .append("status", getStatus())
- .toString();
- }
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/MultipartFileParam.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/MultipartFileParam.java
deleted file mode 100644
index 4669a6d..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/MultipartFileParam.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.hig.fms.domain;
-
-import org.springframework.web.multipart.MultipartFile;
-
-public class MultipartFileParam {
- private String taskId;
- private int chunkNumber;
- private long chunkSize;
- private int totalChunks;
- private String identifier;
- private MultipartFile file;
-
- public String getTaskId() {
- return taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
- public int getChunkNumber() {
- return chunkNumber;
- }
-
- public void setChunkNumber(int chunkNumber) {
- this.chunkNumber = chunkNumber;
- }
-
- public long getChunkSize() {
- return chunkSize;
- }
-
- public void setChunkSize(long chunkSize) {
- this.chunkSize = chunkSize;
- }
-
- public int getTotalChunks() {
- return totalChunks;
- }
-
- public void setTotalChunks(int totalChunks) {
- this.totalChunks = totalChunks;
- }
-
- public String getIdentifier() {
- return identifier;
- }
-
- public void setIdentifier(String identifier) {
- this.identifier = identifier;
- }
-
- public MultipartFile getFile() {
- return file;
- }
-
- public void setFile(MultipartFile file) {
- this.file = file;
- }
-
-}
diff --git a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/dto/StdOut.java b/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/dto/StdOut.java
deleted file mode 100644
index d7cdb1d..0000000
--- a/exam-online-api-DEL/hig-application/src/main/java/com/hig/fms/domain/dto/StdOut.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.hig.fms.domain.dto;
-
-import java.util.List;
-import java.util.Map;
-
-import com.alibaba.fastjson.JSON;
-
-public class StdOut {
- public static final int SUCCESS = 200;
- public static final int FAIL = 400;
- public static final int PARAMETER_NULL = 500;
- public static final int NO_LOGIN = 600;
- private int code = 200;
- private Object model = null;
- private String message = null;
-
- public StdOut() {
- this.setCode(200);
- this.setModel((Object)null);
- }
-
- public StdOut(int code) {
- this.setCode(code);
- this.setModel((Object)null);
- }
-
- public StdOut(List