初始化项目
parent
0a5db13fe7
commit
7bbde5cb3a
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 来去如风
|
||||
|
||||
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.
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,987 @@
|
|||
-- 系统管理相关
|
||||
create table sys_dept
|
||||
(
|
||||
dept_id Int NOT NULL,
|
||||
parent_id Int NULL,
|
||||
ancestors VARCHAR2(50) null,
|
||||
dept_code VARCHAR2(50) null,
|
||||
dept_name VARCHAR2(600) not null,
|
||||
order_num Int null,
|
||||
leader VARCHAR2(30) null,
|
||||
phone VARCHAR2(20) null,
|
||||
email VARCHAR2(50) NULL,
|
||||
status CHAR(1) NULL,
|
||||
del_flag CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
constraint PK_sys_dept primary key (dept_id)
|
||||
);
|
||||
|
||||
create table sys_user
|
||||
(
|
||||
user_id Int NOT NULL,
|
||||
user_code VARCHAR2(100) null,
|
||||
dept_id Int NULL,
|
||||
user_name VARCHAR2(100) null,
|
||||
nick_name VARCHAR2(30) NOT null,
|
||||
user_type CHAR(2) NULL,
|
||||
email VARCHAR2(50) null,
|
||||
phonenumber VARCHAR2(20) null,
|
||||
sex CHAR(1) null,
|
||||
avatar VARCHAR2(300) null,
|
||||
password VARCHAR2(100) null,
|
||||
status CHAR(1) NULL,
|
||||
del_flag CHAR(1) NULL,
|
||||
login_ip VARCHAR2(128) NULL,
|
||||
login_date DATE NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_user primary key (user_id)
|
||||
);
|
||||
|
||||
create table sys_post
|
||||
(
|
||||
post_id Int NOT NULL,
|
||||
post_code VARCHAR2(64) null,
|
||||
post_name VARCHAR2(50) NOT null,
|
||||
post_sort Int NULL,
|
||||
status CHAR(1) NULL,
|
||||
del_flag CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_post primary key (post_id)
|
||||
);
|
||||
|
||||
|
||||
create table sys_role
|
||||
(
|
||||
role_id Int NOT NULL,
|
||||
role_name VARCHAR2(90) NOT null,
|
||||
role_key VARCHAR2(200) null,
|
||||
role_sort Int NULL,
|
||||
data_scope CHAR(1) NULL,
|
||||
menu_check_strictly Int NULL,
|
||||
dept_check_strictly Int NULL,
|
||||
status CHAR(1) NULL,
|
||||
del_flag CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_role primary key (role_id)
|
||||
);
|
||||
|
||||
create table sys_menu
|
||||
(
|
||||
menu_id Int NOT NULL,
|
||||
menu_name VARCHAR2(120) NOT null,
|
||||
parent_id Int NULL,
|
||||
order_num Int NULL,
|
||||
path VARCHAR2(200) null,
|
||||
component VARCHAR2(300) null,
|
||||
is_frame Int NULL,
|
||||
is_cache Int NULL,
|
||||
menu_type CHAR(1) NULL,
|
||||
visible CHAR(1) NULL,
|
||||
status CHAR(1) NULL,
|
||||
del_flag CHAR(1) NULL,
|
||||
perms VARCHAR2(100) NULL,
|
||||
icon VARCHAR2(100) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_menu primary key (menu_id)
|
||||
);
|
||||
|
||||
create table sys_user_role
|
||||
(
|
||||
user_id Int NOT NULL,
|
||||
role_id Int NOT NULL,
|
||||
constraint PK_sys_user_role primary key (user_id, role_id)
|
||||
);
|
||||
|
||||
create table sys_role_menu
|
||||
(
|
||||
role_id Int NOT NULL,
|
||||
menu_id Int NOT NULL,
|
||||
constraint PK_sys_role_menu primary key (role_id, menu_id)
|
||||
);
|
||||
|
||||
create table sys_role_dept
|
||||
(
|
||||
role_id Int NOT NULL,
|
||||
dept_id Int NOT NULL,
|
||||
constraint PK_sys_role_dept primary key (role_id, dept_id)
|
||||
);
|
||||
|
||||
create table sys_user_post
|
||||
(
|
||||
user_id Int NOT NULL,
|
||||
post_id Int NOT NULL,
|
||||
constraint PK_sys_user_post primary key (user_id, post_id)
|
||||
);
|
||||
|
||||
create table sys_oper_log
|
||||
(
|
||||
oper_id Int NOT NULL,
|
||||
title VARCHAR2(120) NOT null,
|
||||
business_type Int NULL,
|
||||
method VARCHAR2(120) NULL,
|
||||
request_method VARCHAR2(120) NULL,
|
||||
operator_type Int NULL,
|
||||
oper_name VARCHAR2(50) null,
|
||||
dept_name VARCHAR2(120) null,
|
||||
oper_url VARCHAR2(300) null,
|
||||
oper_ip VARCHAR2(128) null,
|
||||
oper_location VARCHAR2(300) null,
|
||||
oper_param VARCHAR2(2000) null,
|
||||
json_result VARCHAR2(2000) null,
|
||||
status CHAR(1) NULL,
|
||||
error_msg VARCHAR2(2000) NULL,
|
||||
oper_time DATE NULL,
|
||||
constraint PK_sys_oper_log primary key (oper_id)
|
||||
);
|
||||
|
||||
create table sys_dict_type
|
||||
(
|
||||
dict_id Int NOT NULL,
|
||||
dict_name VARCHAR2(200) NOT null,
|
||||
dict_type VARCHAR2(50) null,
|
||||
status CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_dict_type primary key (dict_id)
|
||||
);
|
||||
|
||||
create table sys_dict_data
|
||||
(
|
||||
dict_code Int NOT NULL,
|
||||
dict_sort Int NULL,
|
||||
dict_label VARCHAR2(100) NOT null,
|
||||
dict_value VARCHAR2(100) NOT null,
|
||||
dict_type VARCHAR2(100) null,
|
||||
css_class VARCHAR2(100) null,
|
||||
list_class VARCHAR2(100) null,
|
||||
is_default CHAR(1) NULL,
|
||||
status CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_dict_data primary key (dict_code)
|
||||
);
|
||||
|
||||
create table sys_config
|
||||
(
|
||||
config_id Int NOT NULL,
|
||||
config_name VARCHAR2(100) NOT null,
|
||||
config_key VARCHAR2(100) null,
|
||||
config_value VARCHAR2(100) null,
|
||||
config_type CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_config primary key (config_id)
|
||||
);
|
||||
|
||||
create table sys_logininfor
|
||||
(
|
||||
info_id Int NOT NULL,
|
||||
user_name VARCHAR2(50) NOT null,
|
||||
ipaddr VARCHAR2(128) null,
|
||||
login_location VARCHAR2(300) null,
|
||||
browser VARCHAR2(50) null,
|
||||
os VARCHAR2(50) null,
|
||||
status CHAR(1) NULL,
|
||||
msg VARCHAR2(600) NULL,
|
||||
login_time DATE NULL,
|
||||
constraint PK_sys_logininfor primary key (info_id)
|
||||
);
|
||||
|
||||
create table sys_job
|
||||
(
|
||||
job_id Int NOT NULL,
|
||||
job_name VARCHAR2(120) NOT null,
|
||||
job_group VARCHAR2(120) null,
|
||||
invoke_target VARCHAR2(500) null,
|
||||
cron_expression VARCHAR2(300) null,
|
||||
misfire_policy VARCHAR2(20) null,
|
||||
concurrent CHAR(1) NULL,
|
||||
status CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_job primary key (job_id)
|
||||
);
|
||||
|
||||
create table sys_job_log
|
||||
(
|
||||
job_log_id Int NOT NULL,
|
||||
job_name VARCHAR2(120) NOT null,
|
||||
job_group VARCHAR2(120) null,
|
||||
invoke_target VARCHAR2(500) null,
|
||||
job_message VARCHAR2(500) null,
|
||||
status CHAR(1) NULL,
|
||||
exception_info VARCHAR2(2000) NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_sys_job_log primary key (job_log_id)
|
||||
);
|
||||
|
||||
create table sys_notice
|
||||
(
|
||||
notice_id Int NOT NULL,
|
||||
notice_title VARCHAR2(120) NOT null,
|
||||
notice_type CHAR(1) null,
|
||||
notice_content CLOB null,
|
||||
status CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_sys_notice primary key (notice_id)
|
||||
);
|
||||
|
||||
create table sys_group
|
||||
(
|
||||
group_id Int NOT NULL,
|
||||
group_code VARCHAR2(50) NOT null,
|
||||
group_name VARCHAR2(120) NOT null,
|
||||
group_describe VARCHAR2(200) NOT null,
|
||||
status CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_sys_group primary key (group_id)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN sys_group.group_id IS '分组序号';
|
||||
COMMENT ON COLUMN sys_group.group_code IS '分组代码';
|
||||
COMMENT ON COLUMN sys_group.group_name IS '分组名称';
|
||||
COMMENT ON COLUMN sys_group.group_describe IS '分组描述';
|
||||
COMMENT ON COLUMN sys_group.status IS '状态';
|
||||
COMMENT ON COLUMN sys_group.create_by IS '创建者';
|
||||
COMMENT ON COLUMN sys_group.create_time IS '创建时间';
|
||||
|
||||
create table sys_group_person
|
||||
(
|
||||
group_code VARCHAR2(50) NOT null,
|
||||
person_code VARCHAR2(120) NOT null,
|
||||
order_id Int null,
|
||||
constraint PK_sys_group_person primary key (group_code, person_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN sys_group_person.group_code IS '分组代码';
|
||||
COMMENT ON COLUMN sys_group_person.person_code IS '人员代码';
|
||||
COMMENT ON COLUMN sys_group_person.order_id IS '组内排序';
|
||||
|
||||
|
||||
create table sys_user_choice
|
||||
(
|
||||
choice_code VARCHAR2(50) NOT null,
|
||||
user_code VARCHAR2(100) null,
|
||||
order_id int null,
|
||||
constraint PK_sys_user_choice primary key (choice_code, user_code)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN sys_user_choice.choice_code IS '选择代码';
|
||||
COMMENT ON COLUMN sys_user_choice.user_code IS '用户代码';
|
||||
COMMENT ON COLUMN sys_user_choice.order_id IS '内部排序';
|
||||
|
||||
create table gen_table
|
||||
(
|
||||
table_id Int NOT NULL,
|
||||
table_name VARCHAR2(120) NOT null,
|
||||
table_comment VARCHAR2(500) null,
|
||||
sub_table_name VARCHAR2(120) null,
|
||||
sub_table_fk_name VARCHAR2(120) null,
|
||||
class_name VARCHAR2(100) null,
|
||||
tpl_category VARCHAR2(200) null,
|
||||
package_name VARCHAR2(100) null,
|
||||
module_name VARCHAR2(30) null,
|
||||
business_name VARCHAR2(30) null,
|
||||
function_name VARCHAR2(50) null,
|
||||
function_author VARCHAR2(50) null,
|
||||
gen_type CHAR(1) null,
|
||||
gen_path VARCHAR2(200) null,
|
||||
options VARCHAR2(1000) null,
|
||||
status CHAR(1) NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_gen_table primary key (table_id)
|
||||
);
|
||||
|
||||
|
||||
create table gen_table_column
|
||||
(
|
||||
column_id Int NOT NULL,
|
||||
table_id Int NOT NULL,
|
||||
column_name VARCHAR2(200) NOT null,
|
||||
column_comment VARCHAR2(500) NOT null,
|
||||
column_type VARCHAR2(100) null,
|
||||
java_type VARCHAR2(500) null,
|
||||
java_field VARCHAR2(200) null,
|
||||
is_pk Char(1) null,
|
||||
is_increment Char(1) null,
|
||||
is_required Char(1) null,
|
||||
is_insert Char(1) null,
|
||||
is_edit Char(1) null,
|
||||
is_list Char(1) null,
|
||||
is_query Char(1) null,
|
||||
query_type VARCHAR2(200) null,
|
||||
html_type VARCHAR2(200) null,
|
||||
dict_type VARCHAR2(200) null,
|
||||
sort Int NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
update_by VARCHAR2(100) NULL,
|
||||
update_time DATE NULL,
|
||||
remark VARCHAR2(600) NULL,
|
||||
constraint PK_gen_table_column primary key (column_id,table_id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 1、存储每一个已配置的 jobDetail 的详细信息
|
||||
-- ----------------------------
|
||||
create table qrtz_job_details (
|
||||
sched_name varchar2(120) not null,
|
||||
job_name varchar2(200) not null,
|
||||
job_group varchar2(200) not null,
|
||||
description varchar2(250) null,
|
||||
job_class_name varchar2(250) not null,
|
||||
is_durable varchar2(1) not null,
|
||||
is_nonconcurrent varchar2(1) not null,
|
||||
is_update_data varchar2(1) not null,
|
||||
requests_recovery varchar2(1) not null,
|
||||
job_data blob null,
|
||||
constraint qrtz_job_details_pk primary key (sched_name,job_name,job_group)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 2、 存储已配置的 Trigger 的信息
|
||||
-- ----------------------------
|
||||
create table qrtz_triggers (
|
||||
sched_name varchar2(120) not null,
|
||||
trigger_name varchar2(200) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
job_name varchar2(200) not null,
|
||||
job_group varchar2(200) not null,
|
||||
description varchar2(250) null,
|
||||
next_fire_time number(13) null,
|
||||
prev_fire_time number(13) null,
|
||||
priority number(13) null,
|
||||
trigger_state varchar2(16) not null,
|
||||
trigger_type varchar2(8) not null,
|
||||
start_time number(13) not null,
|
||||
end_time number(13) null,
|
||||
calendar_name varchar2(200) null,
|
||||
misfire_instr number(2) null,
|
||||
job_data blob null,
|
||||
constraint qrtz_triggers_pk primary key (sched_name,trigger_name,trigger_group),
|
||||
constraint qrtz_trigger_to_jobs_fk foreign key (sched_name,job_name,job_group)
|
||||
references qrtz_job_details(sched_name,job_name,job_group)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数
|
||||
-- ----------------------------
|
||||
create table qrtz_simple_triggers (
|
||||
sched_name varchar2(120) not null,
|
||||
trigger_name varchar2(200) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
repeat_count number(7) not null,
|
||||
repeat_interval number(12) not null,
|
||||
times_triggered number(10) not null,
|
||||
constraint qrtz_simple_trig_pk primary key (sched_name,trigger_name,trigger_group),
|
||||
constraint qrtz_simple_trig_to_trig_fk foreign key (sched_name,trigger_name,trigger_group)
|
||||
references qrtz_triggers(sched_name,trigger_name,trigger_group)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息
|
||||
-- ----------------------------
|
||||
create table qrtz_cron_triggers (
|
||||
sched_name varchar2(120) not null,
|
||||
trigger_name varchar2(200) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
cron_expression varchar2(120) not null,
|
||||
time_zone_id varchar2(80),
|
||||
constraint qrtz_cron_trig_pk primary key (sched_name,trigger_name,trigger_group),
|
||||
constraint qrtz_cron_trig_to_trig_fk foreign key (sched_name,trigger_name,trigger_group)
|
||||
references qrtz_triggers(sched_name,trigger_name,trigger_group)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候)
|
||||
-- ----------------------------
|
||||
create table qrtz_blob_triggers (
|
||||
sched_name varchar2(120) not null,
|
||||
trigger_name varchar2(200) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
blob_data blob null,
|
||||
constraint qrtz_blob_trig_pk primary key (sched_name,trigger_name,trigger_group),
|
||||
constraint qrtz_blob_trig_to_trig_fk foreign key (sched_name,trigger_name,trigger_group)
|
||||
references qrtz_triggers(sched_name,trigger_name,trigger_group)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围
|
||||
-- ----------------------------
|
||||
create table qrtz_calendars (
|
||||
sched_name varchar2(120) not null,
|
||||
calendar_name varchar2(200) not null,
|
||||
calendar blob not null,
|
||||
constraint qrtz_calendars_pk primary key (sched_name,calendar_name)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 7、 存储已暂停的 Trigger 组的信息
|
||||
-- ----------------------------
|
||||
create table qrtz_paused_trigger_grps (
|
||||
sched_name varchar2(120) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
constraint qrtz_paused_trig_grps_pk primary key (sched_name,trigger_group)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息
|
||||
-- ----------------------------
|
||||
create table qrtz_fired_triggers (
|
||||
sched_name varchar2(120) not null,
|
||||
entry_id varchar2(95) not null,
|
||||
trigger_name varchar2(200) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
instance_name varchar2(200) not null,
|
||||
fired_time number(13) not null,
|
||||
sched_time number(13) not null,
|
||||
priority number(13) not null,
|
||||
state varchar2(16) not null,
|
||||
job_name varchar2(200) null,
|
||||
job_group varchar2(200) null,
|
||||
is_nonconcurrent varchar2(1) null,
|
||||
requests_recovery varchar2(1) null,
|
||||
constraint qrtz_fired_trigger_pk primary key (sched_name,entry_id)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例
|
||||
-- ----------------------------
|
||||
create table qrtz_scheduler_state (
|
||||
sched_name varchar2(120) not null,
|
||||
instance_name varchar2(200) not null,
|
||||
last_checkin_time number(13) not null,
|
||||
checkin_interval number(13) not null,
|
||||
constraint qrtz_scheduler_state_pk primary key (sched_name,instance_name)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁)
|
||||
-- ----------------------------
|
||||
create table qrtz_locks (
|
||||
sched_name varchar2(120) not null,
|
||||
lock_name varchar2(40) not null,
|
||||
constraint qrtz_locks_pk primary key (sched_name,lock_name)
|
||||
);
|
||||
|
||||
create table qrtz_simprop_triggers (
|
||||
sched_name varchar2(120) not null,
|
||||
trigger_name varchar2(200) not null,
|
||||
trigger_group varchar2(200) not null,
|
||||
str_prop_1 varchar2(512) null,
|
||||
str_prop_2 varchar2(512) null,
|
||||
str_prop_3 varchar2(512) null,
|
||||
int_prop_1 number(10) null,
|
||||
int_prop_2 number(10) null,
|
||||
long_prop_1 number(13) null,
|
||||
long_prop_2 number(13) null,
|
||||
dec_prop_1 numeric(13,4) null,
|
||||
dec_prop_2 numeric(13,4) null,
|
||||
bool_prop_1 varchar2(1) null,
|
||||
bool_prop_2 varchar2(1) null,
|
||||
constraint qrtz_simprop_trig_pk primary key (sched_name,trigger_name,trigger_group),
|
||||
constraint qrtz_simprop_trig_to_trig_fk foreign key (sched_name,trigger_name,trigger_group)
|
||||
references qrtz_triggers(sched_name,trigger_name,trigger_group)
|
||||
);
|
||||
|
||||
|
||||
create index idx_qrtz_j_req_recovery on qrtz_job_details(sched_name,requests_recovery);
|
||||
create index idx_qrtz_j_grp on qrtz_job_details(sched_name,job_group);
|
||||
|
||||
create index idx_qrtz_t_j on qrtz_triggers(sched_name,job_name,job_group);
|
||||
create index idx_qrtz_t_jg on qrtz_triggers(sched_name,job_group);
|
||||
create index idx_qrtz_t_c on qrtz_triggers(sched_name,calendar_name);
|
||||
create index idx_qrtz_t_g on qrtz_triggers(sched_name,trigger_group);
|
||||
create index idx_qrtz_t_state on qrtz_triggers(sched_name,trigger_state);
|
||||
create index idx_qrtz_t_n_state on qrtz_triggers(sched_name,trigger_name,trigger_group,trigger_state);
|
||||
create index idx_qrtz_t_n_g_state on qrtz_triggers(sched_name,trigger_group,trigger_state);
|
||||
create index idx_qrtz_t_next_fire_time on qrtz_triggers(sched_name,next_fire_time);
|
||||
create index idx_qrtz_t_nft_st on qrtz_triggers(sched_name,trigger_state,next_fire_time);
|
||||
create index idx_qrtz_t_nft_misfire on qrtz_triggers(sched_name,misfire_instr,next_fire_time);
|
||||
create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(sched_name,misfire_instr,next_fire_time,trigger_state);
|
||||
create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(sched_name,misfire_instr,next_fire_time,trigger_group,trigger_state);
|
||||
|
||||
create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(sched_name,instance_name);
|
||||
create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(sched_name,instance_name,requests_recovery);
|
||||
create index idx_qrtz_ft_j_g on qrtz_fired_triggers(sched_name,job_name,job_group);
|
||||
create index idx_qrtz_ft_jg on qrtz_fired_triggers(sched_name,job_group);
|
||||
create index idx_qrtz_ft_t_g on qrtz_fired_triggers(sched_name,trigger_name,trigger_group);
|
||||
|
||||
create index idx_qrtz_ft_tg on qrtz_fired_triggers(sched_name,trigger_group);
|
||||
|
||||
commit;
|
||||
|
||||
-- 资料管理相关
|
||||
create table fms_photo
|
||||
(
|
||||
photo_id Int NOT NULL,
|
||||
file_name VARCHAR2(600) NOT null,
|
||||
photo_path VARCHAR2(100) NOT null,
|
||||
photo_url VARCHAR2(100) NOT null,
|
||||
original_name VARCHAR2(600) null,
|
||||
upload_name VARCHAR2(100) NULL,
|
||||
upload_dept VARCHAR2(50) NULL,
|
||||
upload_time DATE NULL,
|
||||
status Int NULL,
|
||||
constraint PK_fms_photo primary key (photo_id)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN fms_photo.photo_id IS '图片序号';
|
||||
COMMENT ON COLUMN fms_photo.file_name IS '文件名称';
|
||||
COMMENT ON COLUMN fms_photo.photo_path IS '图片路径';
|
||||
COMMENT ON COLUMN fms_photo.photo_url IS '图片链接';
|
||||
COMMENT ON COLUMN fms_photo.original_name IS '原始名称';
|
||||
COMMENT ON COLUMN fms_photo.upload_name IS '上传者';
|
||||
COMMENT ON COLUMN fms_photo.upload_dept IS '上传部门';
|
||||
COMMENT ON COLUMN fms_photo.upload_time IS '上传时间';
|
||||
COMMENT ON COLUMN fms_photo.status IS '状态';
|
||||
|
||||
create table fms_files
|
||||
(
|
||||
file_id Int NOT NULL,
|
||||
file_title VARCHAR2(120) null,
|
||||
file_describe VARCHAR2(300) null,
|
||||
file_name VARCHAR2(600) NOT null,
|
||||
file_path VARCHAR2(100) NOT null,
|
||||
file_url VARCHAR2(100) NOT null,
|
||||
file_suffix VARCHAR2(30) null,
|
||||
original_name VARCHAR2(600) null,
|
||||
upload_name VARCHAR2(100) NULL,
|
||||
upload_dept VARCHAR2(50) NULL,
|
||||
upload_time DATE NULL,
|
||||
status Int NULL,
|
||||
constraint PK_fms_files primary key (file_id)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN fms_files.file_id IS '文件序号';
|
||||
COMMENT ON COLUMN fms_files.file_title IS '文件标题';
|
||||
COMMENT ON COLUMN fms_files.file_describe IS '文件描述';
|
||||
COMMENT ON COLUMN fms_files.file_name IS '文件名称';
|
||||
COMMENT ON COLUMN fms_files.file_path IS '文件路径';
|
||||
COMMENT ON COLUMN fms_files.file_url IS '文件链接';
|
||||
COMMENT ON COLUMN fms_files.file_suffix IS '文件类型';
|
||||
COMMENT ON COLUMN fms_files.original_name IS '原始名称';
|
||||
COMMENT ON COLUMN fms_files.upload_name IS '上传者';
|
||||
COMMENT ON COLUMN fms_files.upload_dept IS '上传部门';
|
||||
COMMENT ON COLUMN fms_files.upload_time IS '上传时间';
|
||||
COMMENT ON COLUMN fms_files.status IS '状态';
|
||||
|
||||
|
||||
-- 考试系统相关
|
||||
create table exam_type
|
||||
(
|
||||
type_id Int NOT NULL,
|
||||
parent_id Int NULL,
|
||||
type_code VARCHAR2(50) null,
|
||||
type_name VARCHAR2(60) not null,
|
||||
order_id Int null,
|
||||
status Int NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_exam_type primary key (type_id)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_type.type_id IS '类别id';
|
||||
COMMENT ON COLUMN exam_type.parent_id IS '上级类别ID';
|
||||
COMMENT ON COLUMN exam_type.type_code IS '类别代码';
|
||||
COMMENT ON COLUMN exam_type.type_name IS '类别名称';
|
||||
COMMENT ON COLUMN exam_type.order_id IS '顺序Id';
|
||||
COMMENT ON COLUMN exam_type.status IS '状态';
|
||||
COMMENT ON COLUMN exam_type.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_type.create_time IS '创建时间';
|
||||
|
||||
|
||||
create table exam_questions_bank
|
||||
(
|
||||
bank_id Int NOT NULL,
|
||||
bank_code VARCHAR2(50) NOT NULL,
|
||||
bank_name VARCHAR2(120) NOT null,
|
||||
bank_describe VARCHAR2(300) null,
|
||||
bank_version VARCHAR2(60) null,
|
||||
exam_type Int NULL,
|
||||
online_date DATE NULL,
|
||||
picture_url VARCHAR2(600) NULL,
|
||||
radio_score Int NULL,
|
||||
choice_score Int NULL,
|
||||
judge_score Int NULL,
|
||||
status Int NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_dept Int NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_exam_questions_bank primary key (bank_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_questions_bank.bank_id IS '题库id';
|
||||
COMMENT ON COLUMN exam_questions_bank.bank_code IS '题库代码';
|
||||
COMMENT ON COLUMN exam_questions_bank.bank_name IS '题库名称';
|
||||
COMMENT ON COLUMN exam_questions_bank.bank_describe IS '题库描述';
|
||||
COMMENT ON COLUMN exam_questions_bank.bank_version IS '题库版本';
|
||||
COMMENT ON COLUMN exam_questions_bank.exam_type IS '考试类型';
|
||||
COMMENT ON COLUMN exam_questions_bank.online_date IS '上线日期';
|
||||
COMMENT ON COLUMN exam_questions_bank.picture_url IS '图片链接';
|
||||
COMMENT ON COLUMN exam_questions_bank.radio_score IS '单选分数';
|
||||
COMMENT ON COLUMN exam_questions_bank.choice_score IS '多选分数';
|
||||
COMMENT ON COLUMN exam_questions_bank.judge_score IS '判断分数';
|
||||
COMMENT ON COLUMN exam_questions_bank.status IS '状态';
|
||||
COMMENT ON COLUMN exam_questions_bank.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_questions_bank.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN exam_questions_bank.create_time IS '创建时间';
|
||||
|
||||
|
||||
create table exam_bank_picture
|
||||
(
|
||||
photo_id Int not null,
|
||||
photo_code VARCHAR2(200) not null,
|
||||
photo_path VARCHAR2(200) null,
|
||||
photo_url VARCHAR2(200) null,
|
||||
file_name VARCHAR2(60) null,
|
||||
original_name VARCHAR2(200) null,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
status Int null,
|
||||
constraint PK_exam_bank_picture primary key (photo_code)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN exam_bank_picture.photo_id IS '图片序号';
|
||||
COMMENT ON COLUMN exam_bank_picture.photo_code IS '图片代码';
|
||||
COMMENT ON COLUMN exam_bank_picture.photo_path IS '文档代码';
|
||||
COMMENT ON COLUMN exam_bank_picture.photo_url IS '图片链接';
|
||||
COMMENT ON COLUMN exam_bank_picture.file_name IS '文件名称';
|
||||
COMMENT ON COLUMN exam_bank_picture.original_name IS '原始名称';
|
||||
COMMENT ON COLUMN exam_bank_picture.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_bank_picture.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN exam_bank_picture.status IS '状态';
|
||||
|
||||
create table exam_questions_content
|
||||
(
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
questions_content CLOB NOT null,
|
||||
constraint PK_exam_questions_content primary key (questions_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_questions_content.questions_code IS '试题代码';
|
||||
COMMENT ON COLUMN exam_questions_content.questions_content IS '试题题目';
|
||||
|
||||
|
||||
create table exam_questions_property
|
||||
(
|
||||
bank_code VARCHAR2(50) NOT NULL,
|
||||
questions_id Int NOT NULL,
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
questions_title VARCHAR2(4000) NULL,
|
||||
questions_type Int NULL,
|
||||
questions_score Int NULL,
|
||||
rate_number Int NULL,
|
||||
right_answer VARCHAR2(20) NULL,
|
||||
answer_analyse VARCHAR2(3000) null,
|
||||
status Int NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_dept Int NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_exam_questions_property primary key (questions_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_questions_property.bank_code IS '题库代码';
|
||||
COMMENT ON COLUMN exam_questions_property.questions_id IS '试题id';
|
||||
COMMENT ON COLUMN exam_questions_property.questions_code IS '试题代码';
|
||||
COMMENT ON COLUMN exam_questions_property.questions_title IS '试题题目';
|
||||
COMMENT ON COLUMN exam_questions_property.questions_type IS '试题类型';
|
||||
COMMENT ON COLUMN exam_questions_property.questions_score IS '题目分数';
|
||||
COMMENT ON COLUMN exam_questions_property.rate_number IS '复杂度';
|
||||
COMMENT ON COLUMN exam_questions_property.right_answer IS '正确答案';
|
||||
COMMENT ON COLUMN exam_questions_property.answer_analyse IS '答案分析';
|
||||
COMMENT ON COLUMN exam_questions_property.status IS '状态';
|
||||
COMMENT ON COLUMN exam_questions_property.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_questions_property.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN exam_questions_property.create_time IS '创建时间';
|
||||
|
||||
|
||||
create table exam_questions_answer
|
||||
(
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
option_code CHAR(1) NOT null,
|
||||
option_describe VARCHAR2(600) NOT null,
|
||||
Is_right Int null,
|
||||
order_id Int NULL,
|
||||
constraint PK_exam_questions_answer primary key (questions_code, option_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_questions_answer.questions_code IS '试题代码';
|
||||
COMMENT ON COLUMN exam_questions_answer.option_code IS '试题选项';
|
||||
COMMENT ON COLUMN exam_questions_answer.option_describe IS '选项描述';
|
||||
COMMENT ON COLUMN exam_questions_answer.Is_right IS '是否正确';
|
||||
COMMENT ON COLUMN exam_questions_answer.order_id IS '排序编号';
|
||||
|
||||
create table exam_questions
|
||||
(
|
||||
bank_code VARCHAR2(50) NOT NULL,
|
||||
questions_id Int NOT NULL,
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
questions_title VARCHAR2(4000) null,
|
||||
questions_content CLOB NULL,
|
||||
questions_type Int NULL,
|
||||
questions_score Int NULL,
|
||||
rate_number Int NULL,
|
||||
right_answer VARCHAR2(20) NULL,
|
||||
answer_analyse VARCHAR2(3000) null,
|
||||
status Int NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_dept Int NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_exam_questions primary key (questions_code)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN exam_questions.bank_code IS '题库代码';
|
||||
COMMENT ON COLUMN exam_questions.questions_id IS '试题id';
|
||||
COMMENT ON COLUMN exam_questions.questions_code IS '试题代码';
|
||||
COMMENT ON COLUMN exam_questions.questions_title IS '试题题目';
|
||||
COMMENT ON COLUMN exam_questions.questions_content IS '试题内容';
|
||||
COMMENT ON COLUMN exam_questions.questions_type IS '试题类型';
|
||||
COMMENT ON COLUMN exam_questions.questions_score IS '题目分数';
|
||||
COMMENT ON COLUMN exam_questions.rate_number IS '复杂度';
|
||||
COMMENT ON COLUMN exam_questions.right_answer IS '正确答案';
|
||||
COMMENT ON COLUMN exam_questions.answer_analyse IS '答案分析';
|
||||
COMMENT ON COLUMN exam_questions.status IS '状态';
|
||||
COMMENT ON COLUMN exam_questions.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_questions.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN exam_questions.create_time IS '创建时间';
|
||||
|
||||
|
||||
create table exam_task_manager
|
||||
(
|
||||
exam_id Int NOT NULL,
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
exam_name VARCHAR2(120) NOT null,
|
||||
exam_describe VARCHAR2(300) null,
|
||||
build_type CHAR(1) null,
|
||||
force_done CHAR(1) NULL,
|
||||
exam_bank VARCHAR2(600) null,
|
||||
exam_bank_text VARCHAR2(1200) null,
|
||||
picture_url VARCHAR2(200) null,
|
||||
start_time DATE NULL,
|
||||
end_time DATE NULL,
|
||||
exam_duration VARCHAR2(30) NULL,
|
||||
status Int NULL,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_dept Int NULL,
|
||||
create_time DATE NULL,
|
||||
constraint PK_exam_task_manager primary key (exam_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_task_manager.exam_id IS '考试序号';
|
||||
COMMENT ON COLUMN exam_task_manager.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_task_manager.exam_name IS '考试名称';
|
||||
COMMENT ON COLUMN exam_task_manager.exam_describe IS '考试说明';
|
||||
COMMENT ON COLUMN exam_task_manager.build_type IS '组卷方式';
|
||||
COMMENT ON COLUMN exam_task_manager.force_done IS '强制抽卷';
|
||||
COMMENT ON COLUMN exam_task_manager.exam_bank IS '考试题库';
|
||||
COMMENT ON COLUMN exam_task_manager.exam_bank_text IS '考试题库文字';
|
||||
COMMENT ON COLUMN exam_task_manager.picture_url IS '图片链接';
|
||||
COMMENT ON COLUMN exam_task_manager.start_time IS '开始时间';
|
||||
COMMENT ON COLUMN exam_task_manager.end_time IS '结束时间';
|
||||
COMMENT ON COLUMN exam_task_manager.exam_duration IS '考试时长';
|
||||
COMMENT ON COLUMN exam_task_manager.status IS '状态';
|
||||
COMMENT ON COLUMN exam_task_manager.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_task_manager.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN exam_task_manager.create_time IS '创建时间';
|
||||
|
||||
create table exam_task_picture
|
||||
(
|
||||
photo_id Int not null,
|
||||
photo_code VARCHAR2(200) not null,
|
||||
photo_path VARCHAR2(200) null,
|
||||
photo_url VARCHAR2(200) null,
|
||||
file_name VARCHAR2(60) null,
|
||||
original_name VARCHAR2(200) null,
|
||||
create_by VARCHAR2(100) NULL,
|
||||
create_time DATE NULL,
|
||||
status Int null,
|
||||
constraint PK_exam_task_picture primary key (photo_code)
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN exam_task_picture.photo_id IS '图片序号';
|
||||
COMMENT ON COLUMN exam_task_picture.photo_code IS '图片代码';
|
||||
COMMENT ON COLUMN exam_task_picture.photo_path IS '文档代码';
|
||||
COMMENT ON COLUMN exam_task_picture.photo_url IS '图片链接';
|
||||
COMMENT ON COLUMN exam_task_picture.file_name IS '文件名称';
|
||||
COMMENT ON COLUMN exam_task_picture.original_name IS '原始名称';
|
||||
COMMENT ON COLUMN exam_task_picture.create_by IS '创建者';
|
||||
COMMENT ON COLUMN exam_task_picture.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN exam_task_picture.status IS '状态';
|
||||
|
||||
create table exam_task_questions
|
||||
(
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
questions_number Int null,
|
||||
constraint PK_exam_task_questions primary key (exam_code, questions_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_task_questions.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_task_questions.questions_code IS '题目代码';
|
||||
COMMENT ON COLUMN exam_task_questions.questions_number IS '题号';
|
||||
|
||||
|
||||
create table exam_task_group
|
||||
(
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
group_code VARCHAR2(50) NOT NULL,
|
||||
order_id Int null,
|
||||
constraint PK_exam_task_group primary key (exam_code, group_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_task_group.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_task_group.group_code IS '分组代码';
|
||||
COMMENT ON COLUMN exam_task_group.order_id IS '排序编号';
|
||||
|
||||
|
||||
create table exam_task_person
|
||||
(
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
user_code VARCHAR2(120) NOT null,
|
||||
task_code VARCHAR2(50) NOT NULL,
|
||||
start_time DATE NULL,
|
||||
end_time DATE NULL,
|
||||
status Int null,
|
||||
constraint PK_exam_task_person primary key (exam_code,user_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_task_person.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_task_person.user_code IS '考试人员';
|
||||
COMMENT ON COLUMN exam_task_person.task_code IS '任务代码';
|
||||
COMMENT ON COLUMN exam_task_person.start_time IS '开始时间';
|
||||
COMMENT ON COLUMN exam_task_person.end_time IS '结束时间';
|
||||
COMMENT ON COLUMN exam_task_person.status IS '状态';
|
||||
|
||||
create table exam_user_score
|
||||
(
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
user_code VARCHAR2(120) NOT null,
|
||||
start_time DATE NULL,
|
||||
end_time DATE NULL,
|
||||
questions_score NUMBER(8,2) null,
|
||||
exam_score NUMBER(8,2) null,
|
||||
exam_number int null,
|
||||
answered_number int null,
|
||||
not_answered int null,
|
||||
status Int null,
|
||||
constraint PK_exam_user_score primary key (exam_code,user_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_user_score.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_user_score.user_code IS '考试人员';
|
||||
COMMENT ON COLUMN exam_user_score.start_time IS '开始时间';
|
||||
COMMENT ON COLUMN exam_user_score.end_time IS '结束时间';
|
||||
COMMENT ON COLUMN exam_user_score.questions_score IS '题目分数';
|
||||
COMMENT ON COLUMN exam_user_score.exam_score IS '分数';
|
||||
COMMENT ON COLUMN exam_user_score.exam_number IS '题目数';
|
||||
COMMENT ON COLUMN exam_user_score.answered_number IS '答题数';
|
||||
COMMENT ON COLUMN exam_user_score.not_answered IS '未答题数';
|
||||
COMMENT ON COLUMN exam_user_score.status IS '状态';
|
||||
|
||||
|
||||
create table exam_task_answer
|
||||
(
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
user_code VARCHAR2(100) NOT NULL,
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
questions_number Int NOT NULL,
|
||||
questions_type int NOT NULL,
|
||||
questions_answer VARCHAR2(20) NULL,
|
||||
is_mark CHAR(1) NULL,
|
||||
is_current CHAR(1) NULL,
|
||||
constraint PK_exam_task_answer primary key (exam_code, questions_code, user_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_task_answer.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_task_answer.user_code IS '考试用户';
|
||||
COMMENT ON COLUMN exam_task_answer.questions_code IS '题目代码';
|
||||
COMMENT ON COLUMN exam_task_answer.questions_number IS '题号';
|
||||
COMMENT ON COLUMN exam_task_answer.questions_type IS '试题类型';
|
||||
COMMENT ON COLUMN exam_task_answer.questions_answer IS '题目回答';
|
||||
COMMENT ON COLUMN exam_task_answer.is_mark IS '是否标记';
|
||||
COMMENT ON COLUMN exam_task_answer.is_current IS '是否当前';
|
||||
|
||||
create table exam_finish_answer
|
||||
(
|
||||
exam_code VARCHAR2(50) NOT NULL,
|
||||
user_code VARCHAR2(100) NOT NULL,
|
||||
questions_code VARCHAR2(50) NOT NULL,
|
||||
exam_score Number(8,2) NULL,
|
||||
right_answer VARCHAR2(20) NULL,
|
||||
questions_answer VARCHAR2(20) NULL,
|
||||
questions_score Int NULL,
|
||||
constraint PK_exam_finish_answer primary key (exam_code, questions_code, user_code)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON COLUMN exam_finish_answer.exam_code IS '考试代码';
|
||||
COMMENT ON COLUMN exam_finish_answer.user_code IS '考试用户';
|
||||
COMMENT ON COLUMN exam_finish_answer.questions_code IS '题目代码';
|
||||
COMMENT ON COLUMN exam_finish_answer. exam_score IS '分数';
|
||||
COMMENT ON COLUMN exam_finish_answer.right_answer IS '正确答案';
|
||||
COMMENT ON COLUMN exam_finish_answer.questions_answer IS '题目回答';
|
||||
COMMENT ON COLUMN exam_finish_answer.questions_score IS '题目得分';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,470 @@
|
|||
-- 预置数据可以多次选中导入
|
||||
-- ----------------------------
|
||||
-- 初始化-部门表数据
|
||||
-- ----------------------------
|
||||
insert into sys_dept(dept_id,parent_id,ancestors,dept_code,dept_name,order_num,leader,phone,email,status,del_flag,create_by,create_time) values (100,0,'0','5301001','测试用单位',0,'','13512345678','','0','0','admin',sysdate);
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-用户信息表数据
|
||||
-- ----------------------------
|
||||
insert into SYS_USER (user_id, user_code, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark)
|
||||
values (2, '40288b0186e867550186e867559d0000', 100, 'user1', '用户一', null, null, '13654128596', null, null, '$2a$10$aqSRTGVSqrZFwp.s5JXic.5JtZDYFq.19hriwW7seEdPGo6SJu3.W', '0', '0', '127.0.0.1', to_date('16-03-2023 11:16:56', 'dd-mm-yyyy hh24:mi:ss'), 'admin', to_date('16-03-2023 11:11:57', 'dd-mm-yyyy hh24:mi:ss'), null, to_date('16-03-2023 11:16:42', 'dd-mm-yyyy hh24:mi:ss'), null);
|
||||
insert into SYS_USER (user_id, user_code, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark)
|
||||
values (3, '40288b0186e867550186e86911cc0001', 100, 'user2', '用户二', null, null, '13698568741', null, null, '$2a$10$Sh3WZ3ozH8Q88oG7mla.jerm3f3rCaq0QzD1KEPXXFrzcay0Hgz.S', '0', '0', null, null, 'admin', to_date('16-03-2023 11:13:51', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_USER (user_id, user_code, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark)
|
||||
values (1, 'F6FFFC4E3A50062DE0534479C80A75C1', 100, 'admin', '系统管理员', '00', 'abc@qq.com', '13512345678', '0', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', to_date('16-03-2023 11:19:58', 'dd-mm-yyyy hh24:mi:ss'), 'admin', null, null, to_date('16-03-2023 11:19:44', 'dd-mm-yyyy hh24:mi:ss'), null);
|
||||
|
||||
-- 初始化-岗位信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_post (post_id,post_code,post_name,post_sort,status,del_flag,create_by,create_time) values(1, 'ceo', '董事长', 1, '0', '0','admin', sysdate);
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-角色信息表数据
|
||||
-- ----------------------------
|
||||
insert into SYS_ROLE (role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark)
|
||||
values (2, '学员', 'student', 2, null, 1, 1, '0', '0', 'admin', to_date('16-03-2023 11:01:28', 'dd-mm-yyyy hh24:mi:ss'), 'admin', to_date('16-03-2023 11:16:25', 'dd-mm-yyyy hh24:mi:ss'), null);
|
||||
insert into SYS_ROLE (role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark)
|
||||
values (1, '超级管理员', 'admin', 1, '1', 1, 1, '0', '0', 'admin', to_date('16-03-2023 10:31:19', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
commit;
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-菜单信息表数据
|
||||
-- ----------------------------
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1, '系统管理', 0, 1, 'system', null, 1, 0, 'M', '0', '0', '0', null, 'system', 'admin', null, null, null, '系统管理目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (2, '系统监控', 0, 3, 'monitor', null, 1, 0, 'M', '0', '0', '0', null, 'monitor', 'admin', null, null, null, '系统监控目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (3, '系统工具', 0, 4, 'tool', null, 1, 0, 'M', '0', '0', '0', null, 'tool', 'admin', null, null, null, '系统工具目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (8, '资料管理', 0, 8, 'fms', null, 1, 0, 'M', '0', '0', '0', null, 'files', 'admin', null, null, null, '文件管理目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (9, '试题管理', 0, 9, 'questions', null, 1, 0, 'M', '0', '0', '0', null, 'questions', 'admin', null, null, null, '试题管理目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (10, '考试管理', 0, 10, 'exammanager', null, 1, 0, 'M', '0', '0', '0', null, 'exammanager', 'admin', null, null, null, '考试管理目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (11, '在线考试', 0, 11, 'onlineexam', null, 1, 0, 'M', '0', '0', '0', null, 'onlineexam', 'admin', null, null, null, '在线考试目录');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (100, '用户管理', 1, 1, 'user', 'system/user/index', 1, 0, 'C', '0', '0', '0', 'system:user:list', 'user', 'admin', null, null, null, '用户管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (101, '角色管理', 1, 2, 'role', 'system/role/index', 1, 0, 'C', '0', '0', '0', 'system:role:list', 'peoples', 'admin', null, null, null, '角色管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', 1, 0, 'C', '0', '0', '0', 'system:menu:list', 'tree-table', 'admin', null, null, null, '菜单管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (103, '部门管理', 1, 4, 'dept', 'system/dept/index', 1, 0, 'C', '0', '0', '0', 'system:dept:list', 'tree', 'admin', null, null, null, '部门管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (104, '岗位管理', 1, 5, 'post', 'system/post/index', 1, 0, 'C', '0', '0', '0', 'system:post:list', 'post', 'admin', null, null, null, '岗位管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (105, '字典管理', 1, 6, 'dict', 'system/dict/index', 1, 0, 'C', '0', '0', '0', 'system:dict:list', 'dict', 'admin', null, null, null, '字典管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (106, '参数设置', 1, 7, 'config', 'system/config/index', 1, 0, 'C', '0', '0', '0', 'system:config:list', 'edit', 'admin', null, null, null, '参数设置菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (107, '通知公告', 1, 8, 'notice', 'system/notice/index', 1, 0, 'C', '0', '0', '0', 'system:notice:list', 'message', 'admin', null, null, null, '通知公告菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (108, '日志管理', 1, 9, 'log', null, 1, 0, 'M', '0', '0', '0', null, 'log', 'admin', null, null, null, '日志管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (109, '在线用户', 2, 1, 'online', 'monitor/online/index', 1, 0, 'C', '0', '0', '0', 'monitor:online:list', 'online', 'admin', null, null, null, '在线用户菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (110, '定时任务', 2, 2, 'job', 'monitor/job/index', 1, 0, 'C', '0', '0', '0', 'monitor:job:list', 'job', 'admin', null, null, null, '定时任务菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (111, '数据监控', 2, 3, 'druid', 'monitor/druid/index', 1, 0, 'C', '0', '0', '0', 'monitor:druid:list', 'druid', 'admin', null, null, null, '数据监控菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (112, '服务监控', 2, 4, 'server', 'monitor/server/index', 1, 0, 'C', '0', '0', '0', 'monitor:server:list', 'server', 'admin', null, null, null, '服务监控菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (113, '缓存监控', 2, 5, 'cache', 'monitor/cache/index', 1, 0, 'C', '0', '0', '0', 'monitor:cache:list', 'redis', 'admin', null, null, null, '缓存监控菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (114, '表单构建', 3, 1, 'build', 'tool/build/index', 1, 0, 'C', '0', '0', '0', 'tool:build:list', 'build', 'admin', null, null, null, '表单构建菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (115, '代码生成', 3, 2, 'gen', 'tool/gen/index', 1, 0, 'C', '0', '0', '0', 'tool:gen:list', 'code', 'admin', null, null, null, '代码生成菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (116, '系统接口', 3, 3, 'swagger', 'tool/swagger/index', 1, 0, 'C', '0', '0', '0', 'tool:swagger:list', 'swagger', 'admin', null, null, null, '系统接口菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (121, '人员分组', 1, 11, 'group', 'system/group/index', 1, 0, 'C', '0', '0', null, 'system:group:list', 'group', 'admin', to_date('28-01-2023 19:40:40', 'dd-mm-yyyy hh24:mi:ss'), null, null, '人员分组菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (220, '操作日志', 108, 1, 'operlog', 'monitor/operlog/index', 1, 0, 'C', '0', '0', '0', 'monitor:operlog:list', 'form', 'admin', null, null, null, '操作日志菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (230, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', 1, 0, 'C', '0', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', null, null, null, '登录日志菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (300, '图片管理', 8, 1, 'photo', 'fms/photo/index', 1, 0, 'C', '0', '0', null, 'fms:photo:list', 'photo', 'admin', to_date('14-12-2021 15:24:20', 'dd-mm-yyyy hh24:mi:ss'), null, null, '图片管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (305, '文件管理', 8, 1, 'files', 'fms/files/index', 1, 0, 'C', '0', '0', null, 'fms:files:list', 'film', 'admin', to_date('17-12-2021 23:15:50', 'dd-mm-yyyy hh24:mi:ss'), null, null, '文件管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (320, '题库分类', 9, 1, 'examtype', 'questions/examtype/index', 1, 0, 'C', '0', '0', null, 'questions:examtype:list', 'examtype', 'admin', to_date('14-12-2022 14:28:22', 'dd-mm-yyyy hh24:mi:ss'), null, null, '考试分类菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (325, '题库设置', 9, 2, 'questionsbank', 'questions/questionsbank/index', 1, 0, 'C', '0', '0', null, 'questions:questionsbank:list', 'questionsbank', 'admin', to_date('19-12-2022 14:10:57', 'dd-mm-yyyy hh24:mi:ss'), null, null, '题库管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (330, '考试题目管理', 9, 5, 'examquestions', 'questions/examquestions/index', 1, 0, 'C', '0', '0', null, 'questions:examquestions:list', 'examquestions', 'admin', to_date('27-12-2022 20:08:00', 'dd-mm-yyyy hh24:mi:ss'), null, null, '考试题目管理菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (350, '创建考试', 10, 1, 'examtask', 'exam/examtask/index', 1, 0, 'C', '0', '0', null, 'exam:examtask:list', 'examtask', 'admin', to_date('06-01-2023 13:53:00', 'dd-mm-yyyy hh24:mi:ss'), null, null, '创建考试菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (360, '开始考试', 11, 1, 'examstart', 'onlineexam/examstart/index', 1, 0, 'C', '0', '0', null, 'onlineexam:data:list', 'examstart', 'admin', to_date('06-01-2023 13:53:00', 'dd-mm-yyyy hh24:mi:ss'), null, null, '开始考试菜单');
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1001, '用户查询', 100, 1, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1002, '用户新增', 100, 2, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1003, '用户修改', 100, 3, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1004, '用户删除', 100, 4, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1005, '用户导出', 100, 5, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1006, '用户导入', 100, 6, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:import', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1007, '重置密码', 100, 7, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:resetPwd', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1008, '角色查询', 101, 1, null, null, 1, 0, 'F', '0', '0', '0', 'system:role:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1009, '角色新增', 101, 2, null, null, 1, 0, 'F', '0', '0', '0', 'system:role:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1010, '角色修改', 101, 3, null, null, 1, 0, 'F', '0', '0', '0', 'system:role:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1011, '角色删除', 101, 4, null, null, 1, 0, 'F', '0', '0', '0', 'system:role:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1012, '角色导出', 101, 5, null, null, 1, 0, 'F', '0', '0', '0', 'system:role:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1013, '菜单查询', 102, 1, null, null, 1, 0, 'F', '0', '0', '0', 'system:menu:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1014, '菜单新增', 102, 2, null, null, 1, 0, 'F', '0', '0', '0', 'system:menu:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1015, '菜单修改', 102, 3, null, null, 1, 0, 'F', '0', '0', '0', 'system:menu:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1016, '菜单删除', 102, 4, null, null, 1, 0, 'F', '0', '0', '0', 'system:menu:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1017, '部门查询', 103, 1, null, null, 1, 0, 'F', '0', '0', '0', 'system:dept:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1018, '部门新增', 103, 2, null, null, 1, 0, 'F', '0', '0', '0', 'system:dept:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1019, '部门修改', 103, 3, null, null, 1, 0, 'F', '0', '0', '0', 'system:dept:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1020, '部门删除', 103, 4, null, null, 1, 0, 'F', '0', '0', '0', 'system:dept:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1021, '岗位查询', 104, 1, null, null, 1, 0, 'F', '0', '0', '0', 'system:post:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1022, '岗位新增', 104, 2, null, null, 1, 0, 'F', '0', '0', '0', 'system:post:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1023, '岗位修改', 104, 3, null, null, 1, 0, 'F', '0', '0', '0', 'system:post:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1024, '岗位删除', 104, 4, null, null, 1, 0, 'F', '0', '0', '0', 'system:post:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1025, '岗位导出', 104, 5, null, null, 1, 0, 'F', '0', '0', '0', 'system:post:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1026, '字典查询', 105, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'system:dict:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1027, '字典新增', 105, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'system:dict:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1028, '字典修改', 105, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'system:dict:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1029, '字典删除', 105, 4, '#', null, 1, 0, 'F', '0', '0', '0', 'system:dict:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1030, '字典导出', 105, 5, '#', null, 1, 0, 'F', '0', '0', '0', 'system:dict:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1031, '参数查询', 106, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'system:config:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1032, '参数新增', 106, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'system:config:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1033, '参数修改', 106, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'system:config:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1034, '参数删除', 106, 4, '#', null, 1, 0, 'F', '0', '0', '0', 'system:config:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1035, '参数导出', 106, 5, '#', null, 1, 0, 'F', '0', '0', '0', 'system:config:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1036, '公告查询', 107, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'system:notice:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1037, '公告新增', 107, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'system:notice:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1038, '公告修改', 107, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'system:notice:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1039, '公告删除', 107, 4, '#', null, 1, 0, 'F', '0', '0', '0', 'system:notice:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1040, '操作查询', 220, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:operlog:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1041, '操作删除', 220, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:operlog:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1042, '日志导出', 220, 4, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:operlog:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1043, '登录查询', 230, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:logininfor:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1044, '登录删除', 230, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:logininfor:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1045, '日志导出', 230, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:logininfor:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1046, '在线查询', 109, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:online:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1047, '批量强退', 109, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:online:batchLogout', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1048, '单条强退', 109, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:online:forceLogout', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1049, '任务查询', 110, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:job:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1050, '任务新增', 110, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:job:add', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1051, '任务修改', 110, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:job:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1052, '任务删除', 110, 4, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:job:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1053, '状态修改', 110, 5, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:job:changeStatus', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1054, '任务导出', 110, 7, '#', null, 1, 0, 'F', '0', '0', '0', 'monitor:job:export', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1055, '生成查询', 115, 1, '#', null, 1, 0, 'F', '0', '0', '0', 'tool:gen:query', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1056, '生成修改', 115, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'tool:gen:edit', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1057, '生成删除', 115, 3, '#', null, 1, 0, 'F', '0', '0', '0', 'tool:gen:remove', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1058, '导入代码', 115, 2, '#', null, 1, 0, 'F', '0', '0', '0', 'tool:gen:import', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1059, '预览代码', 115, 4, '#', null, 1, 0, 'F', '0', '0', '0', 'tool:gen:preview', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1060, '生成代码', 115, 5, '#', null, 1, 0, 'F', '0', '0', '0', 'tool:gen:code', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1061, '部门导入', 103, 5, null, null, 1, 0, 'F', '0', '0', '0', 'system:dept:wechatin', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1062, '用户导入', 100, 7, null, null, 1, 0, 'F', '0', '0', '0', 'system:user:wechatin', '#', 'admin', null, null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1080, '人员分组查询', 121, 1, '#', null, 1, 0, 'F', '0', '0', null, 'system:group:query', '#', 'admin', to_date('28-01-2023 20:02:09', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1081, '人员分组新增', 121, 2, '#', null, 1, 0, 'F', '0', '0', null, 'system:group:add', '#', 'admin', to_date('28-01-2023 20:02:09', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1082, '人员分组修改', 121, 3, '#', null, 1, 0, 'F', '0', '0', null, 'system:group:edit', '#', 'admin', to_date('28-01-2023 20:02:09', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1083, '人员分组删除', 121, 4, '#', null, 1, 0, 'F', '0', '0', null, 'system:group:remove', '#', 'admin', to_date('28-01-2023 20:02:10', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1084, '人员分组导出', 121, 5, '#', null, 1, 0, 'F', '0', '0', null, 'system:group:export', '#', 'admin', to_date('28-01-2023 20:02:10', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1390, '图片管理查询', 300, 1, '#', null, 1, 0, 'F', '0', '0', null, 'fms:photo:query', '#', 'admin', to_date('14-12-2021 15:28:21', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1391, '图片管理新增', 300, 2, '#', null, 1, 0, 'F', '0', '0', null, 'fms:photo:add', '#', 'admin', to_date('14-12-2021 15:28:21', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1392, '图片管理修改', 300, 3, '#', null, 1, 0, 'F', '0', '0', null, 'fms:photo:edit', '#', 'admin', to_date('14-12-2021 15:28:21', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1393, '图片管理删除', 300, 4, '#', null, 1, 0, 'F', '0', '0', null, 'fms:photo:remove', '#', 'admin', to_date('14-12-2021 15:28:21', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1394, '图片管理下载', 300, 5, '#', null, 1, 0, 'F', '0', '0', null, 'fms:photo:export', '#', 'admin', to_date('14-12-2021 15:28:21', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1420, '文件管理查询', 305, 1, '#', null, 1, 0, 'F', '0', '0', null, 'fms:files:query', '#', 'admin', to_date('17-12-2021 23:18:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1421, '文件管理新增', 305, 2, '#', null, 1, 0, 'F', '0', '0', null, 'fms:files:add', '#', 'admin', to_date('17-12-2021 23:18:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1422, '文件管理修改', 305, 3, '#', null, 1, 0, 'F', '0', '0', null, 'fms:files:edit', '#', 'admin', to_date('17-12-2021 23:18:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1423, '文件管理删除', 305, 4, '#', null, 1, 0, 'F', '0', '0', null, 'fms:files:remove', '#', 'admin', to_date('17-12-2021 23:18:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1424, '文件管理下载', 305, 5, '#', null, 1, 0, 'F', '0', '0', null, 'fms:files:export', '#', 'admin', to_date('17-12-2021 23:18:57', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1501, '考试分类查询', 320, 1, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examtype:query', '#', 'admin', to_date('14-12-2022 14:32:15', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1502, '考试分类新增', 320, 2, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examtype:add', '#', 'admin', to_date('14-12-2022 14:32:15', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1503, '考试分类修改', 320, 3, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examtype:edit', '#', 'admin', to_date('14-12-2022 14:32:15', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1504, '考试分类删除', 320, 4, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examtype:remove', '#', 'admin', to_date('14-12-2022 14:32:16', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1505, '考试分类导出', 320, 5, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examtype:export', '#', 'admin', to_date('14-12-2022 14:32:16', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1525, '题库管理查询', 325, 1, '#', null, 1, 0, 'F', '0', '0', null, 'questions:questionsbank:query', '#', 'admin', to_date('19-12-2022 14:10:57', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1526, '题库管理新增', 325, 2, '#', null, 1, 0, 'F', '0', '0', null, 'questions:questionsbank:add', '#', 'admin', to_date('19-12-2022 14:10:57', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1527, '题库管理修改', 325, 3, '#', null, 1, 0, 'F', '0', '0', null, 'questions:questionsbank:edit', '#', 'admin', to_date('19-12-2022 14:10:58', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1528, '题库管理删除', 325, 4, '#', null, 1, 0, 'F', '0', '0', null, 'questions:questionsbank:remove', '#', 'admin', to_date('19-12-2022 14:10:58', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1529, '题库管理导出', 325, 5, '#', null, 1, 0, 'F', '0', '0', null, 'questions:questionsbank:export', '#', 'admin', to_date('19-12-2022 14:10:58', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1541, '考试题目查询', 330, 1, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examquestions:query', '#', 'admin', to_date('27-12-2022 20:10:55', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1542, '考试题目新增', 330, 2, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examquestions:add', '#', 'admin', to_date('27-12-2022 20:10:55', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1543, '考试题目修改', 330, 3, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examquestions:edit', '#', 'admin', to_date('27-12-2022 20:10:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1544, '考试题目删除', 330, 4, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examquestions:remove', '#', 'admin', to_date('27-12-2022 20:10:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1545, '考试题目导出', 330, 5, '#', null, 1, 0, 'F', '0', '0', null, 'questions:examquestions:export', '#', 'admin', to_date('27-12-2022 20:10:56', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1601, '创建考试查询', 350, 1, '#', null, 1, 0, 'F', '0', '0', null, 'exam:examtask:query', '#', 'admin', to_date('06-01-2023 13:56:00', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1602, '创建考试新增', 350, 2, '#', null, 1, 0, 'F', '0', '0', null, 'exam:examtask:add', '#', 'admin', to_date('06-01-2023 13:56:01', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1603, '创建考试修改', 350, 3, '#', null, 1, 0, 'F', '0', '0', null, 'exam:examtask:edit', '#', 'admin', to_date('06-01-2023 13:56:01', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1604, '创建考试删除', 350, 4, '#', null, 1, 0, 'F', '0', '0', null, 'exam:examtask:remove', '#', 'admin', to_date('06-01-2023 13:56:01', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
insert into SYS_MENU (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, del_flag, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values (1605, '创建考试导出', 350, 5, '#', null, 1, 0, 'F', '0', '0', null, 'exam:examtask:export', '#', 'admin', to_date('06-01-2023 13:56:01', 'dd-mm-yyyy hh24:mi:ss'), null, null, null);
|
||||
commit;
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-用户和角色关联表数据
|
||||
-- ----------------------------
|
||||
insert into SYS_USER_ROLE (user_id, role_id)
|
||||
values (1, 1);
|
||||
insert into SYS_USER_ROLE (user_id, role_id)
|
||||
values (2, 2);
|
||||
insert into SYS_USER_ROLE (user_id, role_id)
|
||||
values (3, 2);
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-角色和菜单关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_role_menu values ('2', '1');
|
||||
insert into sys_role_menu values ('2', '2');
|
||||
insert into sys_role_menu values ('2', '3');
|
||||
insert into sys_role_menu values ('2', '4');
|
||||
insert into sys_role_menu values ('2', '100');
|
||||
insert into sys_role_menu values ('2', '101');
|
||||
insert into sys_role_menu values ('2', '102');
|
||||
insert into sys_role_menu values ('2', '103');
|
||||
insert into sys_role_menu values ('2', '104');
|
||||
insert into sys_role_menu values ('2', '105');
|
||||
insert into sys_role_menu values ('2', '106');
|
||||
insert into sys_role_menu values ('2', '107');
|
||||
insert into sys_role_menu values ('2', '108');
|
||||
insert into sys_role_menu values ('2', '109');
|
||||
insert into sys_role_menu values ('2', '110');
|
||||
insert into sys_role_menu values ('2', '111');
|
||||
insert into sys_role_menu values ('2', '112');
|
||||
insert into sys_role_menu values ('2', '113');
|
||||
insert into sys_role_menu values ('2', '114');
|
||||
insert into sys_role_menu values ('2', '115');
|
||||
insert into sys_role_menu values ('2', '116');
|
||||
insert into sys_role_menu values ('2', '500');
|
||||
insert into sys_role_menu values ('2', '501');
|
||||
insert into sys_role_menu values ('2', '1000');
|
||||
insert into sys_role_menu values ('2', '1001');
|
||||
insert into sys_role_menu values ('2', '1002');
|
||||
insert into sys_role_menu values ('2', '1003');
|
||||
insert into sys_role_menu values ('2', '1004');
|
||||
insert into sys_role_menu values ('2', '1005');
|
||||
insert into sys_role_menu values ('2', '1006');
|
||||
insert into sys_role_menu values ('2', '1007');
|
||||
insert into sys_role_menu values ('2', '1008');
|
||||
insert into sys_role_menu values ('2', '1009');
|
||||
insert into sys_role_menu values ('2', '1010');
|
||||
insert into sys_role_menu values ('2', '1011');
|
||||
insert into sys_role_menu values ('2', '1012');
|
||||
insert into sys_role_menu values ('2', '1013');
|
||||
insert into sys_role_menu values ('2', '1014');
|
||||
insert into sys_role_menu values ('2', '1015');
|
||||
insert into sys_role_menu values ('2', '1016');
|
||||
insert into sys_role_menu values ('2', '1017');
|
||||
insert into sys_role_menu values ('2', '1018');
|
||||
insert into sys_role_menu values ('2', '1019');
|
||||
insert into sys_role_menu values ('2', '1020');
|
||||
insert into sys_role_menu values ('2', '1021');
|
||||
insert into sys_role_menu values ('2', '1022');
|
||||
insert into sys_role_menu values ('2', '1023');
|
||||
insert into sys_role_menu values ('2', '1024');
|
||||
insert into sys_role_menu values ('2', '1025');
|
||||
insert into sys_role_menu values ('2', '1026');
|
||||
insert into sys_role_menu values ('2', '1027');
|
||||
insert into sys_role_menu values ('2', '1028');
|
||||
insert into sys_role_menu values ('2', '1029');
|
||||
insert into sys_role_menu values ('2', '1030');
|
||||
insert into sys_role_menu values ('2', '1031');
|
||||
insert into sys_role_menu values ('2', '1032');
|
||||
insert into sys_role_menu values ('2', '1033');
|
||||
insert into sys_role_menu values ('2', '1034');
|
||||
insert into sys_role_menu values ('2', '1035');
|
||||
insert into sys_role_menu values ('2', '1036');
|
||||
insert into sys_role_menu values ('2', '1037');
|
||||
insert into sys_role_menu values ('2', '1038');
|
||||
insert into sys_role_menu values ('2', '1039');
|
||||
insert into sys_role_menu values ('2', '1040');
|
||||
insert into sys_role_menu values ('2', '1041');
|
||||
insert into sys_role_menu values ('2', '1042');
|
||||
insert into sys_role_menu values ('2', '1043');
|
||||
insert into sys_role_menu values ('2', '1044');
|
||||
insert into sys_role_menu values ('2', '1045');
|
||||
insert into sys_role_menu values ('2', '1046');
|
||||
insert into sys_role_menu values ('2', '1047');
|
||||
insert into sys_role_menu values ('2', '1048');
|
||||
insert into sys_role_menu values ('2', '1049');
|
||||
insert into sys_role_menu values ('2', '1050');
|
||||
insert into sys_role_menu values ('2', '1051');
|
||||
insert into sys_role_menu values ('2', '1052');
|
||||
insert into sys_role_menu values ('2', '1053');
|
||||
insert into sys_role_menu values ('2', '1054');
|
||||
insert into sys_role_menu values ('2', '1055');
|
||||
insert into sys_role_menu values ('2', '1056');
|
||||
insert into sys_role_menu values ('2', '1057');
|
||||
insert into sys_role_menu values ('2', '1058');
|
||||
insert into sys_role_menu values ('2', '1059');
|
||||
insert into sys_role_menu values ('2', '1060');
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-角色和部门关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_role_dept values ('2', '100');
|
||||
insert into sys_role_dept values ('2', '101');
|
||||
insert into sys_role_dept values ('2', '105');
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-用户与岗位关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_user_post values ('1', '1');
|
||||
insert into sys_user_post values ('2', '2');
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-字典类型表
|
||||
-- ----------------------------
|
||||
insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate, '', null, '用户性别列表');
|
||||
insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate, '', null, '菜单状态列表');
|
||||
insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', sysdate, '', null, '系统开关列表');
|
||||
insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', sysdate, '', null, '任务状态列表');
|
||||
insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', sysdate, '', null, '任务分组列表');
|
||||
insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', sysdate, '', null, '系统是否列表');
|
||||
insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', sysdate, '', null, '通知类型列表');
|
||||
insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', sysdate, '', null, '通知状态列表');
|
||||
insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', sysdate, '', null, '操作类型列表');
|
||||
insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', sysdate, '', null, '登录状态列表');
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-字典数据表
|
||||
-- ----------------------------
|
||||
insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate, '', null, '性别男');
|
||||
insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate, '', null, '性别女');
|
||||
insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate, '', null, '性别未知');
|
||||
insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate, '', null, '显示菜单');
|
||||
insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '隐藏菜单');
|
||||
insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate, '', null, '正常状态');
|
||||
insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '停用状态');
|
||||
insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate, '', null, '正常状态');
|
||||
insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '停用状态');
|
||||
insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate, '', null, '默认分组');
|
||||
insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate, '', null, '系统分组');
|
||||
insert into sys_dict_data values(12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate, '', null, '系统默认是');
|
||||
insert into sys_dict_data values(13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '系统默认否');
|
||||
insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate, '', null, '通知');
|
||||
insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate, '', null, '公告');
|
||||
insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate, '', null, '正常状态');
|
||||
insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '关闭状态');
|
||||
insert into sys_dict_data values(18, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate, '', null, '新增操作');
|
||||
insert into sys_dict_data values(19, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate, '', null, '修改操作');
|
||||
insert into sys_dict_data values(20, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '删除操作');
|
||||
insert into sys_dict_data values(21, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate, '', null, '授权操作');
|
||||
insert into sys_dict_data values(22, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate, '', null, '导出操作');
|
||||
insert into sys_dict_data values(23, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate, '', null, '导入操作');
|
||||
insert into sys_dict_data values(24, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '强退操作');
|
||||
insert into sys_dict_data values(25, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate, '', null, '生成操作');
|
||||
insert into sys_dict_data values(26, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '清空操作');
|
||||
insert into sys_dict_data values(27, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate, '', null, '正常状态');
|
||||
insert into sys_dict_data values(28, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate, '', null, '停用状态');
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-参数配置表
|
||||
-- ----------------------------
|
||||
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate, '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
|
||||
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate, '', null, '初始化密码 123456' );
|
||||
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate, '', null, '深色主题theme-dark,浅色主题theme-light' );
|
||||
insert into sys_config values(4, '账号自助-验证码开关', 'sys.account.captchaOnOff', 'true', 'Y', 'admin', sysdate, '', null, '是否开启登录验证码功能(true开启,false关闭)');
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-公告信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_notice values('1', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate, '', null, '管理员');
|
||||
insert into sys_notice values('2', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate, '', null, '管理员');
|
||||
commit;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,44 @@
|
|||
######################################################################
|
||||
# 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
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
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.
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
## 平台简介
|
||||
|
||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||
|
||||
* 前端采用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
|
||||
|
||||
## 演示图
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
## 若依前后端分离交流群
|
||||
|
||||
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) 点击按钮入群。
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean package -Dmaven.test.skip=true
|
||||
|
||||
pause
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
@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
|
||||
Binary file not shown.
|
|
@ -0,0 +1,199 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</parent>
|
||||
<!-- <groupId>com.hig</groupId> -->
|
||||
<artifactId>hig-application</artifactId>
|
||||
<name>hig-application</name>
|
||||
<description>应用扩展包</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<fastjson.version>1.2.47</fastjson.version>
|
||||
<lombok.version>1.18.4</lombok.version>
|
||||
<oracle.version>12.2.0.1.0</oracle.version>
|
||||
<druid.version>1.1.13</druid.version>
|
||||
<mybatis.version>2.1.1</mybatis.version>
|
||||
<gson.version>2.8.6</gson.version>
|
||||
<jasypt.version>3.0.2</jasypt.version>
|
||||
<quartz.version>2.3.2</quartz.version>
|
||||
<httpclient.version>4.5.10</httpclient.version>
|
||||
<httpmime.version>4.5.10</httpmime.version>
|
||||
<httpcore.version>4.4.12</httpcore.version>
|
||||
<commons-codec.version>1.9</commons-codec.version>
|
||||
<commons-logging.version>1.2</commons-logging.version>
|
||||
<commons-io.version>2.8.0</commons-io.version>
|
||||
<commons-lang3.version>3.4</commons-lang3.version>
|
||||
<commons-lang.version>3.4</commons-lang.version>
|
||||
<weixin-java-cp.version>4.1.0</weixin-java-cp.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>log4j-to-slf4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- 发war包的时侯排除tomcat -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>${gson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>${jasypt.version}</version>
|
||||
</dependency>
|
||||
<!-- 添加Scheduled坐标 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
<!-- Sprng tx 坐标 这个是控制事务的-->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<!--oracle驱动-->
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>${oracle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<!-- Quartz坐标 -->
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
<version>${quartz.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${httpclient.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpmime</artifactId>
|
||||
<version>${httpmime.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>${httpcore.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream -->
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.14</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${commons-codec.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>${commons-logging.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-cp</artifactId>
|
||||
<version>${weixin-java-cp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20210307</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>hig-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
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("保存成功");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
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<ExamTaskGroup> list = examTaskGroupService.selectExamTaskGroupList(examTaskGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出任务分组列表
|
||||
*/
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamTaskGroup examTaskGroup)
|
||||
{
|
||||
List<ExamTaskGroup> list = examTaskGroupService.selectExamTaskGroupList(examTaskGroup);
|
||||
ExcelUtil<ExamTaskGroup> util = new ExcelUtil<ExamTaskGroup>(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<ExamTaskGroup> 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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
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}")
|
||||
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<ExamTaskManager> 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<ExamTaskManager> list = examTaskManagerService.selectExamTaskManagerList(examTaskManager);
|
||||
ExcelUtil<ExamTaskManager> util = new ExcelUtil<ExamTaskManager>(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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
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<ExamTaskPerson> 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<ExamTaskPerson> list = examTaskPersonService.selectExamTaskPersonList(examTaskPerson);
|
||||
ExcelUtil<ExamTaskPerson> util = new ExcelUtil<ExamTaskPerson>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
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<ExamTaskPicture> 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<ExamTaskPicture> list = examTaskPictureService.selectExamTaskPictureList(examTaskPicture);
|
||||
ExcelUtil<ExamTaskPicture> util = new ExcelUtil<ExamTaskPicture>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
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<ExamTaskQuestions> list = examTaskQuestionsService.selectExamTaskQuestionsList(examTaskQuestions);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出任务题目列表
|
||||
*/
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamTaskQuestions examTaskQuestions)
|
||||
{
|
||||
List<ExamTaskQuestions> list = examTaskQuestionsService.selectExamTaskQuestionsList(examTaskQuestions);
|
||||
ExcelUtil<ExamTaskQuestions> util = new ExcelUtil<ExamTaskQuestions>(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<ExamTaskQuestions> 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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hig.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExamTaskData {
|
||||
private ExamTaskManager examTaskManager;
|
||||
private List<ExamTaskGroup> taskGroupList;
|
||||
private List<ExamTaskQuestions> taskQuestionsList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,249 @@
|
|||
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 = "图片链接")
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
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<ExamTaskGroup> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.hig.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.exam.domain.ExamTaskManager;
|
||||
|
||||
/**
|
||||
* 创建考试Mapper接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-01-06
|
||||
*/
|
||||
public interface ExamTaskManagerMapper
|
||||
{
|
||||
/**
|
||||
* 查询创建考试
|
||||
*
|
||||
* @param examCode 创建考试ID
|
||||
* @return 创建考试
|
||||
*/
|
||||
public ExamTaskManager selectExamTaskManagerById(String examCode);
|
||||
|
||||
|
||||
/**
|
||||
* 查询创建考试列表
|
||||
*
|
||||
* @param examTaskManager 创建考试
|
||||
* @return 创建考试集合
|
||||
*/
|
||||
public List<ExamTaskManager> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
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<ExamTaskPerson> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
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<ExamTaskPicture> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
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<ExamTaskQuestions> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.hig.exam.service;
|
||||
|
||||
import com.hig.exam.domain.ExamTaskData;
|
||||
|
||||
public interface IExamTaskDataService {
|
||||
public int saveData(ExamTaskData examTaskData) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
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<ExamTaskGroup> 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<ExamTaskGroup> examTaskGroupList) throws Exception;
|
||||
|
||||
/**
|
||||
* 批量删除任务分组
|
||||
*
|
||||
* @param examCodes 需要删除的任务分组ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskGroupByIds(String[] examCodes);
|
||||
|
||||
/**
|
||||
* 删除任务分组信息
|
||||
*
|
||||
* @param examCode 任务分组ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskGroupById(String examCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.hig.exam.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.exam.domain.ExamTaskManager;
|
||||
|
||||
/**
|
||||
* 创建考试Service接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-01-06
|
||||
*/
|
||||
public interface IExamTaskManagerService
|
||||
{
|
||||
/**
|
||||
* 查询创建考试
|
||||
*
|
||||
* @param examCode 创建考试ID
|
||||
* @return 创建考试
|
||||
*/
|
||||
public ExamTaskManager selectExamTaskManagerById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询创建考试列表
|
||||
*
|
||||
* @param examTaskManager 创建考试
|
||||
* @return 创建考试集合
|
||||
*/
|
||||
public List<ExamTaskManager> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
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<ExamTaskPerson> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
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<ExamTaskPicture> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
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<ExamTaskQuestions> selectExamTaskQuestionsList(ExamTaskQuestions examTaskQuestions);
|
||||
|
||||
/**
|
||||
* 新增任务题目
|
||||
*
|
||||
* @param examTaskQuestions 任务题目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamTaskQuestions(ExamTaskQuestions examTaskQuestions);
|
||||
|
||||
public int batchUpdateExamTaskQuestions(List<ExamTaskQuestions> 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);
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
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<ExamTaskQuestions> 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<ExamTaskGroup> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
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<ExamTaskGroup> 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<ExamTaskGroup> 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
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.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<ExamTaskManager> 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
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<ExamTaskPerson> 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
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<ExamTaskPicture> 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
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<ExamTaskQuestions> 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<ExamTaskQuestions> 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.hig.fms.common;
|
||||
|
||||
public class NotSameFileExpection extends Exception {
|
||||
public NotSameFileExpection() {
|
||||
super("File MD5 Different");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
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<FmsFiles> 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<FmsFiles> list = fmsFilesService.selectFmsFilesList(fmsFiles);
|
||||
ExcelUtil<FmsFiles> util = new ExcelUtil<FmsFiles>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
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<FmsPhoto> 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<FmsPhoto> list = fmsPhotoService.selectFmsPhotoList(fmsPhoto);
|
||||
ExcelUtil<FmsPhoto> util = new ExcelUtil<FmsPhoto>(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
|
||||
{
|
||||
count = 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);
|
||||
|
||||
return toAjax(fmsPhotoService.insertFmsPhoto(fmsPhoto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改图片管理
|
||||
*/
|
||||
@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));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
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<Map<String, Object>> model) {
|
||||
this.setCode(200);
|
||||
this.setModel(model);
|
||||
}
|
||||
|
||||
public StdOut(int code, List<Map<String, Object>> model) {
|
||||
this.setCode(code);
|
||||
this.setModel(model);
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return JSON.toJSONString(this);
|
||||
}
|
||||
|
||||
public Object getModel() {
|
||||
return this.model;
|
||||
}
|
||||
|
||||
public void setModel(Object model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.hig.fms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.fms.domain.FmsFiles;
|
||||
|
||||
/**
|
||||
* 文件管理Mapper接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2021-12-17
|
||||
*/
|
||||
public interface FmsFilesMapper
|
||||
{
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param fileId 文件管理ID
|
||||
* @return 文件管理
|
||||
*/
|
||||
public FmsFiles selectFmsFilesById(Long fileId);
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 文件管理集合
|
||||
*/
|
||||
public List<FmsFiles> selectFmsFilesList(FmsFiles fmsFiles);
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFmsFiles(FmsFiles fmsFiles);
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFmsFiles(FmsFiles fmsFiles);
|
||||
|
||||
/**
|
||||
* 删除文件管理
|
||||
*
|
||||
* @param fileId 文件管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsFilesById(Long fileId);
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param fileIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsFilesByIds(Long[] fileIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.hig.fms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.fms.domain.FmsPhoto;
|
||||
|
||||
/**
|
||||
* 图片管理Mapper接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2021-12-14
|
||||
*/
|
||||
public interface FmsPhotoMapper
|
||||
{
|
||||
/**
|
||||
* 查询图片管理
|
||||
*
|
||||
* @param photoId 图片管理ID
|
||||
* @return 图片管理
|
||||
*/
|
||||
public FmsPhoto selectFmsPhotoById(Long photoId);
|
||||
|
||||
/**
|
||||
* 查询图片管理列表
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 图片管理集合
|
||||
*/
|
||||
public List<FmsPhoto> selectFmsPhotoList(FmsPhoto fmsPhoto);
|
||||
|
||||
/**
|
||||
* 新增图片管理
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFmsPhoto(FmsPhoto fmsPhoto);
|
||||
|
||||
/**
|
||||
* 修改图片管理
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFmsPhoto(FmsPhoto fmsPhoto);
|
||||
|
||||
/**
|
||||
* 删除图片管理
|
||||
*
|
||||
* @param photoId 图片管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsPhotoById(Long photoId);
|
||||
|
||||
/**
|
||||
* 批量删除图片管理
|
||||
*
|
||||
* @param photoIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsPhotoByIds(Long[] photoIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hig.fms.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.hig.fms.common.NotSameFileExpection;
|
||||
import com.hig.fms.domain.MultipartFileParam;
|
||||
|
||||
|
||||
public interface ChunkService {
|
||||
public String chunkUploadByMappedByteBuffer(MultipartFileParam param, String filePath) throws IOException, NotSameFileExpection;
|
||||
|
||||
public void renameFile(File toBeRenamed, String toFileNewName);
|
||||
|
||||
public boolean checkUploadStatus(MultipartFileParam param, String fileName, String filePath) throws IOException;
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.hig.fms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.fms.domain.FmsFiles;
|
||||
|
||||
/**
|
||||
* 文件管理Service接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2021-12-17
|
||||
*/
|
||||
public interface IFmsFilesService
|
||||
{
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param fileId 文件管理ID
|
||||
* @return 文件管理
|
||||
*/
|
||||
public FmsFiles selectFmsFilesById(Long fileId);
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 文件管理集合
|
||||
*/
|
||||
public List<FmsFiles> selectFmsFilesList(FmsFiles fmsFiles);
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFmsFiles(FmsFiles fmsFiles);
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFmsFiles(FmsFiles fmsFiles);
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param fileIds 需要删除的文件管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsFilesByIds(Long[] fileIds);
|
||||
|
||||
/**
|
||||
* 删除文件管理信息
|
||||
*
|
||||
* @param fileId 文件管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsFilesById(Long fileId);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.hig.fms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.fms.domain.FmsPhoto;
|
||||
|
||||
/**
|
||||
* 图片管理Service接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2021-12-14
|
||||
*/
|
||||
public interface IFmsPhotoService
|
||||
{
|
||||
/**
|
||||
* 查询图片管理
|
||||
*
|
||||
* @param photoId 图片管理ID
|
||||
* @return 图片管理
|
||||
*/
|
||||
public FmsPhoto selectFmsPhotoById(Long photoId);
|
||||
|
||||
/**
|
||||
* 查询图片管理列表
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 图片管理集合
|
||||
*/
|
||||
public List<FmsPhoto> selectFmsPhotoList(FmsPhoto fmsPhoto);
|
||||
|
||||
/**
|
||||
* 新增图片管理
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFmsPhoto(FmsPhoto fmsPhoto);
|
||||
|
||||
/**
|
||||
* 修改图片管理
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFmsPhoto(FmsPhoto fmsPhoto);
|
||||
|
||||
/**
|
||||
* 批量删除图片管理
|
||||
*
|
||||
* @param photoIds 需要删除的图片管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsPhotoByIds(Long[] photoIds);
|
||||
|
||||
/**
|
||||
* 删除图片管理信息
|
||||
*
|
||||
* @param photoId 图片管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFmsPhotoById(Long photoId);
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.hig.fms.service.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.hig.fms.common.NotSameFileExpection;
|
||||
import com.hig.fms.domain.MultipartFileParam;
|
||||
import com.hig.fms.service.ChunkService;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
|
||||
@Service
|
||||
public class ChunkServiceImpl implements ChunkService {
|
||||
|
||||
@Override
|
||||
public String chunkUploadByMappedByteBuffer(MultipartFileParam param, String filePath) throws IOException, NotSameFileExpection {
|
||||
// TODO Auto-generated method stub
|
||||
if (param.getTaskId() == null || "".equals(param.getTaskId())) {
|
||||
param.setTaskId(UUID.randomUUID().toString());
|
||||
}
|
||||
|
||||
String fileName = param.getFile().getOriginalFilename();
|
||||
String tempFileName = param.getTaskId() + fileName.substring(fileName.lastIndexOf(".")) + "_tmp";
|
||||
File fileDir = new File(filePath);
|
||||
if (!fileDir.exists()) {
|
||||
fileDir.mkdirs();
|
||||
}
|
||||
File tempFile = new File(filePath, tempFileName);
|
||||
//第一步 打开将要写入的文件
|
||||
RandomAccessFile raf = new RandomAccessFile(tempFile, "rw");
|
||||
//第二步 打开通道
|
||||
FileChannel fileChannel = raf.getChannel();
|
||||
//第三步 计算偏移量
|
||||
long position = (param.getChunkNumber() - 1) * param.getChunkSize();
|
||||
//第四步 获取分片数据
|
||||
byte[] fileData = param.getFile().getBytes();
|
||||
//第五步 写入数据
|
||||
fileChannel.position(position);
|
||||
fileChannel.write(ByteBuffer.wrap(fileData));
|
||||
fileChannel.force(true);
|
||||
fileChannel.close();
|
||||
raf.close();
|
||||
//判断是否完成文件的传输并进行校验与重命名
|
||||
boolean isComplete = checkUploadStatus(param, fileName, filePath);
|
||||
if (isComplete) {
|
||||
FileInputStream fileInputStream = new FileInputStream(tempFile.getPath());
|
||||
String md5 = DigestUtils.md5Hex(fileInputStream);
|
||||
fileInputStream.close();
|
||||
if (StringUtils.isNotBlank(md5) && !md5.equals(param.getIdentifier())) {
|
||||
throw new NotSameFileExpection();
|
||||
}
|
||||
renameFile(tempFile, fileName);
|
||||
return fileName;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renameFile(File toBeRenamed, String toFileNewName) {
|
||||
// TODO Auto-generated method stub
|
||||
if (!toBeRenamed.exists() || toBeRenamed.isDirectory()) {
|
||||
System.err.println("文件不存在");
|
||||
return;
|
||||
}
|
||||
String p = toBeRenamed.getParent();
|
||||
File newFile = new File(p + File.separatorChar + toFileNewName);
|
||||
toBeRenamed.renameTo(newFile);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkUploadStatus(MultipartFileParam param, String fileName, String filePath) throws IOException {
|
||||
// TODO Auto-generated method stub
|
||||
File confFile = new File(filePath, fileName + ".conf");
|
||||
RandomAccessFile confAccessFile = new RandomAccessFile(confFile, "rw");
|
||||
//设置文件长度
|
||||
confAccessFile.setLength(param.getTotalChunks());
|
||||
//设置起始偏移量
|
||||
confAccessFile.seek(param.getChunkNumber() - 1);
|
||||
//将指定的一个字节写入文件中 127,
|
||||
confAccessFile.write(Byte.MAX_VALUE);
|
||||
byte[] completeStatusList = FileUtils.readFileToByteArray(confFile);
|
||||
confAccessFile.close();//不关闭会造成无法占用
|
||||
//创建conf文件文件长度为总分片数,每上传一个分块即向conf文件中写入一个127,那么没上传的位置就是默认的0,已上传的就是127
|
||||
for (int i = 0; i < completeStatusList.length; i++) {
|
||||
if (completeStatusList[i] != Byte.MAX_VALUE) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
confFile.delete();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.hig.fms.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hig.fms.mapper.FmsFilesMapper;
|
||||
import com.hig.fms.domain.FmsFiles;
|
||||
import com.hig.fms.service.IFmsFilesService;
|
||||
|
||||
/**
|
||||
* 文件管理Service业务层处理
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2021-12-17
|
||||
*/
|
||||
@Service
|
||||
public class FmsFilesServiceImpl implements IFmsFilesService
|
||||
{
|
||||
@Autowired
|
||||
private FmsFilesMapper fmsFilesMapper;
|
||||
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param fileId 文件管理ID
|
||||
* @return 文件管理
|
||||
*/
|
||||
@Override
|
||||
public FmsFiles selectFmsFilesById(Long fileId)
|
||||
{
|
||||
return fmsFilesMapper.selectFmsFilesById(fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 文件管理
|
||||
*/
|
||||
@Override
|
||||
public List<FmsFiles> selectFmsFilesList(FmsFiles fmsFiles)
|
||||
{
|
||||
return fmsFilesMapper.selectFmsFilesList(fmsFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertFmsFiles(FmsFiles fmsFiles)
|
||||
{
|
||||
return fmsFilesMapper.insertFmsFiles(fmsFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param fmsFiles 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateFmsFiles(FmsFiles fmsFiles)
|
||||
{
|
||||
return fmsFilesMapper.updateFmsFiles(fmsFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param fileIds 需要删除的文件管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFmsFilesByIds(Long[] fileIds)
|
||||
{
|
||||
return fmsFilesMapper.deleteFmsFilesByIds(fileIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件管理信息
|
||||
*
|
||||
* @param fileId 文件管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFmsFilesById(Long fileId)
|
||||
{
|
||||
return fmsFilesMapper.deleteFmsFilesById(fileId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.hig.fms.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hig.fms.mapper.FmsPhotoMapper;
|
||||
import com.hig.fms.domain.FmsPhoto;
|
||||
import com.hig.fms.service.IFmsPhotoService;
|
||||
|
||||
/**
|
||||
* 图片管理Service业务层处理
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2021-12-14
|
||||
*/
|
||||
@Service
|
||||
public class FmsPhotoServiceImpl implements IFmsPhotoService
|
||||
{
|
||||
@Autowired
|
||||
private FmsPhotoMapper fmsPhotoMapper;
|
||||
|
||||
/**
|
||||
* 查询图片管理
|
||||
*
|
||||
* @param photoId 图片管理ID
|
||||
* @return 图片管理
|
||||
*/
|
||||
@Override
|
||||
public FmsPhoto selectFmsPhotoById(Long photoId)
|
||||
{
|
||||
return fmsPhotoMapper.selectFmsPhotoById(photoId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询图片管理列表
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 图片管理
|
||||
*/
|
||||
@Override
|
||||
public List<FmsPhoto> selectFmsPhotoList(FmsPhoto fmsPhoto)
|
||||
{
|
||||
return fmsPhotoMapper.selectFmsPhotoList(fmsPhoto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增图片管理
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertFmsPhoto(FmsPhoto fmsPhoto)
|
||||
{
|
||||
return fmsPhotoMapper.insertFmsPhoto(fmsPhoto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改图片管理
|
||||
*
|
||||
* @param fmsPhoto 图片管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateFmsPhoto(FmsPhoto fmsPhoto)
|
||||
{
|
||||
return fmsPhotoMapper.updateFmsPhoto(fmsPhoto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除图片管理
|
||||
*
|
||||
* @param photoIds 需要删除的图片管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFmsPhotoByIds(Long[] photoIds)
|
||||
{
|
||||
return fmsPhotoMapper.deleteFmsPhotoByIds(photoIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除图片管理信息
|
||||
*
|
||||
* @param photoId 图片管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFmsPhotoById(Long photoId)
|
||||
{
|
||||
return fmsPhotoMapper.deleteFmsPhotoById(photoId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.hig.fms.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);
|
||||
// String realpath = "D:/image/photo/" + module +"/";
|
||||
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 {
|
||||
/*IOUtils.closeQuietly(input);
|
||||
IOUtils.closeQuietly(fos);*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.hig.fms.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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.hig.onlineexam.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.onlineexam.domain.ExamFinishAnswer;
|
||||
import com.hig.onlineexam.service.IExamFinishAnswerService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 考试成绩Controller
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/onlineexam/finishanswer")
|
||||
public class ExamFinishAnswerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamFinishAnswerService examFinishAnswerService;
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:finishanswer:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
startPage();
|
||||
List<ExamFinishAnswer> list = examFinishAnswerService.selectExamFinishAnswerList(examFinishAnswer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考试成绩列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:finishanswer:export')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
List<ExamFinishAnswer> list = examFinishAnswerService.selectExamFinishAnswerList(examFinishAnswer);
|
||||
ExcelUtil<ExamFinishAnswer> util = new ExcelUtil<ExamFinishAnswer>(ExamFinishAnswer.class);
|
||||
return util.exportExcel(list, "考试成绩数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试成绩详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:finishanswer:query')")
|
||||
@GetMapping(value = "/{examCode}")
|
||||
public AjaxResult getInfo(@PathVariable("examCode") String examCode)
|
||||
{
|
||||
return AjaxResult.success(examFinishAnswerService.selectExamFinishAnswerById(examCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:finishanswer:add')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
return toAjax(examFinishAnswerService.insertExamFinishAnswer(examFinishAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 维护考试成绩
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
System.out.println("examFinishAnswer:" + examFinishAnswer.toString());
|
||||
return toAjax(examFinishAnswerService.intoExamFinishAnswer(examFinishAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:finishanswer:edit')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
return toAjax(examFinishAnswerService.updateExamFinishAnswer(examFinishAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:finishanswer:remove')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{examCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] examCodes)
|
||||
{
|
||||
return toAjax(examFinishAnswerService.deleteExamFinishAnswerByIds(examCodes));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.hig.onlineexam.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsContentData;
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsData;
|
||||
import com.hig.onlineexam.service.IExamQuestionsContentDataService;
|
||||
import com.hig.questions.domain.ExamQuestionsAnswer;
|
||||
import com.hig.questions.service.IExamQuestionsAnswerService;
|
||||
import com.hig.utils.DigitUtils;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/onlineexam")
|
||||
public class ExamQuestionsContentDataController {
|
||||
@Autowired
|
||||
private IExamQuestionsContentDataService examQuestionsContentDataService;
|
||||
|
||||
@Autowired
|
||||
private IExamQuestionsAnswerService examQuestionsAnswerService;
|
||||
|
||||
@GetMapping("/content")
|
||||
public AjaxResult option(@RequestBody ExamQuestionsContentData examQuestionsContentData)
|
||||
{
|
||||
ExamQuestionsContentData contentData = examQuestionsContentDataService.selectExamQuestionsContent(examQuestionsContentData);
|
||||
return AjaxResult.success(contentData);
|
||||
}
|
||||
|
||||
@PostMapping("/data")
|
||||
public AjaxResult data(@RequestBody ExamQuestionsContentData examQuestionsContentData)
|
||||
{
|
||||
ExamQuestionsContentData contentData = examQuestionsContentDataService.selectExamQuestionsContent(examQuestionsContentData);
|
||||
|
||||
// 转换题号
|
||||
|
||||
String str = DigitUtils.toChinese(String.valueOf(contentData.getQuestionsNumber()));
|
||||
contentData.setQuestionsNumberText("第" + str + "题");
|
||||
|
||||
List<ExamQuestionsAnswer> examQuestionsOptionList = examQuestionsAnswerService.selectExamQuestionsOptionList(examQuestionsContentData.getQuestionsCode());
|
||||
|
||||
ExamQuestionsData examQuestionsData = new ExamQuestionsData(contentData, examQuestionsOptionList);
|
||||
return AjaxResult.success(examQuestionsData);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.hig.onlineexam.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
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.hig.onlineexam.domain.dto.ExamQuestionsListData;
|
||||
import com.hig.onlineexam.service.IExamQuestionsListDataService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/onlineexam/questionslist")
|
||||
public class ExamQuestionsListDataController {
|
||||
|
||||
@Autowired
|
||||
IExamQuestionsListDataService examQuestionsListDataService;
|
||||
|
||||
@GetMapping()
|
||||
public AjaxResult getQuestionsList(ExamQuestionsListData examQuestionsListData)
|
||||
{
|
||||
List<ExamQuestionsListData> examQuestionsList = examQuestionsListDataService.selectQuestionsList(examQuestionsListData);
|
||||
return AjaxResult.success(examQuestionsList);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.hig.onlineexam.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.onlineexam.domain.ExamTaskAnswer;
|
||||
import com.hig.onlineexam.service.IExamTaskAnswerService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 考试实时数据Controller
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/onlineexam/taskanswer")
|
||||
public class ExamTaskAnswerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamTaskAnswerService examTaskAnswerService;
|
||||
|
||||
/**
|
||||
* 查询考试实时数据列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
startPage();
|
||||
List<ExamTaskAnswer> list = examTaskAnswerService.selectExamTaskAnswerList(examTaskAnswer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考试实时数据列表
|
||||
*/
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
List<ExamTaskAnswer> list = examTaskAnswerService.selectExamTaskAnswerList(examTaskAnswer);
|
||||
ExcelUtil<ExamTaskAnswer> util = new ExcelUtil<ExamTaskAnswer>(ExamTaskAnswer.class);
|
||||
return util.exportExcel(list, "考试实时数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试实时数据详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{examCode}")
|
||||
public AjaxResult getInfo(@PathVariable("examCode") String examCode)
|
||||
{
|
||||
return AjaxResult.success(examTaskAnswerService.selectExamTaskAnswerById(examCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试实时数据
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
|
||||
return toAjax(examTaskAnswerService.insertExamTaskAnswer(examTaskAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试实时数据
|
||||
*/
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
return toAjax(examTaskAnswerService.updateExamTaskAnswer(examTaskAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试实时数据
|
||||
*/
|
||||
@GetMapping("/remove/{examCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] examCodes)
|
||||
{
|
||||
return toAjax(examTaskAnswerService.deleteExamTaskAnswerByIds(examCodes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试实时数据
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public AjaxResult delete(ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
return toAjax(examTaskAnswerService.deleteExamTaskAnswer(examTaskAnswer));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.hig.onlineexam.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamTitleData;
|
||||
import com.hig.onlineexam.service.IExamTitleDataService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/onlineexam/examtitle")
|
||||
public class ExamTitleController {
|
||||
|
||||
@Autowired
|
||||
IExamTitleDataService examTitleDataService;
|
||||
|
||||
@GetMapping(value = "/{userCode}")
|
||||
public AjaxResult selectCurrentExam(@PathVariable("userCode") String userCode)
|
||||
{
|
||||
ExamTitleData examTitleData = examTitleDataService.selectCurrentExam(userCode);
|
||||
return AjaxResult.success(examTitleData);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
package com.hig.onlineexam.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.onlineexam.domain.ExamUserScore;
|
||||
import com.hig.onlineexam.service.IExamUserScoreService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 考试成绩Controller
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-03-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/onlineexam/userscore")
|
||||
public class ExamUserScoreController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamUserScoreService examUserScoreService;
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:userscore:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamUserScore examUserScore)
|
||||
{
|
||||
startPage();
|
||||
List<ExamUserScore> list = examUserScoreService.selectExamUserScoreList(examUserScore);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考试成绩列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:userscore:export')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamUserScore examUserScore)
|
||||
{
|
||||
List<ExamUserScore> list = examUserScoreService.selectExamUserScoreList(examUserScore);
|
||||
ExcelUtil<ExamUserScore> util = new ExcelUtil<ExamUserScore>(ExamUserScore.class);
|
||||
return util.exportExcel(list, "考试成绩数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试成绩详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:userscore:query')")
|
||||
@GetMapping(value = "/{examCode}")
|
||||
public AjaxResult getInfo(@PathVariable("examCode") String examCode)
|
||||
{
|
||||
return AjaxResult.success(examUserScoreService.selectExamUserScoreById(examCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:userscore:add')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamUserScore examUserScore)
|
||||
{
|
||||
return toAjax(examUserScoreService.insertExamUserScore(examUserScore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 维护考试成绩
|
||||
*/
|
||||
@PostMapping("/into")
|
||||
public AjaxResult into(@RequestBody ExamUserScore examUserScore)
|
||||
{
|
||||
return toAjax(examUserScoreService.intoExamUserScore(examUserScore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:userscore:edit')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamUserScore examUserScore)
|
||||
{
|
||||
return toAjax(examUserScoreService.updateExamUserScore(examUserScore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('onlineexam:userscore:remove')")
|
||||
@Log(title = "考试成绩", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{examCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] examCodes)
|
||||
{
|
||||
return toAjax(examUserScoreService.deleteExamUserScoreByIds(examCodes));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package com.hig.onlineexam.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_finish_answer
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-03-02
|
||||
*/
|
||||
public class ExamFinishAnswer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 考试代码 */
|
||||
private String examCode;
|
||||
|
||||
/** 考试用户 */
|
||||
private String userCode;
|
||||
|
||||
/** 题目代码 */
|
||||
private String questionsCode;
|
||||
|
||||
/** 正确答案 */
|
||||
@Excel(name = "正确答案")
|
||||
private String rightAnswer;
|
||||
|
||||
/** 分数 */
|
||||
@Excel(name = "分数")
|
||||
private Long examScore;
|
||||
|
||||
/** 题目回答 */
|
||||
@Excel(name = "题目回答")
|
||||
private String questionsAnswer;
|
||||
|
||||
/** 题目得分 */
|
||||
@Excel(name = "题目得分")
|
||||
private Long questionsScore;
|
||||
|
||||
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 setQuestionsCode(String questionsCode)
|
||||
{
|
||||
this.questionsCode = questionsCode;
|
||||
}
|
||||
|
||||
public String getQuestionsCode()
|
||||
{
|
||||
return questionsCode;
|
||||
}
|
||||
public void setRightAnswer(String rightAnswer)
|
||||
{
|
||||
this.rightAnswer = rightAnswer;
|
||||
}
|
||||
|
||||
public String getRightAnswer()
|
||||
{
|
||||
return rightAnswer;
|
||||
}
|
||||
public void setExamScore(Long examScore)
|
||||
{
|
||||
this.examScore = examScore;
|
||||
}
|
||||
|
||||
public Long getExamScore()
|
||||
{
|
||||
return examScore;
|
||||
}
|
||||
public void setQuestionsAnswer(String questionsAnswer)
|
||||
{
|
||||
this.questionsAnswer = questionsAnswer;
|
||||
}
|
||||
|
||||
public String getQuestionsAnswer()
|
||||
{
|
||||
return questionsAnswer;
|
||||
}
|
||||
public void setQuestionsScore(Long questionsScore)
|
||||
{
|
||||
this.questionsScore = questionsScore;
|
||||
}
|
||||
|
||||
public Long getQuestionsScore()
|
||||
{
|
||||
return questionsScore;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("examCode", getExamCode())
|
||||
.append("userCode", getUserCode())
|
||||
.append("questionsCode", getQuestionsCode())
|
||||
.append("rightAnswer", getRightAnswer())
|
||||
.append("examScore", getExamScore())
|
||||
.append("questionsAnswer", getQuestionsAnswer())
|
||||
.append("questionsScore", getQuestionsScore())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.hig.onlineexam.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_answer
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
public class ExamTaskAnswer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 考试代码 */
|
||||
@Excel(name = "考试代码")
|
||||
private String examCode;
|
||||
|
||||
/** 考试用户 */
|
||||
@Excel(name = "考试用户")
|
||||
private String userCode;
|
||||
|
||||
/** 题目代码 */
|
||||
@Excel(name = "题目代码")
|
||||
private String questionsCode;
|
||||
|
||||
/** 题号 */
|
||||
@Excel(name = "题号")
|
||||
private Long questionsNumber;
|
||||
|
||||
/** 试题类型 */
|
||||
@Excel(name = "试题类型")
|
||||
private Long questionsType;
|
||||
|
||||
/** 题目回答 */
|
||||
@Excel(name = "题目回答")
|
||||
private String questionsAnswer;
|
||||
|
||||
/** 是否标记 */
|
||||
@Excel(name = "是否标记")
|
||||
private String isMark;
|
||||
|
||||
/** 是否当前 */
|
||||
@Excel(name = "是否当前")
|
||||
private String isCurrent;
|
||||
|
||||
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 setQuestionsCode(String questionsCode)
|
||||
{
|
||||
this.questionsCode = questionsCode;
|
||||
}
|
||||
|
||||
public String getQuestionsCode()
|
||||
{
|
||||
return questionsCode;
|
||||
}
|
||||
public void setQuestionsNumber(Long questionsNumber)
|
||||
{
|
||||
this.questionsNumber = questionsNumber;
|
||||
}
|
||||
|
||||
public Long getQuestionsNumber()
|
||||
{
|
||||
return questionsNumber;
|
||||
}
|
||||
public void setQuestionsType(Long questionsType)
|
||||
{
|
||||
this.questionsType = questionsType;
|
||||
}
|
||||
|
||||
public Long getQuestionsType()
|
||||
{
|
||||
return questionsType;
|
||||
}
|
||||
public void setQuestionsAnswer(String questionsAnswer)
|
||||
{
|
||||
this.questionsAnswer = questionsAnswer;
|
||||
}
|
||||
|
||||
public String getQuestionsAnswer()
|
||||
{
|
||||
return questionsAnswer;
|
||||
}
|
||||
public void setIsMark(String isMark)
|
||||
{
|
||||
this.isMark = isMark;
|
||||
}
|
||||
|
||||
public String getIsMark()
|
||||
{
|
||||
return isMark;
|
||||
}
|
||||
public void setIsCurrent(String isCurrent)
|
||||
{
|
||||
this.isCurrent = isCurrent;
|
||||
}
|
||||
|
||||
public String getIsCurrent()
|
||||
{
|
||||
return isCurrent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("examCode", getExamCode())
|
||||
.append("userCode", getUserCode())
|
||||
.append("questionsCode", getQuestionsCode())
|
||||
.append("questionsNumber", getQuestionsNumber())
|
||||
.append("questionsType", getQuestionsType())
|
||||
.append("questionsAnswer", getQuestionsAnswer())
|
||||
.append("isMark", getIsMark())
|
||||
.append("isCurrent", getIsCurrent())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.hig.onlineexam.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_user_score
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-03-03
|
||||
*/
|
||||
public class ExamUserScore extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 考试代码 */
|
||||
private String examCode;
|
||||
|
||||
/** 考试人员 */
|
||||
private String userCode;
|
||||
|
||||
/** 开始时间 */
|
||||
@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 Integer examScore;
|
||||
|
||||
/** 题目分数 */
|
||||
@Excel(name = "题目分数")
|
||||
private Integer questionsScore;
|
||||
|
||||
/** 题目数 */
|
||||
@Excel(name = "题目数")
|
||||
private Integer examNumber;
|
||||
|
||||
/** 答题数 */
|
||||
@Excel(name = "答题数")
|
||||
private Integer answeredNumber;
|
||||
|
||||
/** 未答题数 */
|
||||
@Excel(name = "未答题数")
|
||||
private Integer notAnswered;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer 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 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 setExamScore(Integer examScore)
|
||||
{
|
||||
this.examScore = examScore;
|
||||
}
|
||||
|
||||
public Integer getExamScore()
|
||||
{
|
||||
return examScore;
|
||||
}
|
||||
public void setQuestionsScore(Integer questionsScore)
|
||||
{
|
||||
this.questionsScore = questionsScore;
|
||||
}
|
||||
|
||||
public Integer getQuestionsScore()
|
||||
{
|
||||
return questionsScore;
|
||||
}
|
||||
public void setExamNumber(Integer examNumber)
|
||||
{
|
||||
this.examNumber = examNumber;
|
||||
}
|
||||
|
||||
public Integer getExamNumber()
|
||||
{
|
||||
return examNumber;
|
||||
}
|
||||
public void setAnsweredNumber(Integer answeredNumber)
|
||||
{
|
||||
this.answeredNumber = answeredNumber;
|
||||
}
|
||||
|
||||
public Integer getAnsweredNumber()
|
||||
{
|
||||
return answeredNumber;
|
||||
}
|
||||
public void setNotAnswered(Integer notAnswered)
|
||||
{
|
||||
this.notAnswered = notAnswered;
|
||||
}
|
||||
|
||||
public Integer getNotAnswered()
|
||||
{
|
||||
return notAnswered;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("examCode", getExamCode())
|
||||
.append("userCode", getUserCode())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("examScore", getExamScore())
|
||||
.append("questionsScore", getQuestionsScore())
|
||||
.append("examNumber", getExamNumber())
|
||||
.append("answeredNumber", getAnsweredNumber())
|
||||
.append("notAnswered", getNotAnswered())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hig.onlineexam.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExamQuestionsContentData {
|
||||
private String bankCode;
|
||||
private String examCode;
|
||||
private int questionsId;
|
||||
private int questionsNumber;
|
||||
private String questionsNumberText;
|
||||
private String questionsCode;
|
||||
private String questionsContent;
|
||||
private int questionsType;
|
||||
private int questionsScore;
|
||||
private int rateNumber;
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.hig.onlineexam.domain.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hig.questions.domain.ExamQuestionsAnswer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExamQuestionsData {
|
||||
|
||||
private ExamQuestionsContentData examQuestionsContentData;
|
||||
private List<ExamQuestionsAnswer> examQuestionsOptionList;
|
||||
|
||||
|
||||
public ExamQuestionsData(ExamQuestionsContentData examQuestionsContentData,
|
||||
List<ExamQuestionsAnswer> examQuestionsOptionList) {
|
||||
super();
|
||||
this.examQuestionsContentData = examQuestionsContentData;
|
||||
this.examQuestionsOptionList = examQuestionsOptionList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hig.onlineexam.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExamQuestionsListData {
|
||||
private String examCode;
|
||||
private String userCode;
|
||||
private String questionsCode;
|
||||
private int questionsNumber;
|
||||
private int questionsType;
|
||||
private int questionsScore;
|
||||
private String questionsAnswer;
|
||||
private int isMark;
|
||||
private int isCurrent;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.hig.onlineexam.domain.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ExamTitleData {
|
||||
/** 考试序号 */
|
||||
private Long examId;
|
||||
|
||||
/** 考试代码 */
|
||||
private String examCode;
|
||||
|
||||
/** 考试名称 */
|
||||
private String examName;
|
||||
|
||||
/** 考试说明 */
|
||||
private String examDescribe;
|
||||
|
||||
/** 组卷方式 */
|
||||
private String buildType;
|
||||
|
||||
/** 强制抽卷 */
|
||||
private String forceDone;
|
||||
|
||||
/** 考试题库 */
|
||||
private String examBank;
|
||||
|
||||
/** 考试题库文字 */
|
||||
private String examBankText;
|
||||
|
||||
|
||||
/** 图片链接 */
|
||||
private String pictureUrl;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 当前日期 */
|
||||
private Date currentDate;
|
||||
/** 考试时长 */
|
||||
private String examDuration;
|
||||
|
||||
private int diffTime;
|
||||
|
||||
/** 判断题数 */
|
||||
private int judgeNumber;
|
||||
|
||||
/** 单选题数 */
|
||||
private int radioNumber;
|
||||
|
||||
/** 多选题数 */
|
||||
private int choiceNumber;
|
||||
|
||||
private int questionsScore;
|
||||
/** 状态 */
|
||||
private Long status;
|
||||
|
||||
/** 创建人 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建部门 */
|
||||
private int createDept;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.hig.onlineexam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.onlineexam.domain.ExamFinishAnswer;
|
||||
|
||||
/**
|
||||
* 考试成绩Mapper接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
public interface ExamFinishAnswerMapper
|
||||
{
|
||||
/**
|
||||
* 查询考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 考试成绩
|
||||
*/
|
||||
public ExamFinishAnswer selectExamFinishAnswerById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 考试成绩集合
|
||||
*/
|
||||
public List<ExamFinishAnswer> selectExamFinishAnswerList(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 考试结束将考试成绩拷入
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int intoExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 删除考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamFinishAnswerById(String examCode);
|
||||
|
||||
/**
|
||||
* 删除个人考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 批量删除考试成绩
|
||||
*
|
||||
* @param examCodes 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamFinishAnswerByIds(String[] examCodes);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.hig.onlineexam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsContentData;
|
||||
|
||||
public interface ExamQuestionsContentDataMapper {
|
||||
public ExamQuestionsContentData selectExamQuestionsContent(ExamQuestionsContentData questionsContentData);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.hig.onlineexam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsListData;
|
||||
|
||||
public interface ExamQuestionsListDataMapper {
|
||||
public List<ExamQuestionsListData> selectQuestionsList(ExamQuestionsListData examQuestionsListData);
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.hig.onlineexam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.onlineexam.domain.ExamTaskAnswer;
|
||||
|
||||
/**
|
||||
* 考试实时数据Mapper接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
public interface ExamTaskAnswerMapper
|
||||
{
|
||||
/**
|
||||
* 查询考试实时数据
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 考试实时数据
|
||||
*/
|
||||
public ExamTaskAnswer selectExamTaskAnswerById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询考试实时数据列表
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 考试实时数据集合
|
||||
*/
|
||||
public List<ExamTaskAnswer> selectExamTaskAnswerList(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 新增考试实时数据
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamTaskAnswer(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 修改考试实时数据
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamTaskAnswer(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 删除个人单条考试实时数据
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskAnswer(ExamTaskAnswer examTaskAnswer);
|
||||
/**
|
||||
* 删除考试实时数据
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskAnswerById(String examCode);
|
||||
|
||||
/**
|
||||
* 批量删除考试实时数据
|
||||
*
|
||||
* @param examCodes 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskAnswerByIds(String[] examCodes);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.hig.onlineexam.mapper;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamTitleData;
|
||||
|
||||
public interface ExamTitleDataMapper {
|
||||
public ExamTitleData selectCurrentExam(String userCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.hig.onlineexam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.onlineexam.domain.ExamUserScore;
|
||||
|
||||
/**
|
||||
* 考试成绩Mapper接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-03-03
|
||||
*/
|
||||
public interface ExamUserScoreMapper
|
||||
{
|
||||
/**
|
||||
* 查询考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 考试成绩
|
||||
*/
|
||||
public ExamUserScore selectExamUserScoreById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 考试成绩集合
|
||||
*/
|
||||
public List<ExamUserScore> selectExamUserScoreList(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 维护考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int intoExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 删除考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
|
||||
/**
|
||||
* 删除考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamUserScoreById(String examCode);
|
||||
|
||||
/**
|
||||
* 批量删除考试成绩
|
||||
*
|
||||
* @param examCodes 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamUserScoreByIds(String[] examCodes);
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.hig.onlineexam.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.onlineexam.domain.ExamFinishAnswer;
|
||||
|
||||
/**
|
||||
* 考试成绩Service接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
public interface IExamFinishAnswerService
|
||||
{
|
||||
/**
|
||||
* 查询考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 考试成绩
|
||||
*/
|
||||
public ExamFinishAnswer selectExamFinishAnswerById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 考试成绩集合
|
||||
*/
|
||||
public List<ExamFinishAnswer> selectExamFinishAnswerList(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 考试结束将考试成绩拷入
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int intoExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 批量删除考试成绩
|
||||
*
|
||||
* @param examCodes 需要删除的考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamFinishAnswerByIds(String[] examCodes);
|
||||
|
||||
/**
|
||||
* 删除个人考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamFinishAnswer(ExamFinishAnswer examFinishAnswer);
|
||||
|
||||
/**
|
||||
* 删除考试成绩信息
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamFinishAnswerById(String examCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.hig.onlineexam.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsContentData;
|
||||
|
||||
public interface IExamQuestionsContentDataService {
|
||||
public ExamQuestionsContentData selectExamQuestionsContent(ExamQuestionsContentData questionsContentData);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.hig.onlineexam.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsListData;
|
||||
|
||||
public interface IExamQuestionsListDataService {
|
||||
public List<ExamQuestionsListData> selectQuestionsList(ExamQuestionsListData examQuestionsListData);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.hig.onlineexam.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.onlineexam.domain.ExamTaskAnswer;
|
||||
|
||||
/**
|
||||
* 考试实时数据Service接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
public interface IExamTaskAnswerService
|
||||
{
|
||||
/**
|
||||
* 查询考试实时数据
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 考试实时数据
|
||||
*/
|
||||
public ExamTaskAnswer selectExamTaskAnswerById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询考试实时数据列表
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 考试实时数据集合
|
||||
*/
|
||||
public List<ExamTaskAnswer> selectExamTaskAnswerList(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 新增考试实时数据
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamTaskAnswer(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 修改考试实时数据
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamTaskAnswer(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 删除个人单条考试实时数据
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskAnswer(ExamTaskAnswer examTaskAnswer);
|
||||
|
||||
/**
|
||||
* 批量删除考试实时数据
|
||||
*
|
||||
* @param examCodes 需要删除的考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskAnswerByIds(String[] examCodes);
|
||||
|
||||
/**
|
||||
* 删除考试实时数据信息
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamTaskAnswerById(String examCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.hig.onlineexam.service;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamTitleData;
|
||||
|
||||
public interface IExamTitleDataService {
|
||||
public ExamTitleData selectCurrentExam(String userCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.hig.onlineexam.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hig.onlineexam.domain.ExamUserScore;
|
||||
|
||||
/**
|
||||
* 考试成绩Service接口
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-03-03
|
||||
*/
|
||||
public interface IExamUserScoreService
|
||||
{
|
||||
/**
|
||||
* 查询考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 考试成绩
|
||||
*/
|
||||
public ExamUserScore selectExamUserScoreById(String examCode);
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 考试成绩集合
|
||||
*/
|
||||
public List<ExamUserScore> selectExamUserScoreList(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 维护考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int intoExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
/**
|
||||
* 批量删除考试成绩
|
||||
*
|
||||
* @param examCodes 需要删除的考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
/**
|
||||
* 删除考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamUserScore(ExamUserScore examUserScore);
|
||||
|
||||
public int deleteExamUserScoreByIds(String[] examCodes);
|
||||
|
||||
/**
|
||||
* 删除考试成绩信息
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamUserScoreById(String examCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
package com.hig.onlineexam.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hig.onlineexam.mapper.ExamFinishAnswerMapper;
|
||||
import com.hig.exam.domain.ExamTaskPerson;
|
||||
import com.hig.exam.service.IExamTaskPersonService;
|
||||
import com.hig.onlineexam.domain.ExamFinishAnswer;
|
||||
import com.hig.onlineexam.domain.ExamUserScore;
|
||||
import com.hig.onlineexam.service.IExamFinishAnswerService;
|
||||
import com.hig.onlineexam.service.IExamUserScoreService;
|
||||
|
||||
/**
|
||||
* 考试成绩Service业务层处理
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
@Service
|
||||
public class ExamFinishAnswerServiceImpl implements IExamFinishAnswerService
|
||||
{
|
||||
@Autowired
|
||||
private ExamFinishAnswerMapper examFinishAnswerMapper;
|
||||
|
||||
@Autowired
|
||||
private IExamUserScoreService examUserScoreService;
|
||||
|
||||
@Autowired
|
||||
private IExamTaskPersonService examTaskPersonService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 考试成绩
|
||||
*/
|
||||
@Override
|
||||
public ExamFinishAnswer selectExamFinishAnswerById(String examCode)
|
||||
{
|
||||
return examFinishAnswerMapper.selectExamFinishAnswerById(examCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 考试成绩
|
||||
*/
|
||||
@Override
|
||||
public List<ExamFinishAnswer> selectExamFinishAnswerList(ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
return examFinishAnswerMapper.selectExamFinishAnswerList(examFinishAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamFinishAnswer(ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
return examFinishAnswerMapper.insertExamFinishAnswer(examFinishAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*
|
||||
* @param examFinishAnswer 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamFinishAnswer(ExamFinishAnswer examFinishAnswer)
|
||||
{
|
||||
return examFinishAnswerMapper.updateExamFinishAnswer(examFinishAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考试成绩
|
||||
*
|
||||
* @param examCodes 需要删除的考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamFinishAnswerByIds(String[] examCodes)
|
||||
{
|
||||
return examFinishAnswerMapper.deleteExamFinishAnswerByIds(examCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试成绩信息
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamFinishAnswerById(String examCode)
|
||||
{
|
||||
return examFinishAnswerMapper.deleteExamFinishAnswerById(examCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intoExamFinishAnswer(ExamFinishAnswer examFinishAnswer) {
|
||||
// TODO Auto-generated method stub
|
||||
examFinishAnswerMapper.deleteExamFinishAnswer(examFinishAnswer);
|
||||
|
||||
int result = examFinishAnswerMapper.intoExamFinishAnswer(examFinishAnswer);
|
||||
|
||||
// 维护成绩数据
|
||||
ExamUserScore examUserScore = new ExamUserScore();
|
||||
examUserScore.setExamCode(examFinishAnswer.getExamCode());
|
||||
examUserScore.setUserCode(examFinishAnswer.getUserCode());
|
||||
|
||||
result = examUserScoreService.intoExamUserScore(examUserScore);
|
||||
|
||||
// 更新状态
|
||||
ExamTaskPerson examTaskPerson = new ExamTaskPerson();
|
||||
examTaskPerson.setExamCode(examFinishAnswer.getExamCode());
|
||||
examTaskPerson.setuserCode(examFinishAnswer.getUserCode());
|
||||
examTaskPersonService.updateDoneStatus(examTaskPerson);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteExamFinishAnswer(ExamFinishAnswer examFinishAnswer) {
|
||||
// TODO Auto-generated method stub
|
||||
return examFinishAnswerMapper.deleteExamFinishAnswer(examFinishAnswer);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.hig.onlineexam.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsContentData;
|
||||
import com.hig.onlineexam.mapper.ExamQuestionsContentDataMapper;
|
||||
import com.hig.onlineexam.service.IExamQuestionsContentDataService;
|
||||
|
||||
@Service
|
||||
public class ExamQuestionsContentDataServiceImpl implements IExamQuestionsContentDataService {
|
||||
@Autowired
|
||||
ExamQuestionsContentDataMapper examQuestionsContentDataMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public ExamQuestionsContentData selectExamQuestionsContent(ExamQuestionsContentData questionsContentData) {
|
||||
// TODO Auto-generated method stub
|
||||
return examQuestionsContentDataMapper.selectExamQuestionsContent(questionsContentData);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.hig.onlineexam.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamQuestionsListData;
|
||||
import com.hig.onlineexam.mapper.ExamQuestionsListDataMapper;
|
||||
import com.hig.onlineexam.service.IExamQuestionsListDataService;
|
||||
|
||||
@Service
|
||||
public class ExamQuestionsListDataServiceImpl implements IExamQuestionsListDataService {
|
||||
@Autowired
|
||||
ExamQuestionsListDataMapper examQuestionsListDataMapper;
|
||||
|
||||
@Override
|
||||
public List<ExamQuestionsListData> selectQuestionsList(ExamQuestionsListData examQuestionsListData) {
|
||||
// TODO Auto-generated method stub
|
||||
return examQuestionsListDataMapper.selectQuestionsList(examQuestionsListData);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.hig.onlineexam.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hig.onlineexam.mapper.ExamTaskAnswerMapper;
|
||||
import com.hig.onlineexam.domain.ExamTaskAnswer;
|
||||
import com.hig.onlineexam.domain.ExamUserScore;
|
||||
import com.hig.onlineexam.service.IExamTaskAnswerService;
|
||||
import com.hig.onlineexam.service.IExamUserScoreService;
|
||||
|
||||
/**
|
||||
* 考试实时数据Service业务层处理
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
@Service
|
||||
public class ExamTaskAnswerServiceImpl implements IExamTaskAnswerService
|
||||
{
|
||||
@Autowired
|
||||
private ExamTaskAnswerMapper examTaskAnswerMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询考试实时数据
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 考试实时数据
|
||||
*/
|
||||
@Override
|
||||
public ExamTaskAnswer selectExamTaskAnswerById(String examCode)
|
||||
{
|
||||
return examTaskAnswerMapper.selectExamTaskAnswerById(examCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考试实时数据列表
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 考试实时数据
|
||||
*/
|
||||
@Override
|
||||
public List<ExamTaskAnswer> selectExamTaskAnswerList(ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
return examTaskAnswerMapper.selectExamTaskAnswerList(examTaskAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试实时数据
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamTaskAnswer(ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
// 安全删除
|
||||
examTaskAnswerMapper.deleteExamTaskAnswer(examTaskAnswer);
|
||||
|
||||
return examTaskAnswerMapper.insertExamTaskAnswer(examTaskAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试实时数据
|
||||
*
|
||||
* @param examTaskAnswer 考试实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamTaskAnswer(ExamTaskAnswer examTaskAnswer)
|
||||
{
|
||||
return examTaskAnswerMapper.updateExamTaskAnswer(examTaskAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考试实时数据
|
||||
*
|
||||
* @param examCodes 需要删除的考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamTaskAnswerByIds(String[] examCodes)
|
||||
{
|
||||
return examTaskAnswerMapper.deleteExamTaskAnswerByIds(examCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试实时数据信息
|
||||
*
|
||||
* @param examCode 考试实时数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamTaskAnswerById(String examCode)
|
||||
{
|
||||
return examTaskAnswerMapper.deleteExamTaskAnswerById(examCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteExamTaskAnswer(ExamTaskAnswer examTaskAnswer) {
|
||||
// TODO Auto-generated method stub
|
||||
return examTaskAnswerMapper.deleteExamTaskAnswer(examTaskAnswer);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.hig.onlineexam.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.hig.onlineexam.domain.dto.ExamTitleData;
|
||||
import com.hig.onlineexam.mapper.ExamTitleDataMapper;
|
||||
import com.hig.onlineexam.service.IExamTitleDataService;
|
||||
|
||||
@Service
|
||||
public class ExamTitleDataServiceImpl implements IExamTitleDataService {
|
||||
@Autowired
|
||||
ExamTitleDataMapper examTitleDataMapper;
|
||||
|
||||
@Override
|
||||
public ExamTitleData selectCurrentExam(String userCode) {
|
||||
// TODO Auto-generated method stub
|
||||
return examTitleDataMapper.selectCurrentExam(userCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package com.hig.onlineexam.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hig.onlineexam.mapper.ExamUserScoreMapper;
|
||||
import com.hig.onlineexam.domain.ExamUserScore;
|
||||
import com.hig.onlineexam.service.IExamUserScoreService;
|
||||
|
||||
/**
|
||||
* 考试成绩Service业务层处理
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2023-03-03
|
||||
*/
|
||||
@Service
|
||||
public class ExamUserScoreServiceImpl implements IExamUserScoreService
|
||||
{
|
||||
@Autowired
|
||||
private ExamUserScoreMapper examUserScoreMapper;
|
||||
|
||||
/**
|
||||
* 查询考试成绩
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 考试成绩
|
||||
*/
|
||||
@Override
|
||||
public ExamUserScore selectExamUserScoreById(String examCode)
|
||||
{
|
||||
return examUserScoreMapper.selectExamUserScoreById(examCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考试成绩列表
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 考试成绩
|
||||
*/
|
||||
@Override
|
||||
public List<ExamUserScore> selectExamUserScoreList(ExamUserScore examUserScore)
|
||||
{
|
||||
return examUserScoreMapper.selectExamUserScoreList(examUserScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamUserScore(ExamUserScore examUserScore)
|
||||
{
|
||||
return examUserScoreMapper.insertExamUserScore(examUserScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试成绩
|
||||
*
|
||||
* @param examUserScore 考试成绩
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamUserScore(ExamUserScore examUserScore)
|
||||
{
|
||||
return examUserScoreMapper.updateExamUserScore(examUserScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考试成绩
|
||||
*
|
||||
* @param examCodes 需要删除的考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamUserScoreByIds(String[] examCodes)
|
||||
{
|
||||
return examUserScoreMapper.deleteExamUserScoreByIds(examCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试成绩信息
|
||||
*
|
||||
* @param examCode 考试成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamUserScoreById(String examCode)
|
||||
{
|
||||
return examUserScoreMapper.deleteExamUserScoreById(examCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intoExamUserScore(ExamUserScore examUserScore) {
|
||||
// TODO Auto-generated method stub
|
||||
// 安全删除
|
||||
examUserScoreMapper.deleteExamUserScore(examUserScore);
|
||||
return examUserScoreMapper.intoExamUserScore(examUserScore);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteExamUserScore(ExamUserScore examUserScore) {
|
||||
// TODO Auto-generated method stub
|
||||
return examUserScoreMapper.deleteExamUserScore(examUserScore);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.hig.questions.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.questions.domain.ExamBankPicture;
|
||||
import com.hig.questions.service.IExamBankPictureService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 题库图片Controller
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2022-12-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/questions/bankpicture")
|
||||
public class ExamBankPictureController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamBankPictureService examBankPictureService;
|
||||
|
||||
/**
|
||||
* 查询题库图片列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:bankpicture:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamBankPicture examBankPicture)
|
||||
{
|
||||
startPage();
|
||||
List<ExamBankPicture> list = examBankPictureService.selectExamBankPictureList(examBankPicture);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出题库图片列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:bankpicture:export')")
|
||||
@Log(title = "题库图片", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamBankPicture examBankPicture)
|
||||
{
|
||||
List<ExamBankPicture> list = examBankPictureService.selectExamBankPictureList(examBankPicture);
|
||||
ExcelUtil<ExamBankPicture> util = new ExcelUtil<ExamBankPicture>(ExamBankPicture.class);
|
||||
return util.exportExcel(list, "题库图片数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题库图片详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:bankpicture:query')")
|
||||
@GetMapping(value = "/{photoCode}")
|
||||
public AjaxResult getInfo(@PathVariable("photoCode") String photoCode)
|
||||
{
|
||||
return AjaxResult.success(examBankPictureService.selectExamBankPictureById(photoCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题库图片
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:bankpicture:add')")
|
||||
@Log(title = "题库图片", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamBankPicture examBankPicture)
|
||||
{
|
||||
return toAjax(examBankPictureService.insertExamBankPicture(examBankPicture));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题库图片
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:bankpicture:edit')")
|
||||
@Log(title = "题库图片", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamBankPicture examBankPicture)
|
||||
{
|
||||
return toAjax(examBankPictureService.updateExamBankPicture(examBankPicture));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题库图片
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:bankpicture:remove')")
|
||||
@Log(title = "题库图片", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{photoCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] photoCodes)
|
||||
{
|
||||
return toAjax(examBankPictureService.deleteExamBankPictureByIds(photoCodes));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
package com.hig.questions.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.questions.domain.ExamQuestionsAnswer;
|
||||
import com.hig.questions.service.IExamQuestionsAnswerService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 考试题目答案Controller
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2022-12-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/questions/answer")
|
||||
public class ExamQuestionsAnswerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamQuestionsAnswerService examQuestionsAnswerService;
|
||||
|
||||
/**
|
||||
* 查询考试题目答案列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestionsAnswer examQuestionsAnswer)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestionsAnswer> list = examQuestionsAnswerService.selectExamQuestionsAnswerList(examQuestionsAnswer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/optionlist/{questionsCode}")
|
||||
public AjaxResult optionList(@PathVariable("questionsCode") String questionsCode)
|
||||
{
|
||||
List<ExamQuestionsAnswer> list = examQuestionsAnswerService.selectExamQuestionsOptionList(questionsCode);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考试题目答案列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:answer:export')")
|
||||
@Log(title = "考试题目答案", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestionsAnswer examQuestionsAnswer)
|
||||
{
|
||||
List<ExamQuestionsAnswer> list = examQuestionsAnswerService.selectExamQuestionsAnswerList(examQuestionsAnswer);
|
||||
ExcelUtil<ExamQuestionsAnswer> util = new ExcelUtil<ExamQuestionsAnswer>(ExamQuestionsAnswer.class);
|
||||
return util.exportExcel(list, "考试题目答案数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试题目答案详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:answer:query')")
|
||||
@GetMapping(value = "/{questionsCode}")
|
||||
public AjaxResult getInfo(@PathVariable("questionsCode") String questionsCode)
|
||||
{
|
||||
return AjaxResult.success(examQuestionsAnswerService.selectExamQuestionsAnswerById(questionsCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试题目答案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:answer:add')")
|
||||
@Log(title = "考试题目答案", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody ExamQuestionsAnswer examQuestionsAnswer)
|
||||
{
|
||||
return toAjax(examQuestionsAnswerService.insertExamQuestionsAnswer(examQuestionsAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试题目答案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:answer:edit')")
|
||||
@Log(title = "考试题目答案", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public AjaxResult edit(@RequestBody ExamQuestionsAnswer examQuestionsAnswer)
|
||||
{
|
||||
return toAjax(examQuestionsAnswerService.updateExamQuestionsAnswer(examQuestionsAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试题目答案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:answer:remove')")
|
||||
@Log(title = "考试题目答案", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/delete/{questionsCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] questionsCodes)
|
||||
{
|
||||
return toAjax(examQuestionsAnswerService.deleteExamQuestionsAnswerByIds(questionsCodes));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.hig.questions.controller;
|
||||
|
||||
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.model.LoginUser;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.hig.cms.utils.FileUpload;
|
||||
import com.hig.questions.domain.ExamBankPicture;
|
||||
import com.hig.questions.domain.ExamQuestionsBank;
|
||||
import com.hig.questions.service.IExamBankPictureService;
|
||||
import com.hig.questions.service.IExamQuestionsBankService;
|
||||
import com.hig.utils.UUIDGenerator;
|
||||
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 2022-12-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/questions/questionsbank")
|
||||
public class ExamQuestionsBankController extends BaseController
|
||||
{
|
||||
@Value("${cms.exam.photo-path}")
|
||||
private String photopath;
|
||||
|
||||
@Autowired
|
||||
private IExamQuestionsBankService examQuestionsBankService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private IExamBankPictureService examBankPictureService;
|
||||
|
||||
/**
|
||||
* 查询题库管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionsbank:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestionsBank examQuestionsBank)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestionsBank> list = examQuestionsBankService.selectExamQuestionsBankList(examQuestionsBank);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/arraylist/{bankCodes}")
|
||||
public AjaxResult arrayList(@PathVariable("bankCodes") String bankCodes)
|
||||
{
|
||||
// startPage();
|
||||
// System.out.println("bankCodes:" + bankCodes);
|
||||
List<ExamQuestionsBank> list = examQuestionsBankService.selectExamQuestionsBankListByCode(bankCodes.split(","));
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出题库管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionsbank:export')")
|
||||
@Log(title = "题库管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestionsBank examQuestionsBank)
|
||||
{
|
||||
List<ExamQuestionsBank> list = examQuestionsBankService.selectExamQuestionsBankList(examQuestionsBank);
|
||||
ExcelUtil<ExamQuestionsBank> util = new ExcelUtil<ExamQuestionsBank>(ExamQuestionsBank.class);
|
||||
return util.exportExcel(list, "题库管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题库管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionsbank:query')")
|
||||
@GetMapping(value = "/{bankCode}")
|
||||
public AjaxResult getInfo(@PathVariable("bankCode") String bankCode)
|
||||
{
|
||||
return AjaxResult.success(examQuestionsBankService.selectExamQuestionsBankById(bankCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题库管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionsbank:add')")
|
||||
@Log(title = "题库管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamQuestionsBank examQuestionsBank)
|
||||
{
|
||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||
System.out.println(loginUser.getUser().getUserName());
|
||||
System.out.println(loginUser.getUser().getDept().getDeptId());
|
||||
examQuestionsBank.setCreateBy(loginUser.getUser().getUserName());
|
||||
examQuestionsBank.setCreateDept(loginUser.getUser().getDept().getDeptId());
|
||||
examQuestionsBank.setBankCode(UUIDGenerator.generate());
|
||||
|
||||
System.out.println("examQuestionsBank:" + examQuestionsBank.toString());
|
||||
return toAjax(examQuestionsBankService.insertExamQuestionsBank(examQuestionsBank));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题库管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionsbank:edit')")
|
||||
@Log(title = "题库管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamQuestionsBank examQuestionsBank)
|
||||
{
|
||||
System.out.println("examQuestionsBank:" + examQuestionsBank.toString());
|
||||
return toAjax(examQuestionsBankService.updateExamQuestionsBank(examQuestionsBank));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题库管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionsbank:remove')")
|
||||
@Log(title = "题库管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{bankCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] bankCodes)
|
||||
{
|
||||
return toAjax(examQuestionsBankService.deleteExamQuestionsBankByIds(bankCodes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参数配置
|
||||
*/
|
||||
@PostMapping("/uploadphoto/{bankcode}")
|
||||
public AjaxResult uploadPhoto(@PathVariable String bankcode,
|
||||
@RequestParam("file") MultipartFile file)
|
||||
{
|
||||
// 取得原始文件名
|
||||
String originalfile = file.getOriginalFilename();
|
||||
|
||||
// 拼接路径
|
||||
String path = RuoYiConfig.getProfile() + photopath;
|
||||
System.out.println("拼接路径为:" + path);
|
||||
String filename = FileUpload.writeUploadFile(file,path);
|
||||
String fileurl = photopath + "/" + filename;
|
||||
System.out.println(fileurl);
|
||||
|
||||
|
||||
int count = 0;
|
||||
|
||||
// 相应赋值
|
||||
ExamBankPicture examBankPicture = new ExamBankPicture(bankcode, path, fileurl, filename, originalfile);
|
||||
|
||||
System.out.println("examBankPicture:" + examBankPicture.toString());
|
||||
|
||||
try
|
||||
{
|
||||
examBankPictureService.deleteExamBankPictureById(bankcode);
|
||||
count = examBankPictureService.insertExamBankPicture(examBankPicture);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
|
||||
return AjaxResult.success(examBankPicture);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.hig.questions.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.questions.domain.ExamQuestionsContent;
|
||||
import com.hig.questions.service.IExamQuestionsContentService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 题目内容表Controller
|
||||
*
|
||||
* @author qnsdt
|
||||
* @date 2022-12-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/questions/questionscontent")
|
||||
public class ExamQuestionsContentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamQuestionsContentService examQuestionsContentService;
|
||||
|
||||
/**
|
||||
* 查询题目内容表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionscontent:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestionsContent examQuestionsContent)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestionsContent> list = examQuestionsContentService.selectExamQuestionsContentList(examQuestionsContent);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出题目内容表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionscontent:export')")
|
||||
@Log(title = "题目内容表", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestionsContent examQuestionsContent)
|
||||
{
|
||||
List<ExamQuestionsContent> list = examQuestionsContentService.selectExamQuestionsContentList(examQuestionsContent);
|
||||
ExcelUtil<ExamQuestionsContent> util = new ExcelUtil<ExamQuestionsContent>(ExamQuestionsContent.class);
|
||||
return util.exportExcel(list, "题目内容表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题目内容表详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{questionsCode}")
|
||||
public AjaxResult getInfo(@PathVariable("questionsCode") String questionsCode)
|
||||
{
|
||||
return AjaxResult.success(examQuestionsContentService.selectExamQuestionsContentById(questionsCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题目内容表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionscontent:add')")
|
||||
@Log(title = "题目内容表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamQuestionsContent examQuestionsContent)
|
||||
{
|
||||
return toAjax(examQuestionsContentService.insertExamQuestionsContent(examQuestionsContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题目内容表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionscontent:edit')")
|
||||
@Log(title = "题目内容表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamQuestionsContent examQuestionsContent)
|
||||
{
|
||||
return toAjax(examQuestionsContentService.updateExamQuestionsContent(examQuestionsContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题目内容表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:questionscontent:remove')")
|
||||
@Log(title = "题目内容表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{questionsCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] questionsCodes)
|
||||
{
|
||||
return toAjax(examQuestionsContentService.deleteExamQuestionsContentByIds(questionsCodes));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
package com.hig.questions.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.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.hig.questions.domain.ExamQuestions;
|
||||
import com.hig.questions.domain.ExamQuestionsAnswer;
|
||||
import com.hig.questions.domain.ExamQuestionsContent;
|
||||
import com.hig.questions.domain.ExamQuestionsProperty;
|
||||
import com.hig.questions.service.IExamQuestionsAnswerService;
|
||||
import com.hig.questions.service.IExamQuestionsContentService;
|
||||
import com.hig.questions.service.IExamQuestionsPropertyService;
|
||||
import com.hig.questions.service.IExamQuestionsService;
|
||||
import com.hig.utils.UUIDGenerator;
|
||||
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 2022-12-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/questions/examquestions")
|
||||
public class ExamQuestionsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamQuestionsService examQuestionsService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private IExamQuestionsAnswerService examQuestionsAnswerService;
|
||||
|
||||
@Autowired
|
||||
private IExamQuestionsContentService examQuestionsContentService;
|
||||
|
||||
@Autowired
|
||||
private IExamQuestionsPropertyService examQuestionsPropertyService;
|
||||
|
||||
/**
|
||||
* 查询考试题目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:examquestions:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestions examQuestions)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestions> list = examQuestionsService.selectExamQuestionsList(examQuestions);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考试题目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:examquestions:export')")
|
||||
@Log(title = "考试题目", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestions examQuestions)
|
||||
{
|
||||
List<ExamQuestions> list = examQuestionsService.selectExamQuestionsList(examQuestions);
|
||||
ExcelUtil<ExamQuestions> util = new ExcelUtil<ExamQuestions>(ExamQuestions.class);
|
||||
return util.exportExcel(list, "考试题目数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考试题目详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:examquestions:query')")
|
||||
@GetMapping(value = "/{questionsCode}")
|
||||
public AjaxResult getInfo(@PathVariable("questionsCode") String questionsCode)
|
||||
{
|
||||
return AjaxResult.success(examQuestionsService.selectExamQuestionsById(questionsCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考试题目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:examquestions:add')")
|
||||
@Log(title = "考试题目", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody ExamQuestions examQuestions)
|
||||
{
|
||||
// 取得用户单位
|
||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||
examQuestions.setCreateBy(loginUser.getUser().getUserName());
|
||||
examQuestions.setCreateDept(loginUser.getUser().getDept().getDeptId());
|
||||
List<ExamQuestionsAnswer> answerList = examQuestions.getAnswerList();
|
||||
|
||||
ExamQuestionsProperty examQuestionsProperty = new ExamQuestionsProperty(examQuestions.getBankCode(),null,examQuestions.getQuestionsCode(),examQuestions.getQuestionsTitle(),
|
||||
examQuestions.getQuestionsType(),examQuestions.getQuestionsScore(),examQuestions.getRateNumber(),examQuestions.getRightAnswer(),examQuestions.getAnswerAnalyse(),
|
||||
0,examQuestions.getCreateBy(), examQuestions.getCreateDept());
|
||||
|
||||
ExamQuestionsContent examQuestionsContent = new ExamQuestionsContent(examQuestions.getQuestionsCode(), examQuestions.getQuestionsContent());
|
||||
|
||||
System.out.println("examQuestionsContent:" + examQuestionsContent.toString());
|
||||
|
||||
// 开始保存数据
|
||||
|
||||
// 保存题目选项
|
||||
// 安全删除
|
||||
examQuestionsAnswerService.deleteExamQuestionsAnswerById(examQuestions.getQuestionsCode());
|
||||
for (ExamQuestionsAnswer questionsAnswer: answerList) {
|
||||
questionsAnswer.setOrderId(null);
|
||||
examQuestionsAnswerService.insertExamQuestionsAnswer(questionsAnswer);
|
||||
}
|
||||
|
||||
// 保存题目数据
|
||||
int count = 0;
|
||||
examQuestionsContentService.deleteExamQuestionsContentById(examQuestions.getQuestionsCode());
|
||||
|
||||
count = examQuestionsContentService.insertExamQuestionsContent(examQuestionsContent);
|
||||
|
||||
if (count == 0) {
|
||||
return new AjaxResult(0,"更新题目信息出错!");
|
||||
}
|
||||
|
||||
|
||||
// 安全删除
|
||||
examQuestionsPropertyService.deleteExamQuestionsPropertyById(examQuestions.getQuestionsCode());
|
||||
|
||||
return toAjax(examQuestionsPropertyService.insertExamQuestionsProperty(examQuestionsProperty));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考试题目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:examquestions:edit')")
|
||||
@Log(title = "考试题目", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
public AjaxResult edit(@RequestBody ExamQuestions examQuestions)
|
||||
{
|
||||
List<ExamQuestionsAnswer> answerList = examQuestions.getAnswerList();
|
||||
|
||||
ExamQuestionsProperty examQuestionsProperty = new ExamQuestionsProperty(examQuestions.getBankCode(),null,examQuestions.getQuestionsCode(),examQuestions.getQuestionsTitle(),
|
||||
examQuestions.getQuestionsType(),examQuestions.getQuestionsScore(),examQuestions.getRateNumber(),examQuestions.getRightAnswer(),examQuestions.getAnswerAnalyse(),
|
||||
0,examQuestions.getCreateBy(), examQuestions.getCreateDept());
|
||||
|
||||
ExamQuestionsContent examQuestionsContent = new ExamQuestionsContent(examQuestions.getQuestionsCode(), examQuestions.getQuestionsContent());
|
||||
|
||||
|
||||
// 开始保存数据
|
||||
|
||||
// 保存题目选项
|
||||
// 安全删除
|
||||
examQuestionsAnswerService.deleteExamQuestionsAnswerById(examQuestions.getQuestionsCode());
|
||||
for (ExamQuestionsAnswer questionsAnswer: answerList) {
|
||||
examQuestionsAnswerService.insertExamQuestionsAnswer(questionsAnswer);
|
||||
}
|
||||
|
||||
// 保存题目数据
|
||||
int count = 0;
|
||||
examQuestionsContentService.deleteExamQuestionsContentById(examQuestions.getQuestionsCode());
|
||||
|
||||
count = examQuestionsContentService.insertExamQuestionsContent(examQuestionsContent);
|
||||
|
||||
if (count == 0) {
|
||||
return new AjaxResult(0,"更新题目信息出错!");
|
||||
}
|
||||
|
||||
|
||||
return toAjax(examQuestionsPropertyService.updateExamQuestionsProperty(examQuestionsProperty));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考试题目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('questions:examquestions:remove')")
|
||||
@Log(title = "考试题目", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/delete/{questionsCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] questionsCodes)
|
||||
{
|
||||
int count = questionsCodes.length;
|
||||
for (String questionsCode: questionsCodes) {
|
||||
examQuestionsAnswerService.deleteExamQuestionsAnswerById(questionsCode);
|
||||
examQuestionsContentService.deleteExamQuestionsContentById(questionsCode);
|
||||
examQuestionsPropertyService.deleteExamQuestionsPropertyById(questionsCode);
|
||||
}
|
||||
|
||||
|
||||
return toAjax(count);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue