Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1
This commit is contained in:
commit
f48d48f121
@ -1,3 +1,4 @@
|
||||
如果没有执行过,直接运行[20220923-wei-project.sql]
|
||||
create TABLE `project` (
|
||||
`id` int NOT NULL AUTO_INCREMENT comment '数据库唯一ID',
|
||||
`mark_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL comment '项目标识key,前端使用',
|
||||
@ -44,7 +45,7 @@ insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setti
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
(
|
||||
'heb', 'HEB','城市轨道交通综合行车模拟仿真系统V1.0',''
|
||||
,'哈尔滨','{"login":{"loginInfo":{"title":"城市轨道交通综合行车模拟仿真系统V1.0","loginTitle":"城市轨道交通综合行车模拟仿真系统V1.0","logoWidth":"140px","loginPath":"/login?project=heb","titleDistance":"150px","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HEB","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"019"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":1,"noSimulationQrCode":1,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=heb"},"design":{"loginInfo":{"title":"城市轨道交通设计平台V1.0","loginTitle":"城市轨道交通设计平台V1.0","logoWidth":"140px","titleDistance":"150px","loginPath":"/design/login?project=heb","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HEB","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"019"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":1,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=heb"}}','{"defaultProject":1,"loginCreateSimulation":0}',1
|
||||
,'哈尔滨','{"login":{"loginInfo":{"title":"城市轨道交通综合行车模拟仿真系统V1.0","loginTitle":"城市轨道交通综合行车模拟仿真系统V1.0","logoWidth":"140px","loginPath":"/login?project=heb","titleDistance":"150px","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HEB","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"019"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":1,"noSimulationQrCode":1,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=heb"},"design":{"loginInfo":{"title":"城市轨道交通设计平台V1.0","loginTitle":"城市轨道交通设计平台V1.0","logoWidth":"140px","titleDistance":"150px","loginPath":"/design/login?project=heb","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HEB","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"019"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":1,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=heb"}}','{"defaultProject":1,"loginCreateSimulation":0,"controlDevice":1}',1
|
||||
,NOW(),NOW(),1
|
||||
);
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
@ -74,25 +75,25 @@ insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setti
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
(
|
||||
'bjd', 'BJD','城市轨道交通列车运行智慧辅助系统',''
|
||||
,'北交大','{"login":{"loginInfo":{"title":"城市轨道交通列车运行智慧辅助系统","loginPath":"/login?project=bjd","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bjd.png","bottomColumn":"","loginTitle":"空串","linkIcon":"@/assets/icon/link_bjd.png","loginParam":"BJD","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":1,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=bjd"},"design":{"loginInfo":{"title":"城市轨道交通列车运行智慧辅助系统","loginPath":"/design/login?project=bjd","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bjd.png","bottomColumn":"","linkIcon":"","loginParam":"BJD","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=bjd"}}','{"defaultProject":1,"loginCreateSimulation":1}',1
|
||||
,'北交大','{"login":{"loginInfo":{"title":"城市轨道交通列车运行智慧辅助系统","loginPath":"/login?project=bjd","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bjd.png","bottomColumn":"","loginTitle":"空串","linkIcon":"@/assets/icon/link_bjd.png","loginParam":"BJD","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":1,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=bjd"},"design":{"loginInfo":{"title":"城市轨道交通列车运行智慧辅助系统","loginPath":"/design/login?project=bjd","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bjd.png","bottomColumn":"","linkIcon":"","loginParam":"BJD","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=bjd"}}','{"defaultProject":1,"loginCreateSimulation":1, "createSimulationPermission":1}',1
|
||||
,NOW(),NOW(),1
|
||||
);
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
(
|
||||
'cgy', 'CGY','成都工业职业技术学院线网车站运营虚拟仿真实训中心',''
|
||||
,'成都工业','{"login":{"loginInfo":{"title":"成都工业职业技术学院线网车站运营虚拟仿真实训中心","loginPath":"/login?project=cgy","loginParam":"CGY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":1,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"loginInfo":{"title":"成都工业职业技术学院轨道交通虚拟仿真设计平台","loginPath":"/design/login?project=cgy","loginParam":"CGY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":1,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":0}',1
|
||||
,'成都工业','{"login":{"loginInfo":{"title":"成都工业职业技术学院线网车站运营虚拟仿真实训中心","loginPath":"/login?project=cgy","loginParam":"CGY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":1,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"loginInfo":{"title":"成都工业职业技术学院轨道交通虚拟仿真设计平台","loginPath":"/design/login?project=cgy","loginParam":"CGY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":1,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":0,"freeSource":1}',1
|
||||
,NOW(),NOW(),1
|
||||
);
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
(
|
||||
'wjls', 'WJLS','微机联锁仿真系统',''
|
||||
,'微机联锁','{"login":{"loginInfo":{"title":"微机联锁仿真系统","loginPath":"/login?project=wjls","loginParam":"WJLS","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":1}',1
|
||||
,'微机联锁','{"login":{"loginInfo":{"title":"微机联锁仿真系统","loginPath":"/login?project=wjls","loginParam":"WJLS","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":1,"createLocalSimulation":1,"defaultMemberId":"2"}',1
|
||||
,NOW(),NOW(),1
|
||||
);
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
(
|
||||
'drts', 'DRTS','全国行车调度员大赛训练系统',''
|
||||
,'调度大赛','{"login":{"loginInfo":{"title":"全国行车调度员大赛训练系统","loginPath":"/login?project=drts","loginParam":"DRTS","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"loginInfo":{"title":"行车调度员设计平台国赛备战版","loginPath":"/design/login?project=drts","loginParam":"DRTS","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":1}',1
|
||||
,'调度大赛','{"login":{"loginInfo":{"title":"全国行车调度员大赛训练系统","loginPath":"/login?project=drts","loginParam":"DRTS","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"loginInfo":{"title":"行车调度员设计平台国赛备战版","loginPath":"/design/login?project=drts","loginParam":"DRTS","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":1,"mapNeedCharge":1}',1
|
||||
,NOW(),NOW(),1
|
||||
);
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
@ -110,7 +111,7 @@ insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setti
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
(
|
||||
'zzww', 'ZZWW','共赢列车仿真驾驶系统',''
|
||||
,'郑州共赢','{"login":{"loginInfo":{"title":"共赢列车仿真驾驶系统","loginPath":"/login?project=zzww","loginParam":"ZZWW","loginTitle":"空串","logoWidth":"140px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":0}',1
|
||||
,'郑州共赢','{"login":{"loginInfo":{"title":"共赢列车仿真驾驶系统","loginPath":"/login?project=zzww","loginParam":"ZZWW","loginTitle":"空串","logoWidth":"140px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0},"design":{"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}}','{"defaultProject":1,"loginCreateSimulation":0,"freeSource":1,"defaultLoadTrain":1}',1
|
||||
,NOW(),NOW(),1
|
||||
);
|
||||
insert into project(`mark_key`,`code`,`name`,`name_en`,`simple_name`,`view_setting`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
|
154
sql/20220923-wei-project.sql
Normal file
154
sql/20220923-wei-project.sql
Normal file
@ -0,0 +1,154 @@
|
||||
drop table IF EXISTS `project`;
|
||||
create TABLE `project` (
|
||||
`id` int NOT NULL AUTO_INCREMENT comment '数据库唯一ID',
|
||||
`code` varchar(50) CHARACTER SET utf8mb4 NOT NULL comment '项目编码',
|
||||
`name` varchar(255) DEFAULT NULL comment '项目名称',
|
||||
`name_en` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL comment '项目英文名称',
|
||||
`simple_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL comment '项目简称',
|
||||
`create_time` datetime DEFAULT NULL comment '创建时间',
|
||||
`update_time` datetime DEFAULT NULL comment '修改时间',
|
||||
`status` int NOT NULL comment '项目标识状态',
|
||||
`view_show` int NOT NULL DEFAULT '1' comment '是否供前端选择',
|
||||
`server_setting` text CHARACTER SET utf8mb4 comment '后端服务设置',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`),
|
||||
KEY `view_show` (`view_show`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
drop table IF EXISTS `project_view`;
|
||||
create TABLE `project_view` (
|
||||
`id` int NOT NULL AUTO_INCREMENT comment '主键',
|
||||
`view_setting` text comment '前端界面设置',
|
||||
`mark_key` varchar(255) CHARACTER SET utf8mb4 NOT NULL comment '前端标识key',
|
||||
`project` varchar(255) CHARACTER SET utf8mb4 NOT NULL comment '对应项目',
|
||||
`create_time` datetime DEFAULT NULL comment '创建时间',
|
||||
`update_time` datetime DEFAULT NULL comment '修改时间',
|
||||
`status` int DEFAULT '1' comment '状态',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `mark_key` (`mark_key`,`status`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('DEFAULT','城市轨道交通实训平台',' Urban Rail Transit Practical Training Platform','','{"defaultProject":1,"loginCreateSimulation":0}',0,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('XTY','西安铁路职业技术学院城市轨道交通实训平台','','西铁院','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('GZB','贵州装备制造职业学院城市轨道交通实训平台','','贵州装备','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('XADT','城市轨道交通实训平台','','西安地铁','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('HEB','城市轨道交通综合行车模拟仿真系统V1.0','','哈尔滨','{"defaultProject":0,"loginCreateSimulation":0,"controlDevice":1}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('NTY','城轨高级信号系统(云平台通用版)','','南铁院(通用版)','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('NTYC','城轨高级信号系统(云平台专用版)','','南铁院(专用版)','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('NTYL','城轨高级信号系统(本地专用版)','','南铁院(本地版)','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('SDY','江苏电子信息职业学院城市轨道交通实训平台','','苏电院','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('BJD','城市轨道交通列车运行智慧辅助系统','','北交大','{"defaultProject":0,"loginCreateSimulation":1, "createSimulationPermission":1}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('CGY','成都工业职业技术学院线网车站运营虚拟仿真实训中心','','成都工业','{"defaultProject":0,"loginCreateSimulation":0,"freeSource":1}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('WJLS','微机联锁仿真系统','','微机联锁','{"defaultProject":0,"loginCreateSimulation":1,"createLocalSimulation":1,"defaultMemberId":"2"}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('DRTS','全国行车调度员大赛训练系统','','调度大赛','{"defaultProject":0,"loginCreateSimulation":1,"mapNeedCharge":1}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('ZZWWTEST','共赢列车仿真驾驶系统','','郑州共赢考试','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('RICHOR','中航锐创城市轨道交通实训平台','','中航锐创','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('ZZWW','共赢列车仿真驾驶系统','','郑州共赢','{"defaultProject":0,"loginCreateSimulation":0,"freeSource":1,"defaultLoadTrain":1}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('NOLOGO','城市轨道交通实训平台','','无logo','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('RICHOR_JOINT','中航锐创城市轨道交通实训平台','','中航锐创(实训室)','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('SR_SANDBOX','上饶科技中等专业学校城市轨道交通实训平台','','上饶沙盘','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('JXGM','江西工业贸易职业技术学院城市轨道交通实训平台','','江西工贸','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('RICHOR_YGY','扬州工业职业技术学院城市轨道交通实训平台','','扬州工业','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('SAY','江苏安全技术职业学院城市轨道交通实训平台','','苏安院','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('UNITTEC_STY','轨道交通实训平台','','众合-陕铁院','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('RICHOR_HHCJ','红河财经学校城市轨道交通实训平台','','红河财经','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('RICHOR_CXJS','长兴技师学院城市轨道交通实训平台','','长兴技校','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('YJDDZH','应急调度指挥系统','','武汉8号线','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('TEACHING','教学通用实训平台','','教学通用','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
insert into project(`code`,`name`,`name_en`,`simple_name`,`server_setting`,`view_show` ,`create_time`,`update_time`,`status`) VALUES
|
||||
('HYD_RAILWAY','大铁交通综合行车模拟仿真系统V1.0','','哈盈达大铁','{"defaultProject":0,"loginCreateSimulation":0}',1,NOW(),NOW(),1);
|
||||
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('xty','XTY','{"loginInfo":{"title":"西安铁路职业技术学院城市轨道交通实训平台","loginPath":"/login?project=xty","loginParam":"XTY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"013"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=xty"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('zzwwtest','ZZWWTEST','{"loginInfo":{"title":"共赢列车仿真驾驶系统","loginPath":"/login?project=zzwwtest","loginParam":"ZZWWTEST","loginTitle":"空串","logoWidth":"140px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('zzww','ZZWW','{"loginInfo":{"title":"共赢列车仿真驾驶系统","loginPath":"/login?project=zzww","loginParam":"ZZWW","loginTitle":"空串","logoWidth":"140px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('xzexam','SAY','{"loginInfo":{"title":"城市轨道交通标准化培训软件","loginPath":"/login?project=xzexam","loginParam":"SAY","loginTitle":"空串","logoWidth":"140px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('sdy','SDY','{"loginInfo":{"title":"江苏电子信息职业学院城市轨道交通实训平台","loginPath":"/login?project=sdy","loginParam":"SDY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"021"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=sdy"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('bjd','BJD','{"loginInfo":{"title":"城市轨道交通列车运行智慧辅助系统","loginPath":"/login?project=bjd","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bjd.png","bottomColumn":"","loginTitle":"空串","linkIcon":"@/assets/icon/link_bjd.png","loginParam":"BJD","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":1,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=bjd"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('ntyc','NTYC','{"loginInfo":{"title":"城轨高级信号系统(云平台专用版)","loginPath":"/login?project=ntyc","loginParam":"NTYC","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=ntyc"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('ntyl','NTYL','{"loginInfo":{"title":"城轨高级信号系统(本地专用版)","loginPath":"/login?project=ntyl","loginParam":"NTYL","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=ntyl"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('nty','NTY','{"loginInfo":{"title":"城轨高级信号系统(云平台通用版)","loginPath":"/login?project=nty","loginParam":"NTY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=nty"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('login','DEFAULT','{"loginInfo":{"title":"城市轨道交通实训平台","titleEn":" Urban Rail Transit Practical Training Platform","loginPath":"/login","loginParam":"DEFAULT","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('design','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台","titleEn":" Urban Rail Transit Design Platform","loginPath":"/design/login","loginParam":"DEFAULT","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('wjls','WJLS','{"loginInfo":{"title":"微机联锁仿真系统","loginPath":"/login?project=wjls","loginParam":"WJLS","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('drts','DRTS','{"loginInfo":{"title":"全国行车调度员大赛训练系统","loginPath":"/login?project=drts","loginParam":"DRTS","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('yjddzh','YJDDZH','{"loginInfo":{"title":"应急调度指挥系统","loginPath":"/login?project=yjddzh","loginParam":"YJDDZH","loginTitle":"空串","navigationLogoWidth":"40px","navigationMarginLeft":"60px","logoWidth":"0","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('hlsdrts','DRTS','{"loginInfo":{"title":"城轨国赛竞赛系统","loginPath":"/login?project=hlsdrts","loginParam":"DRTS","logoWidth":"300px","linkIcon":"@/assets/icon/link_hls.png","loginTitle":"空串","navigationLogoWidth":"180px","navigationMarginLeft":"195px","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designdrts','DRTS','{"loginInfo":{"title":"行车调度员设计平台国赛备战版","loginPath":"/design/login?project=drts","loginParam":"DRTS","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designhlsdrts','DRTS','{"loginInfo":{"title":"城轨国赛竞赛系统","loginPath":"/design/login?project=hlsdrts","loginParam":"DRTS","logoWidth":"300px","linkIcon":"@/assets/icon/link_hls.png","loginTitle":"空串","navigationLogoWidth":"180px","navigationMarginLeft":"195px","systemType":"020"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designxty','XTY','{"loginInfo":{"title":"西安铁路职业技术学院城市轨道交通设计平台","loginPath":"/design/login?project=xty","loginParam":"XTY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"013"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=xty"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designbjd','BJD','{"loginInfo":{"title":"城市轨道交通列车运行智慧辅助系统","loginPath":"/design/login?project=bjd","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bjd.png","bottomColumn":"","linkIcon":"","loginParam":"BJD","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=bjd"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designnty','NTY','{"loginInfo":{"title":"城轨高级信号设计系统(云平台通用版)","loginPath":"/design/login?project=nty","loginParam":"NTY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=nty"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designntyl','NTYL','{"loginInfo":{"title":"城轨高级信号设计系统(本地专用版)","loginPath":"/design/login?project=ntyl","loginParam":"NTYL","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=ntyl"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designntyc','NTYC','{"loginInfo":{"title":"城轨高级信号设计系统(云平台专用版)","loginPath":"/design/login?project=ntyc","loginParam":"NTYC","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=ntyc"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designsdy','SDY','{"loginInfo":{"title":"江苏电子信息职业学院城市轨道交通设计平台","loginPath":"/design/login?project=sdy","loginParam":"SDY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"021"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=sdy"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('gzb','GZB','{"loginInfo":{"title":"贵州装备制造职业学院城市轨道交通实训平台","loginPath":"/login?project=gzb","loginParam":"GZB","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"014"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=gzb"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designgzb','GZB','{"loginInfo":{"title":"贵州装备制造职业学院城市轨道交通设计平台","loginPath":"/design/login?project=gzb","titleDistance":"-150px","loginParam":"GZB","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"014"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=gzb"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('cgy','CGY','{"loginInfo":{"title":"成都工业职业技术学院线网车站运营虚拟仿真实训中心","loginPath":"/login?project=cgy","loginParam":"CGY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":1,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designcgy','CGY','{"loginInfo":{"title":"成都工业职业技术学院轨道交通虚拟仿真设计平台","loginPath":"/design/login?project=cgy","loginParam":"CGY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":1,"noSimulationQrCode":0,"registerCode":1,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('heb','HEB','{"loginInfo":{"title":"城市轨道交通综合行车模拟仿真系统V1.0","loginTitle":"城市轨道交通综合行车模拟仿真系统V1.0","logoWidth":"140px","loginPath":"/login?project=heb","titleDistance":"150px","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HEB","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"019"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":1,"noSimulationQrCode":1,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=heb"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designheb','HEB','{"loginInfo":{"title":"城市轨道交通设计平台V1.0","loginTitle":"城市轨道交通设计平台V1.0","logoWidth":"140px","titleDistance":"150px","loginPath":"/design/login?project=heb","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HEB","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"019"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":1,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=heb"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designhyd','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台V1.0","loginTitle":"空串","logoWidth":"140px","loginPath":"/design/login?project=hyd","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"DEFAULT","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=hyd"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('hyd','DEFAULT','{"loginInfo":{"title":"城市轨道交通综合行车模拟仿真系统V1.0","loginTitle":"空串","logoWidth":"140px","loginPath":"/login?project=hyd","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"DEFAULT","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=hyd"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('hydrailway','HYD_RAILWAY','{"loginInfo":{"title":"大铁交通综合行车模拟仿真系统V1.0","loginTitle":"空串","logoWidth":"140px","loginPath":"/login?project=hydrailway","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HYD_RAILWAY","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=hydrailway"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('xadt','XADT','{"loginInfo":{"title":"城市轨道交通实训平台","logoWidth":"60px","loginTitle":"运营一中心","homeTitle":"运营一中心","browserTitle":"西安地铁运营一中心城市轨道交通实训平台","loginPath":"/login?project=xadt","loginParam":"XADT","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"012"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=xadt"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('jyd','DEFAULT','{"loginInfo":{"title":"城市轨道交通实训平台","loginPath":"/login?project=jyd","logoWidth":"300px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","loginTitle":"空串","bottomColumn":"","bottomIcon":"@/assets/icon/bottom_jyd.png","linkIcon":"@/assets/icon/link_jyd.png","loginParam":"DEFAULT","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=jyd"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designhydrailway','HYD_RAILWAY','{"loginInfo":{"title":"大铁交通设计平台V1.0","loginTitle":"空串","logoWidth":"140px","loginPath":"/login?project=hydrailway","bottomColumn":"哈尔滨盈达科技有限公司 联系电话:0451-87001273","loginParam":"HYD_RAILWAY","navigationLogoWidth":"120px","navigationMarginLeft":"140px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=hydrailway"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designxadt','XADT','{"loginInfo":{"title":"城市轨道交通设计平台","logoWidth":"60px","loginTitle":"运营一中心","homeTitle":"运营一中心","browserTitle":"西安地铁运营一中心城市轨道交通设计平台","loginPath":"/design/login?project=xadt","loginParam":"XADT","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"012"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=xadt"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designjyd','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台","loginTitle":"空串","logoWidth":"300px","navigationLogoWidth":"120px","navigationMarginLeft":"140px","loginPath":"/design/login?project=jyd","bottomColumn":"","bottomIcon":"@/assets/icon/bottom_jyd.png","linkIcon":"@/assets/icon/link_jyd.png","loginParam":"DEFAULT","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=jyd"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('tky','DEFAULT','{"loginInfo":{"title":"城市轨道交通实训平台","loginPath":"/login?project=tky","loginTitle":"空串","bottomColumn":"","bottomIcon":"@/assets/icon/favicon_tky.png","loginParam":"DEFAULT","navigationLogoWidth":"75px","navigationMarginLeft":"90px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=tky"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designtky','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台","loginPath":"/design/login?project=tky","loginTitle":"空串","bottomIcon":"@/assets/icon/favicon_tky.png","bottomColumn":"","loginParam":"DEFAULT","navigationLogoWidth":"75px","navigationMarginLeft":"90px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=tky"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('bxkc','DEFAULT','{"loginInfo":{"title":"城市轨道交通实训平台","loginPath":"/login?project=bxkc","loginTitle":"空串","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bxkc.png","bottomColumn":"","linkIcon":"@/assets/icon/link_bxkc.png","loginParam":"DEFAULT","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=bxkc"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designbxkc','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台","loginPath":"/design/login?project=bxkc","loginTitle":"空串","logoWidth":"400px","bottomIcon":"@/assets/icon/favicon_bxkc.png","bottomColumn":"","linkIcon":"@/assets/icon/link_bxkc.png","loginParam":"DEFAULT","navigationLogoWidth":"160px","navigationMarginLeft":"175px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=bxkc"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('crsc','DEFAULT','{"loginInfo":{"title":"城市轨道交通实训平台","loginPath":"/login?project=crsc","loginTitle":"空串","logoWidth":"600px","bottomIcon":"@/assets/icon/favicon_crsc.png","bottomColumn":"","linkIcon":"@/assets/icon/link_crsc.png","titleIcon":"@/assets/icon/link_crsc.png","loginParam":"DEFAULT","navigationLogoWidth":"100px","navigationMarginLeft":"125px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=crsc"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designcrsc','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台","loginPath":"/design/login?project=crsc","loginTitle":"空串","logoWidth":"600px","bottomIcon":"@/assets/icon/favicon_crsc.png","bottomColumn":"","linkIcon":"@/assets/icon/link_crsc.png","titleIcon":"@/assets/icon/link_crsc.png","loginParam":"DEFAULT","navigationLogoWidth":"100px","navigationMarginLeft":"125px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=crsc"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('hls','DEFAULT','{"loginInfo":{"title":"城市轨道交通实训平台","loginPath":"/login?project=hls","loginTitle":"空串","logoWidth":"300px","linkIcon":"@/assets/icon/link_hls.png","bottomColumn":"北京和利时系统工程有限公司","loginParam":"DEFAULT","navigationLogoWidth":"180px","navigationMarginLeft":"195px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=hls"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('richor','RICHOR','{"loginInfo":{"title":"中航锐创城市轨道交通实训平台","loginPath":"/login?project=richor","loginParam":"RICHOR","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","navigationLogoWidth":"40px","navigationMarginLeft":"50px","systemType":"022"},"thirdLogin":1,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":1,"contectInfo":{},"noCopyRight":1}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designhls','DEFAULT','{"loginInfo":{"title":"城市轨道交通设计平台","loginPath":"/design/login?project=hls","loginTitle":"空串","logoWidth":"300px","linkIcon":"@/assets/icon/link_hls.png","bottomColumn":"北京和利时系统工程有限公司","loginParam":"DEFAULT","navigationLogoWidth":"180px","navigationMarginLeft":"195px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":0,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=hls"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('richorlesson3d','RICHOR','{"loginInfo":{"title":"中航锐创城市轨道交通实训平台","loginPath":"/login?project=richorlesson3d","loginParam":"RICHOR","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","navigationLogoWidth":"40px","navigationMarginLeft":"50px","systemType":"022"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designrichorjoint','RICHOR_JOINT','{"loginInfo":{"title":"中航锐创城市轨道交通设计平台","loginPath":"/design/login?project=richorjoint","loginParam":"RICHOR_JOINT","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","navigationLogoWidth":"40px","navigationMarginLeft":"50px","systemType":"023"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=richorjoint"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('richorjoint','RICHOR_JOINT','{"loginInfo":{"title":"中航锐创城市轨道交通实训平台","loginPath":"/login?project=richorjoint","loginParam":"RICHOR_JOINT","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","navigationLogoWidth":"40px","navigationMarginLeft":"50px","systemType":"023"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"cctvUrl":"http://192.168.1.254","otherPlatformUrl":"/design/login?project=richorjoint"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designsrsandbox','SR_SANDBOX','{"loginInfo":{"title":"上饶科技中等专业学校城市轨道交通设计平台","loginPath":"/design/login?project=srsandbox","loginParam":"SR_SANDBOX","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"024"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=srsandbox"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('srsandbox','SR_SANDBOX','{"loginInfo":{"title":"上饶科技中等专业学校城市轨道交通实训平台","loginPath":"/login?project=srsandbox","loginParam":"SR_SANDBOX","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"024"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=srsandbox"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designrichorygy','RICHOR_YGY','{"loginInfo":{"title":"扬州工业职业技术学院城市轨道交通设计平台","loginPath":"/design/login?project=richorygy","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","loginParam":"RICHOR_YGY","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":1,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designrichorhhcj','RICHOR_HHCJ','{"loginInfo":{"title":"红河财经学校城市轨道交通设计平台","loginPath":"/design/login?project=richorhhcj","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","loginParam":"RICHOR_HHCJ","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"027"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":1,"contectInfo":{},"noCopyRight":1,"otherPlatformUrl":"/login?project=richorhhcj"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('richorhhcj','RICHOR_HHCJ','{"loginInfo":{"title":"红河财经学校城市轨道交通实训平台","loginPath":"/login?project=richorhhcj","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","loginParam":"RICHOR_HHCJ","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"027"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":1,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":1,"contectInfo":{},"noCopyRight":1,"cctvUrl":"http://192.168.0.254","otherPlatformUrl":"/design/login?project=richorhhcj"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('richorygy','RICHOR_YGY','{"loginInfo":{"title":"扬州工业职业技术学院城市轨道交通实训平台","loginPath":"/login?project=richorygy","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","loginParam":"RICHOR_YGY","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":1,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":1,"contectInfo":{},"noCopyRight":1}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designrichorcxjs','RICHOR_CXJS','{"loginInfo":{"title":"长兴技师学院城市轨道交通设计平台","loginPath":"/design/login?project=richorcxjs","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","loginParam":"RICHOR_CXJS","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"011"},"thirdLogin":1,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":1,"contectInfo":{},"noCopyRight":1}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('richorcxjs','RICHOR_CXJS','{"loginInfo":{"title":"长兴技师学院城市轨道交通实训平台","loginPath":"/login?project=richorcxjs","bottomColumn":"中航锐创(北京)科技发展有限公司 联系电话:4000500081","loginParam":"RICHOR_CXJS","linkIcon":"@/assets/icon/favicon_richor.png","titleIcon":"@/assets/icon/favicon_richor.png","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"027"},"thirdLogin":1,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":1,"contectInfo":{},"noCopyRight":1}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designjxgm','JXGM','{"loginInfo":{"title":"江西工业贸易职业技术学院城市轨道交通设计平台","loginPath":"/design/login?project=jxgm","loginParam":"JXGM","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"025"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=jxgm"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('nologo','NOLOGO','{"loginInfo":{"title":"城市轨道交通实训平台","loginPath":"/login?project=nologo","loginParam":"NOLOGO","bottomColumn":"","navigationLogoWidth":"10px","navigationMarginLeft":"10px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=nologo"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designnologo','NOLOGO','{"loginInfo":{"title":"城市轨道交通设计平台","loginPath":"/design/login?project=nologo","loginParam":"NOLOGO","bottomColumn":"","navigationLogoWidth":"10px","navigationMarginLeft":"10px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=nologo"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('say','SAY','{"loginInfo":{"title":"江苏安全技术职业学院城市轨道交通实训平台","loginPath":"/login?project=say","loginParam":"SAY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"026"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=say"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designsay','SAY','{"loginInfo":{"title":"江苏安全技术职业学院城市轨道交通设计平台","loginPath":"/design/login?project=say","loginParam":"SAY","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"026"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=say"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('unittecsty','UNITTEC_STY','{"loginInfo":{"title":"轨道交通实训平台","loginPath":"/login?project=unittecsty","loginParam":"UNITTEC_STY","titleDistance":"-150px","titleIcon":"@/assets/icon/link_unittec.png","linkIcon":"@/assets/icon/link_unittec.png","titleImgWidth":"250px","navigationLogoWidth":"60px","navigationMarginLeft":"80px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=unittecsty"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designunittecsty','UNITTEC_STY','{"loginInfo":{"title":"轨道交通设计平台","loginPath":"/design/login?project=unittecsty","loginParam":"UNITTEC_STY","titleDistance":"-150px","titleIcon":"@/assets/icon/link_unittec.png","linkIcon":"@/assets/icon/link_unittec.png","titleImgWidth":"250px","navigationLogoWidth":"60px","navigationMarginLeft":"80px","systemType":"011"},"thirdLogin":0,"bottomColumnOnlyCon":1,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=unittecsty"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('teaching','TEACHING','{"loginInfo":{"title":"教学通用实训平台","loginPath":"/login?project=teaching","loginParam":"TEACHING","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"028"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=teaching"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('designteaching','TEACHING','{"loginInfo":{"title":"教学通用设计平台","loginPath":"/design/login?project=teaching","loginParam":"TEACHING","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"028"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":0,"mainBodyNoShow":0,"projectLoginStyle":0,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/login?project=teaching"}',NOW(),NOW(),1);
|
||||
insert into project_view(`mark_key`,`project`,`view_setting`,`create_time`,`update_time`,`status`) VALUES ('jxgm','JXGM','{"loginInfo":{"title":"江西工业贸易职业技术学院城市轨道交通实训平台","loginPath":"/login?project=jxgm","loginParam":"JXGM","titleDistance":"-150px","navigationLogoWidth":"40px","navigationMarginLeft":"60px","systemType":"024"},"thirdLogin":0,"bottomColumnOnlyCon":0,"mapList":1,"caseHide":0,"versionBaseNoShow":1,"mainBodyNoShow":1,"projectLoginStyle":1,"noQrcode":0,"noSimulationQrCode":0,"registerCode":0,"contectUs":0,"contectInfo":{},"noCopyRight":0,"otherPlatformUrl":"/design/login?project=jxgm"}',NOW(),NOW(),1);
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.controller;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.services.ILearnService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
@ -18,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*学习吧接口
|
||||
* 学习吧接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(path = "/api/learn")
|
||||
@ -28,7 +27,7 @@ public class LearnController {
|
||||
private ILearnService iLearnService;
|
||||
|
||||
/**
|
||||
*分页查询留言板列表
|
||||
* 分页查询留言板列表
|
||||
*/
|
||||
@GetMapping(path = "/post")
|
||||
public PageVO<LearnPostVO> queryPagedPost(LearnPostPagedQueryVO queryVO) {
|
||||
@ -36,15 +35,15 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询项目留言板
|
||||
* 查询项目留言板
|
||||
*/
|
||||
@GetMapping("/{project}/post")
|
||||
public LearnPostVO queryPost(@PathVariable Project project) {
|
||||
public LearnPostVO queryPost(@PathVariable String project) {
|
||||
return iLearnService.queryPost(project);
|
||||
}
|
||||
|
||||
/**
|
||||
*新建帖子
|
||||
* 新建帖子
|
||||
*/
|
||||
@PostMapping(path = "/post")
|
||||
public Long createPost(@RequestBody @Validated LearnPostCreateVO createVO, @RequestAttribute AccountVO user) {
|
||||
@ -52,7 +51,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*编辑留言板基础信息
|
||||
* 编辑留言板基础信息
|
||||
*/
|
||||
@PutMapping("/{postId}")
|
||||
public void updatePost(@PathVariable Long postId, @RequestBody @Validated LearnPostUpdateVO updateVO,
|
||||
@ -61,7 +60,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取帖子信息
|
||||
* 获取帖子信息
|
||||
*/
|
||||
@GetMapping(path = "/{postId}")
|
||||
public LearnPostVO getPostInfo(@PathVariable Long postId) {
|
||||
@ -69,7 +68,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*赞贴
|
||||
* 赞贴
|
||||
*/
|
||||
@PostMapping(path = "/post/{postId}/like")
|
||||
public void likePost(@PathVariable Long postId, @RequestAttribute AccountVO user) {
|
||||
@ -77,7 +76,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*踩贴
|
||||
* 踩贴
|
||||
*/
|
||||
@PostMapping(path = "/post/{postId}/unlike")
|
||||
public void unlikePost(@PathVariable Long postId, @RequestAttribute AccountVO user) {
|
||||
@ -85,7 +84,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*置顶-管理员操作
|
||||
* 置顶-管理员操作
|
||||
*/
|
||||
@PutMapping(path = "/{postId}/top")
|
||||
public void top(@PathVariable Long postId, @RequestAttribute AccountVO user) {
|
||||
@ -93,7 +92,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*删除帖子-管理员操作
|
||||
* 删除帖子-管理员操作
|
||||
*/
|
||||
@DeleteMapping(path = "/{postId}")
|
||||
public void deletePost(@PathVariable Long postId, @RequestAttribute AccountVO user) {
|
||||
@ -103,7 +102,7 @@ public class LearnController {
|
||||
//--------------------------------- 留言 ---------------------------------
|
||||
|
||||
/**
|
||||
*留言
|
||||
* 留言
|
||||
*/
|
||||
@PostMapping("/message/create")
|
||||
public long createMessage(@RequestBody @Validated LearnMessageCreateVO messageCreateVO, @RequestAttribute AccountVO user) {
|
||||
@ -111,7 +110,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*成工院留言
|
||||
* 成工院留言
|
||||
*/
|
||||
@PostMapping("/cgy/message/create")
|
||||
public long cgyCreateMessage(@RequestBody @Validated LearnMessageCreateVO messageCreateVO) {
|
||||
@ -119,7 +118,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*分页查询留言
|
||||
* 分页查询留言
|
||||
*/
|
||||
@GetMapping("/{postId}/message/pagedQuery/postId")
|
||||
public PageVO<LearnMessageVO> pagedQueryMessageByPostId(@PathVariable Long postId, LearnMessagePagedQueryVO queryVO) {
|
||||
@ -127,15 +126,15 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*根据项目分页查询留言
|
||||
* 根据项目分页查询留言
|
||||
*/
|
||||
@GetMapping("/{project}/message/pagedQuery/project")
|
||||
public PageVO<LearnMessageVO> pagedQueryMessageByProject(@PathVariable Project project, LearnMessagePagedQueryVO queryVO) {
|
||||
public PageVO<LearnMessageVO> pagedQueryMessageByProject(@PathVariable String project, LearnMessagePagedQueryVO queryVO) {
|
||||
return iLearnService.pagedQueryMessageByProject(project, queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*删除留言(管理员)
|
||||
* 删除留言(管理员)
|
||||
*/
|
||||
@DeleteMapping("/{messageId}/deleteMessage/admin")
|
||||
public void adminDeleteMessage(@PathVariable Long messageId, @RequestAttribute AccountVO user) {
|
||||
@ -143,7 +142,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*删除留言(用户删自己的)
|
||||
* 删除留言(用户删自己的)
|
||||
*/
|
||||
@DeleteMapping("/{messageId}/deleteMessage/user")
|
||||
public void userDeleteMessage(@PathVariable Long messageId, @RequestAttribute AccountVO user) {
|
||||
@ -165,7 +164,7 @@ public class LearnController {
|
||||
//----------------------------------------- 评论 -----------------------------------------
|
||||
|
||||
/**
|
||||
*分页查询留言评论列表
|
||||
* 分页查询留言评论列表
|
||||
*/
|
||||
@GetMapping(path = "/{messageId}/comment")
|
||||
public PageVO<LearnCommentVO> queryPagedComment(@PathVariable Long messageId, PageQueryVO queryVO) {
|
||||
@ -173,7 +172,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询留言回复列表
|
||||
* 查询留言回复列表
|
||||
*/
|
||||
@GetMapping(path = "/{messageId}/list")
|
||||
public List<LearnCommentVO> queryCommentList(@PathVariable Long messageId) {
|
||||
@ -181,7 +180,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*评论
|
||||
* 评论
|
||||
*/
|
||||
@PostMapping(path = "/{messageId}/comment")
|
||||
public void comment(@PathVariable Long messageId,
|
||||
@ -191,7 +190,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*成工院评论
|
||||
* 成工院评论
|
||||
*/
|
||||
@PostMapping(path = "/cgy/{messageId}/comment")
|
||||
public void cygComment(@PathVariable Long messageId,
|
||||
@ -200,7 +199,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*回复
|
||||
* 回复
|
||||
*/
|
||||
@PostMapping(path = "/{messageId}/{commentId}/comment")
|
||||
public void comment(@PathVariable Long messageId, @PathVariable Long commentId,
|
||||
@ -210,7 +209,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*赞回复
|
||||
* 赞回复
|
||||
*/
|
||||
@PostMapping(path = "/comment/{commentId}/like")
|
||||
public void likeComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
|
||||
@ -218,7 +217,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*踩回复
|
||||
* 踩回复
|
||||
*/
|
||||
@PostMapping(path = "/comment/{commentId}/unlike")
|
||||
public void unlikeComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
|
||||
@ -226,7 +225,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*取消置顶-管理员操作
|
||||
* 取消置顶-管理员操作
|
||||
*/
|
||||
@PutMapping(path = "/{postId}/unTop")
|
||||
public void unTop(@PathVariable Long postId, @RequestAttribute AccountVO user) {
|
||||
@ -234,7 +233,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*删除评论-管理员操作
|
||||
* 删除评论-管理员操作
|
||||
*/
|
||||
@DeleteMapping(path = "/{commentId}/deleteComment/admin")
|
||||
public void adminDeleteComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
|
||||
@ -242,7 +241,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*删除评论-用户操作
|
||||
* 删除评论-用户操作
|
||||
*/
|
||||
@DeleteMapping(path = "/{commentId}/deleteComment/user")
|
||||
public void userDeleteComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
|
||||
@ -250,8 +249,9 @@ public class LearnController {
|
||||
}
|
||||
|
||||
//----------------------------------------- 改数据 -----------------------------------------
|
||||
|
||||
/**
|
||||
*管理员修改留言数据
|
||||
* 管理员修改留言数据
|
||||
*/
|
||||
@PutMapping(path = "/admin/update/message")
|
||||
public void adminUpdateMessage(LearnMessageUpdateVO messageUpdateVO) {
|
||||
@ -259,7 +259,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*管理员修改评论数据
|
||||
* 管理员修改评论数据
|
||||
*/
|
||||
@PutMapping(path = "/admin/update/comment")
|
||||
public void adminUpdateComment(LearnCommentUpdateVO commentUpdateVO) {
|
||||
@ -267,7 +267,7 @@ public class LearnController {
|
||||
}
|
||||
|
||||
/**
|
||||
*成工院留言时间打散
|
||||
* 成工院留言时间打散
|
||||
*/
|
||||
@PutMapping(path = "/cgy/updateMessageTime")
|
||||
public void cgyUpdateMessageTime() {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.controller;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.exception.BaseException;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.auth.IAuthenticateService;
|
||||
@ -35,8 +34,7 @@ public class LoginController {
|
||||
public LoginStatusVO getWmLoginUrl(@NotBlank String clientId, @NotBlank String secret,
|
||||
String project, @RequestParam(required = false) String deviceCode) {
|
||||
try {
|
||||
Project pro = Project.valueOf(project);
|
||||
return this.iAuthenticateService.getWmLoginUrl(clientId, secret, pro, deviceCode);
|
||||
return this.iAuthenticateService.getWmLoginUrl(clientId, secret, project, deviceCode);
|
||||
} catch (BaseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.controller;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.RoleEnum;
|
||||
import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
|
||||
import club.joylink.rtss.controller.advice.Role;
|
||||
@ -29,7 +28,7 @@ public class ProjectServerController {
|
||||
@GetMapping("/project/{project}")
|
||||
public ProjectServerVO getByProject(@PathVariable String project) {
|
||||
try {
|
||||
return this.serverService.getByProject(Project.valueOf(project));
|
||||
return this.serverService.getByProject(project);
|
||||
} catch (BaseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
|
@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*出题规则
|
||||
* 出题规则
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/questionsRule")
|
||||
@ -23,18 +23,18 @@ public class RaceQuestionsRuleController {
|
||||
private IRaceQuestionsRuleService iRaceQuestionsRuleService;
|
||||
|
||||
/**
|
||||
*添加规则
|
||||
* 添加规则
|
||||
*/
|
||||
@PostMapping
|
||||
public TheoryQuestionsRuleVO create(@RequestBody @Validated TheoryQuestionsRuleVO ruleVO,
|
||||
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) {
|
||||
ruleVO.setProjectCode(loginUserInfoVO.getProject().name());
|
||||
ruleVO.setProjectCode(loginUserInfoVO.getProject());
|
||||
TheoryQuestionsRuleVO vo = this.iRaceQuestionsRuleService.create(ruleVO);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
*获取规则列表
|
||||
* 获取规则列表
|
||||
*/
|
||||
@GetMapping
|
||||
public List<TheoryQuestionsRuleVO> queryAll() {
|
||||
@ -43,17 +43,18 @@ public class RaceQuestionsRuleController {
|
||||
}
|
||||
|
||||
/**
|
||||
*分页获取规则列表
|
||||
* 分页获取规则列表
|
||||
*/
|
||||
@GetMapping("paging")
|
||||
public PageVO<TheoryQuestionsRuleVO> pagingQueryRules(TheoryQuestionRuleQueryVO queryVO, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
|
||||
queryVO.setProjectCode(loginInfo.getProject().name());
|
||||
public PageVO<TheoryQuestionsRuleVO> pagingQueryRules(TheoryQuestionRuleQueryVO queryVO
|
||||
, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
PageVO<TheoryQuestionsRuleVO> list = this.iRaceQuestionsRuleService.pagingQueryRules(queryVO);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
*删除规则
|
||||
* 删除规则
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public void delete(@PathVariable Integer id) {
|
||||
@ -61,7 +62,7 @@ public class RaceQuestionsRuleController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询规则内容
|
||||
* 查询规则内容
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public TheoryQuestionsRuleVO get(@PathVariable Integer id) {
|
||||
@ -69,7 +70,7 @@ public class RaceQuestionsRuleController {
|
||||
}
|
||||
|
||||
/**
|
||||
*更改规则内容
|
||||
* 更改规则内容
|
||||
*/
|
||||
@PutMapping("{id}")
|
||||
public TheoryQuestionsRuleVO get(@PathVariable Integer id, @RequestBody @Validated TheoryQuestionsRuleVO ruleVO) {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package club.joylink.rtss.controller.competition.question;
|
||||
|
||||
|
||||
import club.joylink.rtss.services.completition.question.PagerQuestionService;
|
||||
import club.joylink.rtss.services.papger.PagerQuestionService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.PagerLableQueryVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.PaperQuestionVO;
|
||||
import club.joylink.rtss.vo.client.question.QuestionQueryVO;
|
||||
import club.joylink.rtss.vo.client.question.v2.PagerLableQueryVO;
|
||||
import club.joylink.rtss.vo.client.question.v2.PaperQuestionVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -16,9 +16,8 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*题库管理接口
|
||||
* 题库管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(path = "/api/pager_question")
|
||||
@ -27,50 +26,51 @@ public class PagerQuestionBankController {
|
||||
|
||||
@Autowired
|
||||
private PagerQuestionService questionBankService;
|
||||
|
||||
/**
|
||||
*分页查询题目
|
||||
* 分页查询题目
|
||||
*/
|
||||
@GetMapping(path = "/paging")
|
||||
public PageVO<PaperQuestionVO> pagingQueryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject().name());
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
return questionBankService.pagingQueryQuestions(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*查询题目列表
|
||||
* 查询题目列表
|
||||
*/
|
||||
@GetMapping(path = "")
|
||||
public List<PaperQuestionVO> queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject().name());
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
return questionBankService.queryQuestions(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取题目信息
|
||||
* 获取题目信息
|
||||
*/
|
||||
@GetMapping(path = "/{questionId}")
|
||||
public PaperQuestionVO getQuestion(@PathVariable Long questionId) {
|
||||
return questionBankService.getQuestion(questionId);
|
||||
return questionBankService.getQuestion(questionId, false);
|
||||
}
|
||||
|
||||
/**
|
||||
*添加题目
|
||||
* 添加题目
|
||||
*/
|
||||
@PostMapping(path = "")
|
||||
public void addQuestion(@Validated @RequestBody PaperQuestionVO questionVO, @RequestAttribute LoginUserInfoVO loginInfo,
|
||||
@RequestAttribute AccountVO user) {
|
||||
questionVO.setProjectCode(loginInfo.getProject().name());
|
||||
questionVO.setProjectCode(loginInfo.getProject());
|
||||
questionBankService.saveOrUpdate(questionVO, user);
|
||||
}
|
||||
|
||||
/**
|
||||
*导入项目或单位试题库
|
||||
* 导入项目或单位试题库
|
||||
*/
|
||||
@PostMapping(path = "/import")
|
||||
public void importProjectQuestion(@Validated @RequestBody List<PaperQuestionVO> questions, @RequestAttribute LoginUserInfoVO loginInfo,
|
||||
@RequestAttribute AccountVO user, @RequestParam(required = false, name = "id") Long companyId) {
|
||||
|
||||
questionBankService.importProjectQuestion(questions, loginInfo.getProject().name(), companyId,user);
|
||||
questionBankService.importProjectQuestion(questions, loginInfo.getProject(), companyId, user);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,26 +78,27 @@ public class PagerQuestionBankController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(path="/lable")
|
||||
public Collection<String> findAllLable(@RequestAttribute LoginUserInfoVO loginInfo /*@PathVariable Long companyId*/){
|
||||
return this.questionBankService.findAllLable(loginInfo.getProject().name());
|
||||
@GetMapping(path = "/lable")
|
||||
public Collection<String> findAllLable(@RequestAttribute LoginUserInfoVO loginInfo /*@PathVariable Long companyId*/) {
|
||||
return this.questionBankService.findAllLable(loginInfo.getProject());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据标签查询所有的题型
|
||||
|
||||
*
|
||||
* @param queryVO
|
||||
* @return
|
||||
*/
|
||||
// @PostMapping(path="/{companyId}/question")
|
||||
@PostMapping(path="/lable/question")
|
||||
public List<PaperQuestionVO> findByLable(@RequestAttribute LoginUserInfoVO loginInfo, @RequestBody PagerLableQueryVO queryVO){
|
||||
return this.questionBankService.queryQuestionsForRaceLable(loginInfo.getProject().name(),queryVO,false);
|
||||
@PostMapping(path = "/lable/question")
|
||||
public List<PaperQuestionVO> findByLable(@RequestAttribute LoginUserInfoVO loginInfo, @RequestBody PagerLableQueryVO queryVO) {
|
||||
return this.questionBankService.queryQuestionsForRaceLable(loginInfo.getProject(), queryVO, false);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新题目
|
||||
*
|
||||
* @param questionId
|
||||
* @param loginInfo
|
||||
* @param questionVO
|
||||
@ -106,12 +107,12 @@ public class PagerQuestionBankController {
|
||||
@PutMapping(path = "/{questionId}")
|
||||
public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo, @RequestBody PaperQuestionVO questionVO, @RequestAttribute AccountVO user) {
|
||||
questionVO.setId(questionId);
|
||||
questionVO.setProjectCode(loginInfo.getProject().name());
|
||||
questionBankService.saveOrUpdate(questionVO,user);
|
||||
questionVO.setProjectCode(loginInfo.getProject());
|
||||
questionBankService.saveOrUpdate(questionVO, user);
|
||||
}
|
||||
|
||||
/**
|
||||
*删除题目
|
||||
* 删除题目
|
||||
*/
|
||||
@DeleteMapping(path = "")
|
||||
public void deleteQuestion(@RequestBody List<Long> questionId) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package club.joylink.rtss.controller.competition.question;
|
||||
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.services.completition.question.IQuestionBankService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -18,7 +17,7 @@ import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*题库管理接口
|
||||
* 题库管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(path = "/api/questionBank")
|
||||
@ -28,25 +27,25 @@ public class QuestionBankController {
|
||||
private IQuestionBankService iQuestionBankService;
|
||||
|
||||
/**
|
||||
*分页查询题目
|
||||
* 分页查询题目
|
||||
*/
|
||||
@GetMapping(path = "/questions/paging")
|
||||
public PageVO<QuestionVO> pagingQueryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject().name());
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
return iQuestionBankService.pagingQueryQuestions(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*查询题目列表
|
||||
* 查询题目列表
|
||||
*/
|
||||
@GetMapping(path = "/questions")
|
||||
public List<QuestionVO> queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo,QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject().name());
|
||||
public List<QuestionVO> queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
return iQuestionBankService.queryQuestions(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取题目信息
|
||||
* 获取题目信息
|
||||
*/
|
||||
@GetMapping(path = "/questions/{questionId}")
|
||||
public QuestionVO getQuestion(@PathVariable Long questionId) {
|
||||
@ -54,36 +53,36 @@ public class QuestionBankController {
|
||||
}
|
||||
|
||||
/**
|
||||
*添加题目
|
||||
* 添加题目
|
||||
*/
|
||||
@PostMapping(path = "/questions")
|
||||
public void addQuestion(@Validated @RequestBody QuestionVO questionVO,@RequestAttribute LoginUserInfoVO loginInfo,
|
||||
public void addQuestion(@Validated @RequestBody QuestionVO questionVO, @RequestAttribute LoginUserInfoVO loginInfo,
|
||||
@RequestAttribute AccountVO user) {
|
||||
questionVO.setProjectCode(loginInfo.getProject().name());
|
||||
questionVO.setProjectCode(loginInfo.getProject());
|
||||
iQuestionBankService.addQuestion(questionVO, user);
|
||||
}
|
||||
|
||||
/**
|
||||
*导入项目或单位试题库
|
||||
* 导入项目或单位试题库
|
||||
*/
|
||||
@PostMapping(path = "/questions/import")
|
||||
public void importProjectQuestion(@Validated @RequestBody List<QuestionVO> questions, @RequestAttribute LoginUserInfoVO loginInfo,
|
||||
@RequestAttribute AccountVO user, @RequestParam(required = false, name = "id") Long companyId) {
|
||||
|
||||
iQuestionBankService.importProjectQuestion(questions, loginInfo.getProject().name(), companyId,user);
|
||||
iQuestionBankService.importProjectQuestion(questions, loginInfo.getProject(), companyId, user);
|
||||
}
|
||||
|
||||
/**
|
||||
*更新题目
|
||||
* 更新题目
|
||||
*/
|
||||
@PutMapping(path = "/questions/{questionId}")
|
||||
public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo,@RequestBody QuestionVO questionVO) {
|
||||
questionVO.setProjectCode(loginInfo.getProject().name());
|
||||
public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo, @RequestBody QuestionVO questionVO) {
|
||||
questionVO.setProjectCode(loginInfo.getProject());
|
||||
iQuestionBankService.updateQuestion(questionId, questionVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*删除题目
|
||||
* 删除题目
|
||||
*/
|
||||
@DeleteMapping(path = "/questions/{questionId}")
|
||||
public void deleteQuestion(@PathVariable Long questionId) {
|
||||
@ -91,7 +90,7 @@ public class QuestionBankController {
|
||||
}
|
||||
|
||||
/**
|
||||
*根据题目查询选项
|
||||
* 根据题目查询选项
|
||||
*/
|
||||
@GetMapping(path = "/questions/{questionId}/options")
|
||||
public List<QuestionOptionVO> getOptionsByQuestionId(@PathVariable Long questionId) {
|
||||
@ -99,22 +98,20 @@ public class QuestionBankController {
|
||||
}
|
||||
|
||||
/**
|
||||
*根据题型获取题目数量
|
||||
* 根据题型获取题目数量
|
||||
*/
|
||||
@GetMapping(path = "/number")
|
||||
public Integer getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, String type, Long companyId) {
|
||||
|
||||
return iQuestionBankService.getNumberWithType(type, loginInfo.getProject().name(), companyId);
|
||||
return iQuestionBankService.getNumberWithType(type, loginInfo.getProject(), companyId);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取题型数量
|
||||
* 获取题型数量
|
||||
*/
|
||||
@GetMapping(path = "/type/number")
|
||||
public List<TheoryQuestionCountVO> getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, @RequestParam(required = false) Long companyId) {
|
||||
|
||||
String projectCode = Project.isDefault(loginInfo.getProject()) ? null : loginInfo.getProject().name();
|
||||
return iQuestionBankService.countNumByType(projectCode, companyId);
|
||||
return iQuestionBankService.countNumByType(loginInfo.getProject(), companyId);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,117 @@
|
||||
package club.joylink.rtss.controller.competition.question;
|
||||
|
||||
|
||||
import club.joylink.rtss.services.completition.question.IQuestionBankService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.competition.TheoryQuestionCountVO;
|
||||
import club.joylink.rtss.vo.client.question.QuestionOptionVO;
|
||||
import club.joylink.rtss.vo.client.question.QuestionQueryVO;
|
||||
import club.joylink.rtss.vo.client.question.QuestionVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 题库管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(path = "/api/questionBank2")
|
||||
public class QuestionBankController2 {
|
||||
|
||||
@Autowired
|
||||
private IQuestionBankService iQuestionBankService;
|
||||
|
||||
/**
|
||||
* 分页查询题目
|
||||
*/
|
||||
@GetMapping(path = "/questions/paging")
|
||||
public PageVO<QuestionVO> pagingQueryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
return iQuestionBankService.pagingQueryQuestions(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询题目列表
|
||||
*/
|
||||
@GetMapping(path = "/questions")
|
||||
public List<QuestionVO> queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setProjectCode(loginInfo.getProject());
|
||||
return iQuestionBankService.queryQuestions(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题目信息
|
||||
*/
|
||||
@GetMapping(path = "/questions/{questionId}")
|
||||
public QuestionVO getQuestion(@PathVariable Long questionId) {
|
||||
return iQuestionBankService.getQuestion(questionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加题目
|
||||
*/
|
||||
@PostMapping(path = "/questions")
|
||||
public void addQuestion(@Validated @RequestBody QuestionVO questionVO, @RequestAttribute LoginUserInfoVO loginInfo,
|
||||
@RequestAttribute AccountVO user) {
|
||||
questionVO.setProjectCode(loginInfo.getProject());
|
||||
iQuestionBankService.addQuestion(questionVO, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入项目或单位试题库
|
||||
*/
|
||||
@PostMapping(path = "/questions/import")
|
||||
public void importProjectQuestion(@Validated @RequestBody List<QuestionVO> questions, @RequestAttribute LoginUserInfoVO loginInfo,
|
||||
@RequestAttribute AccountVO user, @RequestParam(required = false, name = "id") Long companyId) {
|
||||
|
||||
iQuestionBankService.importProjectQuestion(questions, loginInfo.getProject(), companyId, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新题目
|
||||
*/
|
||||
@PutMapping(path = "/questions/{questionId}")
|
||||
public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo, @RequestBody QuestionVO questionVO) {
|
||||
questionVO.setProjectCode(loginInfo.getProject());
|
||||
iQuestionBankService.updateQuestion(questionId, questionVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题目
|
||||
*/
|
||||
@DeleteMapping(path = "/questions/{questionId}")
|
||||
public void deleteQuestion(@PathVariable Long questionId) {
|
||||
iQuestionBankService.deleteQuestion(questionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据题目查询选项
|
||||
*/
|
||||
@GetMapping(path = "/questions/{questionId}/options")
|
||||
public List<QuestionOptionVO> getOptionsByQuestionId(@PathVariable Long questionId) {
|
||||
return iQuestionBankService.getOptionsByQuestionId(questionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据题型获取题目数量
|
||||
*/
|
||||
@GetMapping(path = "/number")
|
||||
public Integer getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, String type, Long companyId) {
|
||||
|
||||
return iQuestionBankService.getNumberWithType(type, loginInfo.getProject(), companyId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题型数量
|
||||
*/
|
||||
@GetMapping(path = "/type/number")
|
||||
public List<TheoryQuestionCountVO> getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, @RequestParam(required = false) Long companyId) {
|
||||
return iQuestionBankService.countNumByType(loginInfo.getProject(), companyId);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.controller.permission;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.RoleEnum;
|
||||
import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
|
||||
import club.joylink.rtss.controller.advice.Role;
|
||||
@ -20,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*权限分发管理接口
|
||||
* 权限分发管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/distribute")
|
||||
@ -30,7 +29,7 @@ public class PermissionDistributeController {
|
||||
private IPermissionDistributeService permissionDistributeService;
|
||||
|
||||
/**
|
||||
*分页查询权限分发数据
|
||||
* 分页查询权限分发数据
|
||||
*/
|
||||
@GetMapping(path = "")
|
||||
public PageVO<DistributeVO> queryPagedDistribute(PermissionDistributeQueryVO queryVO) {
|
||||
@ -38,7 +37,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*生成打包分发二维码
|
||||
* 生成打包分发二维码
|
||||
*/
|
||||
@GetMapping(path = "/package/qrCode")
|
||||
public String generateQrCode(Long id, @RequestAttribute(value = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
|
||||
@ -46,7 +45,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*权限分发立即失效
|
||||
* 权限分发立即失效
|
||||
*/
|
||||
@GetMapping(path = "/{id}/invalid")
|
||||
public void immediateInvalid(@PathVariable Long id) {
|
||||
@ -54,7 +53,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*从订单分发权限,获取权限分发二维码
|
||||
* 从订单分发权限,获取权限分发二维码
|
||||
*/
|
||||
@GetMapping(path = "/{orderCode}/distribute")
|
||||
public String givePermission(@PathVariable String orderCode, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -62,7 +61,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*权限获取
|
||||
* 权限获取
|
||||
*/
|
||||
@GetMapping(path = "/getPermission")
|
||||
public void getPermission(Long state, @RequestAttribute AccountVO user) {
|
||||
@ -71,6 +70,7 @@ public class PermissionDistributeController {
|
||||
|
||||
/**
|
||||
* 将权限分发包分发给指定账户
|
||||
*
|
||||
* @param id
|
||||
* @param accountId
|
||||
* @param user
|
||||
@ -82,7 +82,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*快速生成权限分发
|
||||
* 快速生成权限分发
|
||||
*/
|
||||
@PostMapping(path = "/createQuickly")
|
||||
public String createQuickly(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -90,7 +90,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*微信小程序扫码获取权限
|
||||
* 微信小程序扫码获取权限
|
||||
*/
|
||||
@GetMapping(path = "/permission")
|
||||
public List<UserPermissionVO> wmGetPermission(String code, Long id) {
|
||||
@ -98,7 +98,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*用户权限转增分发打包生成权限
|
||||
* 用户权限转增分发打包生成权限
|
||||
*/
|
||||
@PostMapping(path = "/packageUserPermission")
|
||||
public String packageUserPermission(@RequestBody @Validated UserPermissionDistributeVO userPermissionAndAmountVO, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -106,7 +106,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询个人权限分发列表
|
||||
* 查询个人权限分发列表
|
||||
*/
|
||||
@GetMapping(path = "/personal")
|
||||
public List<DistributeVO> queryPersonalDistributeList(@RequestAttribute AccountVO user) {
|
||||
@ -114,7 +114,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询权限分发领取用户列表
|
||||
* 查询权限分发领取用户列表
|
||||
*/
|
||||
@GetMapping(path = "/{id}/users")
|
||||
public List<UserPermissionVO> queryDistributeGetUsers(@PathVariable Long id, @RequestAttribute AccountVO user) {
|
||||
@ -122,7 +122,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*回收权限分发到用户权限中
|
||||
* 回收权限分发到用户权限中
|
||||
*/
|
||||
@PutMapping(path = "/{id}/restore")
|
||||
public void restore(@PathVariable Long id) {
|
||||
@ -130,7 +130,7 @@ public class PermissionDistributeController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询权限分发包详情
|
||||
* 查询权限分发包详情
|
||||
*/
|
||||
@GetMapping(path = "/package/{id}/detail")
|
||||
public PageVO<DistributeVO> queryPackageDetail(@PathVariable Long id,
|
||||
@ -143,7 +143,7 @@ public class PermissionDistributeController {
|
||||
*创建项目下所有地图权限的权限分发
|
||||
*/
|
||||
@PostMapping("/{project}/allMap/distribute")
|
||||
public String createAllMapDistribute(@PathVariable Project project, Integer num, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
public String createAllMapDistribute(@PathVariable String project, Integer num, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
return permissionDistributeService.createAllMapDistribute(project, num, loginInfo);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package club.joylink.rtss.controller.project;
|
||||
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
@ -8,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 项目设备管理接口(新)
|
||||
@ -29,11 +31,6 @@ public class ProjectInfoController {
|
||||
return projectService.getAllProject();
|
||||
}
|
||||
|
||||
@GetMapping("/mark/{project}")
|
||||
public Project getProjectByMarkKey(@PathVariable String project) {
|
||||
return projectService.queryProjectByMarkKey(project);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public Project getProjectById(@PathVariable Long id) {
|
||||
return projectService.queryProjectById(id);
|
||||
@ -58,4 +55,40 @@ public class ProjectInfoController {
|
||||
public List<Project.SimpleProject> queryProjectSimpleInfo() {
|
||||
return projectService.getSimpleProjectList();
|
||||
}
|
||||
|
||||
@GetMapping("/viewSetting/page")
|
||||
public PageVO<ProjectView> projectViewPagingQuery(PageQueryVO queryVO) {
|
||||
return projectService.projectViewPagingQuery(queryVO);
|
||||
}
|
||||
|
||||
@GetMapping("/viewSetting/all")
|
||||
public List<ProjectView> getAllProjectView() {
|
||||
return projectService.getAllProjectView();
|
||||
}
|
||||
|
||||
@GetMapping("/viewSetting/{id}")
|
||||
public ProjectView getProjectViewById(@PathVariable Long id) {
|
||||
return projectService.queryProjectViewById(id);
|
||||
}
|
||||
|
||||
@DeleteMapping("/viewSetting/del/{id}")
|
||||
public void delProjectViewById(@PathVariable Long id) {
|
||||
projectService.deleteProjectView(id);
|
||||
}
|
||||
|
||||
@PutMapping("/viewSetting/update")
|
||||
public void updateProjectView(@RequestBody ProjectView projectView) {
|
||||
projectService.updateProjectView(projectView);
|
||||
}
|
||||
|
||||
@PostMapping("/viewSetting/save")
|
||||
public void saveProjectView(@RequestBody ProjectView projectView) {
|
||||
projectService.saveProjectView(projectView);
|
||||
}
|
||||
|
||||
@GetMapping("/viewSetting/project/{project}")
|
||||
public Map<String, Object> queryProjectViewSetting(@PathVariable String project) {
|
||||
return projectService.getProjectViewSetting(project);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
package club.joylink.rtss.dao;
|
||||
package club.joylink.rtss.dao.paper;
|
||||
|
||||
import club.joylink.rtss.entity.question.PaperQuestion;
|
||||
import club.joylink.rtss.entity.question.PaperQuestionExample;
|
||||
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||
import club.joylink.rtss.entity.paper.question.PaperQuestion;
|
||||
import club.joylink.rtss.entity.paper.question.PaperQuestionExample;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@ -10,7 +11,7 @@ import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface PagerQuestionDAO extends MyBatisBaseDao<PaperQuestion, Long, PaperQuestionExample>{
|
||||
public interface PagerQuestionDAO extends MyBatisBaseDao<PaperQuestion, Long, PaperQuestionExample> {
|
||||
@Select("<script>" +
|
||||
"select * from paper_question where 1 = 1 " +
|
||||
"<choose>" +
|
@ -1,5 +1,6 @@
|
||||
package club.joylink.rtss.dao;
|
||||
package club.joylink.rtss.dao.project;
|
||||
|
||||
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectExample;
|
||||
import org.springframework.stereotype.Repository;
|
@ -0,0 +1,17 @@
|
||||
package club.joylink.rtss.dao.project;
|
||||
|
||||
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.entity.project.ProjectViewExample;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Project 项目前端设置的基本信息
|
||||
*/
|
||||
@Repository
|
||||
public interface ProjectViewDAO extends MyBatisBaseDao<ProjectView, Long, ProjectViewExample> {
|
||||
|
||||
List<ProjectView> selectWithBLOBsByExample(ProjectViewExample example);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package club.joylink.rtss.entity.question;
|
||||
package club.joylink.rtss.entity.paper.question;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
@ -1,4 +1,4 @@
|
||||
package club.joylink.rtss.entity.question;
|
||||
package club.joylink.rtss.entity.paper.question;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
@ -1,4 +1,4 @@
|
||||
package club.joylink.rtss.entity.question;
|
||||
package club.joylink.rtss.entity.paper.question;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
@ -1,12 +1,15 @@
|
||||
package club.joylink.rtss.entity.project;
|
||||
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目信息
|
||||
@ -14,16 +17,31 @@ import java.time.LocalDateTime;
|
||||
@Setter
|
||||
@Getter
|
||||
public class Project {
|
||||
/**
|
||||
* 有效信息标识
|
||||
*/
|
||||
public final static Integer EFFECT_PROJECT_STATUS = 1;
|
||||
|
||||
/**
|
||||
* 默认项目的markKey
|
||||
*/
|
||||
public final static String DEFAULT_PROJECT_MARK_KEY = "login";
|
||||
|
||||
/**
|
||||
* 默认项目的Code
|
||||
*/
|
||||
public final static String DEFAULT_PROJECT_CODE = "DEFAULT";
|
||||
|
||||
/**
|
||||
* 默认项目标识
|
||||
*/
|
||||
public final static List<String> DEFAULT_PROJECT_LABEL = Arrays.asList("login", "design", "default", "DEFAULT");
|
||||
|
||||
/**
|
||||
* 数据库唯一ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目标识key,前端使用
|
||||
*/
|
||||
private String markKey;
|
||||
|
||||
/**
|
||||
* 项目编码,后端使用
|
||||
*/
|
||||
@ -59,12 +77,6 @@ public class Project {
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 前端界面
|
||||
* 包括:login界面、design界面
|
||||
*/
|
||||
private String viewSetting;
|
||||
|
||||
/**
|
||||
* 是否供前端选择
|
||||
*/
|
||||
@ -92,6 +104,7 @@ public class Project {
|
||||
/**
|
||||
* 是否默认项目
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isDefault() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
@ -99,9 +112,15 @@ public class Project {
|
||||
return this.projectServerConfig.getDefaultProject() == 1;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public static boolean isDefault(String code) {
|
||||
return StringUtils.isEmpty(code) || DEFAULT_PROJECT_LABEL.contains(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否登录就创建仿真
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isLoginWithCreateSimulation() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
@ -109,6 +128,65 @@ public class Project {
|
||||
return this.projectServerConfig.getLoginCreateSimulation() == 1;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isPermissionVail() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
}
|
||||
return this.projectServerConfig.getCreateSimulationPermission() == 1;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isCreateLocalSimulation() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
}
|
||||
return this.projectServerConfig.getCreateLocalSimulation() == 1;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isMapNeedCharge() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
}
|
||||
return this.projectServerConfig.getMapNeedCharge() == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否资源免费
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isFreeSource() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
}
|
||||
return this.projectServerConfig.getFreeSource() == 1;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isControlDevice() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return false;
|
||||
}
|
||||
return this.projectServerConfig.getControlDevice() == 1;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public int getDefaultLoadTrain() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return 0;
|
||||
}
|
||||
return this.projectServerConfig.getDefaultLoadTrain();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getDefaultMemberId() {
|
||||
if (this.projectServerConfig == null) {
|
||||
return null;
|
||||
}
|
||||
return this.projectServerConfig.getDefaultMemberId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回项目编码
|
||||
*/
|
||||
@ -129,15 +207,12 @@ public class Project {
|
||||
|
||||
private String value;
|
||||
|
||||
private String markKey;
|
||||
|
||||
public SimpleProject() {
|
||||
}
|
||||
|
||||
public SimpleProject(Project project) {
|
||||
this.label = project.getSimpleName();
|
||||
this.value = project.getCode();
|
||||
this.markKey = project.getMarkKey();
|
||||
}
|
||||
|
||||
public String name() {
|
||||
@ -156,5 +231,40 @@ public class Project {
|
||||
* 登录后创建仿真
|
||||
*/
|
||||
private int loginCreateSimulation;
|
||||
|
||||
/**
|
||||
* 登录时创建仿真的权限判断,原BJD使用
|
||||
*/
|
||||
private int createSimulationPermission;
|
||||
|
||||
/**
|
||||
* 登录时创建仿真判断,WJLS创建现地类型
|
||||
*/
|
||||
private int createLocalSimulation;
|
||||
|
||||
/**
|
||||
* 地图需要收费:DRTS
|
||||
*/
|
||||
private int mapNeedCharge;
|
||||
|
||||
/**
|
||||
* 资源免费:CGY、ZZWW
|
||||
*/
|
||||
private int freeSource;
|
||||
|
||||
/**
|
||||
* 需要控制装备:HEB
|
||||
*/
|
||||
private int controlDevice;
|
||||
|
||||
/**
|
||||
* 默认加载列车数
|
||||
*/
|
||||
private int defaultLoadTrain;
|
||||
|
||||
/**
|
||||
* 默认加载角色:WJLS默认加载2
|
||||
*/
|
||||
private String defaultMemberId;
|
||||
}
|
||||
}
|
||||
|
@ -184,76 +184,6 @@ public class ProjectExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyIsNull() {
|
||||
addCriterion("mark_key is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyIsNotNull() {
|
||||
addCriterion("mark_key is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyEqualTo(String value) {
|
||||
addCriterion("mark_key =", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotEqualTo(String value) {
|
||||
addCriterion("mark_key <>", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyGreaterThan(String value) {
|
||||
addCriterion("mark_key >", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("mark_key >=", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyLessThan(String value) {
|
||||
addCriterion("mark_key <", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyLessThanOrEqualTo(String value) {
|
||||
addCriterion("mark_key <=", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyLike(String value) {
|
||||
addCriterion("mark_key like", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotLike(String value) {
|
||||
addCriterion("mark_key not like", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyIn(List<String> values) {
|
||||
addCriterion("mark_key in", values, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotIn(List<String> values) {
|
||||
addCriterion("mark_key not in", values, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyBetween(String value1, String value2) {
|
||||
addCriterion("mark_key between", value1, value2, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotBetween(String value1, String value2) {
|
||||
addCriterion("mark_key not between", value1, value2, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCodeIsNull() {
|
||||
addCriterion("code is null");
|
||||
return (Criteria) this;
|
||||
|
@ -0,0 +1,24 @@
|
||||
package club.joylink.rtss.entity.project;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class ProjectView {
|
||||
private Long id;
|
||||
|
||||
private String markKey;
|
||||
|
||||
private String project;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String viewSetting;
|
||||
}
|
@ -0,0 +1,493 @@
|
||||
package club.joylink.rtss.entity.project;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ProjectViewExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public ProjectViewExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyIsNull() {
|
||||
addCriterion("mark_key is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyIsNotNull() {
|
||||
addCriterion("mark_key is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyEqualTo(String value) {
|
||||
addCriterion("mark_key =", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotEqualTo(String value) {
|
||||
addCriterion("mark_key <>", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyGreaterThan(String value) {
|
||||
addCriterion("mark_key >", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("mark_key >=", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyLessThan(String value) {
|
||||
addCriterion("mark_key <", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyLessThanOrEqualTo(String value) {
|
||||
addCriterion("mark_key <=", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyLike(String value) {
|
||||
addCriterion("mark_key like", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotLike(String value) {
|
||||
addCriterion("mark_key not like", value, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyIn(List<String> values) {
|
||||
addCriterion("mark_key in", values, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotIn(List<String> values) {
|
||||
addCriterion("mark_key not in", values, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyBetween(String value1, String value2) {
|
||||
addCriterion("mark_key between", value1, value2, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkKeyNotBetween(String value1, String value2) {
|
||||
addCriterion("mark_key not between", value1, value2, "markKey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIsNull() {
|
||||
addCriterion("code is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIsNotNull() {
|
||||
addCriterion("code is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectEqualTo(String value) {
|
||||
addCriterion("project =", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectNotEqualTo(String value) {
|
||||
addCriterion("project <>", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectGreaterThan(String value) {
|
||||
addCriterion("project >", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project >=", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectLessThan(String value) {
|
||||
addCriterion("project <", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectLessThanOrEqualTo(String value) {
|
||||
addCriterion("project <=", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectLike(String value) {
|
||||
addCriterion("project like", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectNotLike(String value) {
|
||||
addCriterion("project not like", value, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIn(List<String> values) {
|
||||
addCriterion("project in", values, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectNotIn(List<String> values) {
|
||||
addCriterion("project not in", values, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectBetween(String value1, String value2) {
|
||||
addCriterion("project between", value1, value2, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectNotBetween(String value1, String value2) {
|
||||
addCriterion("project not between", value1, value2, "project");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(Integer value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(Integer value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(Integer value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(Integer value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<Integer> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.CgyRecordDAO;
|
||||
import club.joylink.rtss.dao.SysAccountLoginDAO;
|
||||
import club.joylink.rtss.entity.CgyRecord;
|
||||
@ -58,7 +57,7 @@ public class CgyRecordService {
|
||||
|
||||
private long getLoginCount() {
|
||||
SysAccountLoginExample example = new SysAccountLoginExample();
|
||||
example.createCriteria().andProjectEqualTo(Project.CGY.name());
|
||||
example.createCriteria().andProjectEqualTo("CGY");
|
||||
return sysAccountLoginDAO.countByExample(example);
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ public class ExamService implements IExamService {
|
||||
return empty;
|
||||
creatorIds = creators.stream().map(AccountVO::getId).collect(Collectors.toList());
|
||||
}
|
||||
List<Long> mapIds = iMapService.findOnlineMapByProjectCode(loginInfo.getProject().name())
|
||||
List<Long> mapIds = iMapService.findOnlineMapByProjectCode(loginInfo.getProject())
|
||||
.stream().map(MapVO::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(mapIds))
|
||||
return empty;
|
||||
@ -725,7 +725,7 @@ public class ExamService implements IExamService {
|
||||
|
||||
@Override
|
||||
public List<ExamDefinitionVO> listQueryExamByLoginProject(ExamDefinitionQueryVO queryVO, LoginUserInfoVO loginInfo) {
|
||||
List<Long> mapIds = iMapService.findOnlineMapByProjectCode(loginInfo.getProject().name())
|
||||
List<Long> mapIds = iMapService.findOnlineMapByProjectCode(loginInfo.getProject())
|
||||
.stream().map(MapVO::getId).collect(Collectors.toList());
|
||||
ExamDefinitionExample example = new ExamDefinitionExample();
|
||||
ExamDefinitionExample.Criteria criteria = example.createCriteria().andMapIdIn(mapIds);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
@ -114,12 +113,12 @@ public interface ILearnService {
|
||||
/**
|
||||
* 根据项目查询帖子
|
||||
*/
|
||||
LearnPostVO queryPost(Project project);
|
||||
LearnPostVO queryPost(String project);
|
||||
|
||||
/**
|
||||
* 根据项目分页查询留言板的留言
|
||||
*/
|
||||
PageVO<LearnMessageVO> pagedQueryMessageByProject(Project project, LearnMessagePagedQueryVO queryVO);
|
||||
PageVO<LearnMessageVO> pagedQueryMessageByProject(String project, LearnMessagePagedQueryVO queryVO);
|
||||
|
||||
/**
|
||||
* 更新留言板
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.LsLesson;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -14,6 +13,7 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 课程发布
|
||||
*
|
||||
* @param lessonVo
|
||||
*/
|
||||
void publish(LessonVO lessonVo, LessonPublishVO publishVO);
|
||||
@ -25,6 +25,7 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 获取课程详细信息 (包含权限和章节)
|
||||
*
|
||||
* @param id
|
||||
* @param accountVO
|
||||
* @return
|
||||
@ -38,6 +39,7 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 获取课程详细信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -77,12 +79,14 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 根据实训id删除章节-实训关系
|
||||
*
|
||||
* @param trainingId
|
||||
*/
|
||||
void deleteChapterRelByTrainingId(Long trainingId);
|
||||
|
||||
/**
|
||||
* 发布课程上线
|
||||
*
|
||||
* @param id
|
||||
* @param accountVO
|
||||
*/
|
||||
@ -90,6 +94,7 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 发布课程下线
|
||||
*
|
||||
* @param id
|
||||
* @param accountVO
|
||||
*/
|
||||
@ -97,12 +102,14 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 根据实训id列表批量删除章节-实训关系数据
|
||||
*
|
||||
* @param trainingIdList
|
||||
*/
|
||||
void deleteChapterRelByTrainingIdList(List<Long> trainingIdList);
|
||||
|
||||
/**
|
||||
* 更新课程名称和简介
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
* @param remarks
|
||||
@ -121,6 +128,7 @@ public interface ILessonService {
|
||||
|
||||
/**
|
||||
* 根据mapId和prdType查询课程数量
|
||||
*
|
||||
* @param mapId
|
||||
* @param prdType
|
||||
* @return
|
||||
@ -135,10 +143,11 @@ public interface ILessonService {
|
||||
/**
|
||||
* 获取有效的课程
|
||||
*/
|
||||
List<LessonVO> getValidLesson(Long mapId,List<Long> ids, String prdType);
|
||||
List<LessonVO> getValidLesson(Long mapId, List<Long> ids, String prdType);
|
||||
|
||||
/**
|
||||
* 删除并添加章节-实训关联关系
|
||||
*
|
||||
* @param relVOS
|
||||
*/
|
||||
void addChapterTrainingRelAfterDelete(List<LessonChapterTrainingRelVO> relVOS);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.DictionaryDetailVO;
|
||||
@ -10,7 +9,10 @@ import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.map.MapCopyOption;
|
||||
import club.joylink.rtss.vo.client.map.MapDataVO;
|
||||
import club.joylink.rtss.vo.client.map.MapInfoUpdateVO;
|
||||
import club.joylink.rtss.vo.map.*;
|
||||
import club.joylink.rtss.vo.map.Map3dDataVO;
|
||||
import club.joylink.rtss.vo.map.MapUpdateVO;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import club.joylink.rtss.vo.map.MapVersionVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapPSDVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapSectionNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapStationNewVO;
|
||||
@ -22,20 +24,23 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 查询有地图的城市列表
|
||||
* @return
|
||||
*
|
||||
* @param dicCode
|
||||
* @return
|
||||
*/
|
||||
List<DictionaryDetailVO> queryCityHasMap(String dicCode);
|
||||
|
||||
/**
|
||||
* 根据名称查询地图是否存在
|
||||
* @return
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
boolean checkNameExist(String name);
|
||||
|
||||
/**
|
||||
* 地图草稿发布
|
||||
*
|
||||
* @param mapVO
|
||||
* @param mapDataVO
|
||||
* @param accountVO
|
||||
@ -44,6 +49,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 地图三维数据发布
|
||||
*
|
||||
* @param mapVO
|
||||
* @param map3dDataVO
|
||||
* @param user
|
||||
@ -52,6 +58,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据地图id获取地图版本
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -59,6 +66,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 获取地图所有数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -66,12 +74,14 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 清除地图缓存
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void removeCache(Long id);
|
||||
|
||||
/**
|
||||
* 获取地图基本信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -86,6 +96,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据项目code查询地图列表
|
||||
*
|
||||
* @param projectCode
|
||||
* @return
|
||||
*/
|
||||
@ -98,6 +109,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 分页查询地图版本数据
|
||||
*
|
||||
* @param id
|
||||
* @param queryVO
|
||||
* @return
|
||||
@ -121,6 +133,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据皮肤获取地图列表
|
||||
*
|
||||
* @param lineCode
|
||||
* @return
|
||||
*/
|
||||
@ -128,6 +141,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 更新发布地图名称
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
@ -135,6 +149,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 更新发布地图所属城市
|
||||
*
|
||||
* @param id
|
||||
* @param cityCode
|
||||
* @param user
|
||||
@ -143,6 +158,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 设置地图所属项目
|
||||
*
|
||||
* @param id
|
||||
* @param project
|
||||
* @param projectCode
|
||||
@ -152,6 +168,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 查询城市下可用的地图
|
||||
*
|
||||
* @param cityCode
|
||||
* @return
|
||||
*/
|
||||
@ -159,6 +176,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据定制项目编号查询在线地图列表
|
||||
*
|
||||
* @param projectCode
|
||||
* @return
|
||||
*/
|
||||
@ -166,25 +184,29 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 查询非定制项目编号查询在线地图列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<MapVO> findOnlineMapNotProject();
|
||||
|
||||
/**
|
||||
* 查询所有上线地图
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<MapVO> queryOnlineMapInfos();
|
||||
|
||||
/**
|
||||
* 查询所有上线地图
|
||||
*
|
||||
* @param project
|
||||
* @return
|
||||
* @return TODO 20220922 修改project
|
||||
*/
|
||||
List<MapVO> queryOnlineMapInfoListOfProject(Project project);
|
||||
List<MapVO> queryOnlineMapInfoListOfProject(String project);
|
||||
|
||||
/**
|
||||
* 获取有屏蔽门的站台
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -192,6 +214,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据id查询地图基本信息
|
||||
*
|
||||
* @param mapId
|
||||
* @return
|
||||
*/
|
||||
@ -199,6 +222,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据地图id查询地图3d数据
|
||||
*
|
||||
* @param mapId
|
||||
* @return
|
||||
*/
|
||||
@ -206,6 +230,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 根据选项拷贝发布地图数据
|
||||
*
|
||||
* @param id
|
||||
* @param copyOption
|
||||
* @param user
|
||||
@ -214,6 +239,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 地图名称是否已经存在(重复)
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
@ -221,6 +247,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* id为此的地图是否已经存在
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -228,6 +255,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 做地图的仿真数据检查
|
||||
*
|
||||
* @param mapId
|
||||
* @param user
|
||||
* @return
|
||||
@ -241,6 +269,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 地图数据导出
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -248,6 +277,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 更新地图基本信息
|
||||
*
|
||||
* @param id
|
||||
* @param updateVO
|
||||
* @param user
|
||||
@ -256,12 +286,14 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 获取地图下所有需要值班员的车站
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<MapStationNewVO> getNeedSupervisorStations(Long id);
|
||||
|
||||
/**
|
||||
* 获取地图车站下所有有屏蔽门的站台
|
||||
*
|
||||
* @param id
|
||||
* @param stationCode
|
||||
* @return
|
||||
@ -270,6 +302,7 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 获取地图站台关联的屏蔽门
|
||||
*
|
||||
* @param id
|
||||
* @param standCode
|
||||
* @return
|
||||
@ -310,8 +343,9 @@ public interface IMapService {
|
||||
|
||||
/**
|
||||
* 校验所有地图数据
|
||||
* @return
|
||||
*
|
||||
* @param userInfo
|
||||
* @return
|
||||
*/
|
||||
List<MapVO> doSimulationCheckAll(LoginUserInfoVO userInfo);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
@ -14,6 +13,7 @@ import java.util.List;
|
||||
public interface IMapSystemService {
|
||||
/**
|
||||
* 一键生成学习系统
|
||||
*
|
||||
* @param mapId
|
||||
*/
|
||||
void generateSystem(Long mapId);
|
||||
@ -22,6 +22,7 @@ public interface IMapSystemService {
|
||||
|
||||
/**
|
||||
* 分页查询地图下的地图系统
|
||||
*
|
||||
* @param queryVO
|
||||
* @return
|
||||
*/
|
||||
@ -29,12 +30,14 @@ public interface IMapSystemService {
|
||||
|
||||
/**
|
||||
* 创建地图系统
|
||||
*
|
||||
* @param mapSystemVO
|
||||
*/
|
||||
void createMapSystem(MapSystemVO mapSystemVO);
|
||||
|
||||
/**
|
||||
* 更新地图系统
|
||||
*
|
||||
* @param id
|
||||
* @param mapSystemVO
|
||||
*/
|
||||
@ -42,20 +45,23 @@ public interface IMapSystemService {
|
||||
|
||||
/**
|
||||
* 根据城市code查询对应某地图的学习系统
|
||||
*
|
||||
* @param cityCode
|
||||
* @return
|
||||
*/
|
||||
List<TreeNode> queryByCityCode(String cityCode);
|
||||
List<TreeNode> queryByCityCode(String cityCode);
|
||||
|
||||
/**
|
||||
* 根据定制项目编号查询
|
||||
*
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
List<TreeNode> queryByProjectCode(Project project);
|
||||
List<TreeNode> queryByProjectCode(String project);
|
||||
|
||||
/**
|
||||
* 查询子系统信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -63,14 +69,16 @@ public interface IMapSystemService {
|
||||
|
||||
/**
|
||||
* 根据系统类型和地图产品code查询详细信息
|
||||
*
|
||||
* @param id
|
||||
* @param loginInfo
|
||||
* @return
|
||||
*/
|
||||
MapSystemDetailVO getMapSystemDetail(Long id, LoginUserInfoVO loginInfo);
|
||||
MapSystemDetailVO getMapSystemDetail(Long id, LoginUserInfoVO loginInfo);
|
||||
|
||||
/**
|
||||
* 删除地图系统
|
||||
*
|
||||
* @param id
|
||||
* @param accountVO
|
||||
* @return
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.StatusEnum;
|
||||
import club.joylink.rtss.entity.PermissionDistribute;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
@ -19,6 +18,7 @@ public interface IPermissionDistributeService {
|
||||
|
||||
/**
|
||||
* 分页查询权限分发数据
|
||||
*
|
||||
* @param queryVO
|
||||
* @return
|
||||
*/
|
||||
@ -27,16 +27,18 @@ public interface IPermissionDistributeService {
|
||||
/**
|
||||
* 生成权限分发二维码
|
||||
*/
|
||||
String generateQrCode(Long id, Project loginProject);
|
||||
String generateQrCode(Long id, String loginProject);
|
||||
|
||||
/**
|
||||
* 权限分发立即失效
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void immediateInvalid(Long id);
|
||||
|
||||
/**
|
||||
* 权限分发打包
|
||||
*
|
||||
* @param ids
|
||||
* @param user
|
||||
* @return
|
||||
@ -45,13 +47,14 @@ public interface IPermissionDistributeService {
|
||||
|
||||
/**
|
||||
* 从订单分发权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String distributeFromOrder(String orderCode, AccountVO user, Project loginProject);
|
||||
String distributeFromOrder(String orderCode, AccountVO user, String loginProject);
|
||||
|
||||
void getUserPermission(Long state, AccountVO user);
|
||||
|
||||
String createQuickly(OrderCreateVO orderCreateVO, AccountVO user, Project loginProject);
|
||||
String createQuickly(OrderCreateVO orderCreateVO, AccountVO user, String loginProject);
|
||||
|
||||
List<UserPermissionVO> wmGetPermission(String code, Long id);
|
||||
|
||||
@ -92,7 +95,7 @@ public interface IPermissionDistributeService {
|
||||
/**
|
||||
* 创建项目下所有地图的权限分发
|
||||
*/
|
||||
String createAllMapDistribute(Project project, Integer num, LoginUserInfoVO loginInfo);
|
||||
String createAllMapDistribute(String project, Integer num, LoginUserInfoVO loginInfo);
|
||||
|
||||
/**
|
||||
* 扣除一些权限
|
||||
@ -109,6 +112,7 @@ public interface IPermissionDistributeService {
|
||||
|
||||
/**
|
||||
* 将指定权限分发包分发给指定账户
|
||||
*
|
||||
* @param id
|
||||
* @param accountId
|
||||
* @param user
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.SysAccount;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
@ -22,12 +21,14 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据openId查询用户
|
||||
*
|
||||
* @param openid
|
||||
*/
|
||||
AccountVO getUserByWxOpenId(String openid);
|
||||
|
||||
/**
|
||||
* 根据userId 主键查询用户
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
AccountVO findUserById(Long id);
|
||||
@ -35,7 +36,7 @@ public interface ISysUserService {
|
||||
/**
|
||||
* 设置用户的(与项目{project}关联的)组织信息
|
||||
*/
|
||||
void setOrgInfoOfOrgRelWithTheProject(Project project, AccountVO accountVO);
|
||||
void setOrgInfoOfOrgRelWithTheProject(String project, AccountVO accountVO);
|
||||
|
||||
/**
|
||||
* 设置用户与该组织的关联信息
|
||||
@ -48,6 +49,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 通过用户姓名或手机号查询
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
@ -55,6 +57,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 判断用户是否已经注册
|
||||
*
|
||||
* @param wxId
|
||||
* @return
|
||||
*/
|
||||
@ -72,6 +75,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 修改用户角色
|
||||
*
|
||||
* @param id
|
||||
* @param userId
|
||||
* @param accountVO
|
||||
@ -80,6 +84,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 是否管理员
|
||||
*
|
||||
* @param accountVO
|
||||
* @return
|
||||
*/
|
||||
@ -92,6 +97,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据地图id查询订阅人员
|
||||
*
|
||||
* @param mapId
|
||||
* @return
|
||||
*/
|
||||
@ -99,6 +105,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 分页获取用户数据(模糊查询)
|
||||
*
|
||||
* @param fuzzyParam
|
||||
* @return
|
||||
*/
|
||||
@ -106,6 +113,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据名称模糊查询
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
@ -113,6 +121,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据微信小程序openid查询用户
|
||||
*
|
||||
* @param wmOpenId
|
||||
* @return
|
||||
*/
|
||||
@ -120,6 +129,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据微信小程序openid获取用户
|
||||
*
|
||||
* @param wmOpenId
|
||||
* @return
|
||||
*/
|
||||
@ -127,18 +137,21 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据unionid查询用户
|
||||
*
|
||||
* @param unionid
|
||||
*/
|
||||
AccountVO findUserByUnionId(String unionid);
|
||||
|
||||
/**
|
||||
* 根据微信openId获取用户
|
||||
*
|
||||
* @param unionId
|
||||
*/
|
||||
AccountVO getUserByUnionId(String unionId);
|
||||
|
||||
/**
|
||||
* 创建微信小程序来的用户
|
||||
*
|
||||
* @param wmUserSession
|
||||
* @return
|
||||
*/
|
||||
@ -150,6 +163,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 更新用户微信小程序openid
|
||||
*
|
||||
* @param id
|
||||
* @param wmOpenId
|
||||
*/
|
||||
@ -159,12 +173,14 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 更新用户的unionId
|
||||
*
|
||||
* @param changeUserList
|
||||
*/
|
||||
void updateUserWxUnionId(List<AccountVO> changeUserList);
|
||||
|
||||
/**
|
||||
* 处理微信用户关注事件
|
||||
*
|
||||
* @param wxId
|
||||
* @return
|
||||
*/
|
||||
@ -177,14 +193,16 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 根据账号密码查询用户
|
||||
*
|
||||
* @param account
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
AccountVO findUserByAccountAndPassword(String account, String password, Project project );
|
||||
AccountVO findUserByAccountAndPassword(String account, String password, String project);
|
||||
|
||||
/**
|
||||
* 更新用户真实姓名
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
@ -192,6 +210,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 更新用户昵称
|
||||
*
|
||||
* @param id
|
||||
* @param nickname
|
||||
*/
|
||||
@ -199,6 +218,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 更新用户头像
|
||||
*
|
||||
* @param id
|
||||
* @param avatarPath
|
||||
*/
|
||||
@ -206,6 +226,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 更新用户手机号
|
||||
*
|
||||
* @param id
|
||||
* @param updateMobileVO
|
||||
*/
|
||||
@ -213,6 +234,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 更新用户邮箱地址
|
||||
*
|
||||
* @param id
|
||||
* @param updateEmailVO
|
||||
*/
|
||||
@ -220,6 +242,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 发送邮箱验证码
|
||||
*
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
@ -227,6 +250,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 发送手机验证码
|
||||
*
|
||||
* @param mobileInfoVO
|
||||
* @return
|
||||
*/
|
||||
@ -234,12 +258,14 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 查询用户总数量
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getUserAmount();
|
||||
|
||||
/**
|
||||
* 更新用户密码
|
||||
*
|
||||
* @param id
|
||||
* @param updatePasswordVO
|
||||
*/
|
||||
@ -247,6 +273,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 客户端修改用户密码
|
||||
*
|
||||
* @param id
|
||||
* @param password
|
||||
*/
|
||||
@ -275,6 +302,7 @@ public interface ISysUserService {
|
||||
|
||||
/**
|
||||
* 用户绑定微信小程序
|
||||
*
|
||||
* @param code
|
||||
* @param userId
|
||||
*/
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.StatusEnum;
|
||||
import club.joylink.rtss.entity.PermissionDistribute;
|
||||
import club.joylink.rtss.entity.UserPermission;
|
||||
@ -17,6 +16,7 @@ public interface IUserPermissionService {
|
||||
|
||||
/**
|
||||
* 分页获取权限数据
|
||||
*
|
||||
* @param queryVO
|
||||
* @return
|
||||
*/
|
||||
@ -24,6 +24,7 @@ public interface IUserPermissionService {
|
||||
|
||||
/**
|
||||
* 设置失效
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void setInvalid(Long id);
|
||||
@ -83,11 +84,12 @@ public interface IUserPermissionService {
|
||||
/**
|
||||
* 给该用户领取该地图的权限
|
||||
*/
|
||||
void getPermissions4Map(Long mapId, Integer count, AccountVO user, Project loginProject);
|
||||
void getPermissions4Map(Long mapId, Integer count, AccountVO user, String loginProject);
|
||||
|
||||
/**
|
||||
* 用户权限延长(续费)
|
||||
* @param id 要延长的权限
|
||||
*
|
||||
* @param id 要延长的权限
|
||||
* @param monthAmount 要延长的月数
|
||||
*/
|
||||
void renewal(long id, int monthAmount);
|
||||
|
@ -2,7 +2,6 @@ package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.configuration.configProp.OtherConfig;
|
||||
import club.joylink.rtss.configuration.configProp.WeChatConfig;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.SystemEnv;
|
||||
import club.joylink.rtss.dao.LearnCommentDAO;
|
||||
import club.joylink.rtss.dao.LearnMessageDAO;
|
||||
@ -69,7 +68,7 @@ public class LearnService implements ILearnService {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
LearnPostExample example = new LearnPostExample();
|
||||
if (queryVO.getProject() != null) {
|
||||
example.createCriteria().andProjectEqualTo(queryVO.getProject().name());
|
||||
example.createCriteria().andProjectEqualTo(queryVO.getProject());
|
||||
}
|
||||
Page<LearnPost> page = (Page<LearnPost>) learnPostDAO.selectByExample(example);
|
||||
List<LearnPostVO> vos = page.getResult().stream().map(LearnPostVO::new).collect(Collectors.toList());
|
||||
@ -80,13 +79,13 @@ public class LearnService implements ILearnService {
|
||||
public Long createPost(LearnPostCreateVO createVO, AccountVO user) {
|
||||
//校验
|
||||
String title = createVO.getTitle();
|
||||
Project project = createVO.getProject();
|
||||
String project = createVO.getProject();
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertHasText(title, "名称不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(project, "所属项目不能为空");
|
||||
confirmPostIsNotExist(project);
|
||||
//添加
|
||||
LearnPost post = new LearnPost();
|
||||
post.setProject(project.name());
|
||||
post.setProject(project);
|
||||
post.setTitle(title);
|
||||
post.setCreatorId(user.getId());
|
||||
post.setCreateTime(LocalDateTime.now());
|
||||
@ -308,9 +307,9 @@ public class LearnService implements ILearnService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LearnPostVO queryPost(Project project) {
|
||||
public LearnPostVO queryPost(String project) {
|
||||
LearnPostExample example = new LearnPostExample();
|
||||
example.createCriteria().andProjectEqualTo(project.name());
|
||||
example.createCriteria().andProjectEqualTo(project);
|
||||
List<LearnPost> learnPosts = learnPostDAO.selectByExample(example);
|
||||
if (CollectionUtils.isEmpty(learnPosts)) {
|
||||
return null;
|
||||
@ -319,7 +318,7 @@ public class LearnService implements ILearnService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageVO<LearnMessageVO> pagedQueryMessageByProject(Project project, LearnMessagePagedQueryVO queryVO) {
|
||||
public PageVO<LearnMessageVO> pagedQueryMessageByProject(String project, LearnMessagePagedQueryVO queryVO) {
|
||||
LearnPostVO post = queryPost(project);
|
||||
if (post == null) {
|
||||
log.error(String.format("项目[%s]的留言板不存在", project));
|
||||
@ -537,9 +536,9 @@ public class LearnService implements ILearnService {
|
||||
/**
|
||||
* 确认该项目的留言板不存在
|
||||
*/
|
||||
private void confirmPostIsNotExist(Project project) {
|
||||
private void confirmPostIsNotExist(String project) {
|
||||
LearnPostExample example = new LearnPostExample();
|
||||
example.createCriteria().andProjectEqualTo(project.name());
|
||||
example.createCriteria().andProjectEqualTo(project);
|
||||
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertTrue(learnPostDAO.countByExample(example) == 0,
|
||||
String.format("项目[%s]下留言板已存在", project));
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ public class LessonDraftService implements ILessonDraftService {
|
||||
|
||||
@Override
|
||||
public PageVO<LessonVO> pagedQueryPersonalLesson(LessonQueryVO queryVO, LoginUserInfoVO loginInfo) {
|
||||
List<MapVO> maps = iMapService.findOnlineMapByProjectCode(loginInfo.getProject().name());
|
||||
List<MapVO> maps = iMapService.findOnlineMapByProjectCode(loginInfo.getProject());
|
||||
if (CollectionUtils.isEmpty(maps)) {
|
||||
return new PageVO<>();
|
||||
} else {
|
||||
|
@ -2,7 +2,6 @@ package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.MapStatus;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.*;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.entity.LsLessonExample.Criteria;
|
||||
@ -556,8 +555,8 @@ public class LessonService implements ILessonService {
|
||||
.filter(lesson -> loginInfo.getAccountVO().getId().equals(lesson.getCreatorId())).map(LessonVO::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<LessonVO> queryNonDefaultLessons(Long creatorId, @NonNull Project project, LessonQueryVO queryVO) {
|
||||
List<MapVO> maps = iMapService.findOnlineMapByProjectCode(project.name());
|
||||
private List<LessonVO> queryNonDefaultLessons(Long creatorId, @NonNull String project, LessonQueryVO queryVO) {
|
||||
List<MapVO> maps = iMapService.findOnlineMapByProjectCode(project);
|
||||
if (CollectionUtils.isEmpty(maps)) {
|
||||
return new ArrayList<>();
|
||||
} else {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.Client;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -145,7 +144,7 @@ public class LoginSessionManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<LoginUserInfoVO> queryProjectDeviceLoginInfo(Project project) {
|
||||
public List<LoginUserInfoVO> queryProjectDeviceLoginInfo(String project) {
|
||||
List<LoginUserInfoVO> list = new ArrayList<>();
|
||||
for (LoginUserInfoVO userInfoVO : tokenLoginUserMap.values()) {
|
||||
ProjectDeviceVO deviceVO = userInfoVO.getDeviceVO();
|
||||
|
@ -3,11 +3,11 @@ package club.joylink.rtss.services;
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.MapStatus;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.Map3dDataDAO;
|
||||
import club.joylink.rtss.dao.MapDataDAO;
|
||||
import club.joylink.rtss.dao.MapInfoDAO;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BaseException;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.cache.ICacheService;
|
||||
@ -189,7 +189,7 @@ public class MapService implements IMapService {
|
||||
MapInfoExample example = new MapInfoExample();
|
||||
example.setOrderByClause("order_number");
|
||||
MapInfoExample.Criteria criteria = example.createCriteria().andStatusEqualTo(MapStatus.Online.getCode());
|
||||
if (Project.DEFAULT.name().equals(projectCode)) {
|
||||
if (Project.DEFAULT_PROJECT_CODE.equals(projectCode)) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
} else {
|
||||
criteria.andProjectCodeEqualTo(projectCode);
|
||||
@ -542,12 +542,12 @@ public class MapService implements IMapService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MapVO> queryOnlineMapInfoListOfProject(Project project) {
|
||||
public List<MapVO> queryOnlineMapInfoListOfProject(String project) {
|
||||
MapInfoExample example = new MapInfoExample();
|
||||
MapInfoExample.Criteria criteria = example.createCriteria()
|
||||
.andStatusEqualTo(MapStatus.Online.getCode());
|
||||
if (!Project.DEFAULT.equals(project)) {
|
||||
criteria.andProjectCodeEqualTo(project.name());
|
||||
if (!Project.DEFAULT_PROJECT_CODE.equals(project)) {
|
||||
criteria.andProjectCodeEqualTo(project);
|
||||
}
|
||||
List<MapInfo> mapInfos = this.mapInfoDAO.selectByExample(example);
|
||||
List<MapVO> mapVOList = MapVO.convert2VOList(mapInfos);
|
||||
|
@ -1,6 +1,9 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.constants.*;
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.MapSystemType;
|
||||
import club.joylink.rtss.constants.StatusEnum;
|
||||
import club.joylink.rtss.dao.MapSystemDAO;
|
||||
import club.joylink.rtss.entity.MapSystem;
|
||||
import club.joylink.rtss.entity.MapSystemExample;
|
||||
@ -205,9 +208,9 @@ public class MapSystemService implements IMapSystemService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeNode> queryByProjectCode(Project project) {
|
||||
public List<TreeNode> queryByProjectCode(String project) {
|
||||
// 根据城市名称查询对应的地图
|
||||
List<MapVO> mapVOList = iMapService.findOnlineMapByProjectCode(project.name());
|
||||
List<MapVO> mapVOList = iMapService.findOnlineMapByProjectCode(project);
|
||||
if (CollectionUtils.isEmpty(mapVOList)) {
|
||||
return null;
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package club.joylink.rtss.services;
|
||||
import club.joylink.rtss.configuration.configProp.OtherConfig;
|
||||
import club.joylink.rtss.configuration.configProp.WeChatConfig;
|
||||
import club.joylink.rtss.constants.PermissionDistributeSourceEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.StatusEnum;
|
||||
import club.joylink.rtss.dao.PermissionDistributeDAO;
|
||||
import club.joylink.rtss.dao.UserPermissionDAO;
|
||||
@ -146,11 +145,11 @@ public class PermissionDistributeService implements IPermissionDistributeService
|
||||
/**
|
||||
* 生成二维码
|
||||
*
|
||||
* @param id 权限分发id
|
||||
* @param id 权限分发id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String generateQrCode(Long id, Project loginProject) {
|
||||
public String generateQrCode(Long id, String loginProject) {
|
||||
return qrCodeManager.getDistributeCode(id, loginProject);
|
||||
}
|
||||
|
||||
@ -178,7 +177,7 @@ public class PermissionDistributeService implements IPermissionDistributeService
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public String distributeFromOrder(String orderCode, AccountVO user, Project loginProject) {
|
||||
public String distributeFromOrder(String orderCode, AccountVO user, String loginProject) {
|
||||
//校验
|
||||
OrderVO order = iOrderService.queryByCode(orderCode);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(order);
|
||||
@ -294,7 +293,7 @@ public class PermissionDistributeService implements IPermissionDistributeService
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String createQuickly(OrderCreateVO orderCreateVO, AccountVO user, Project loginProject) {
|
||||
public String createQuickly(OrderCreateVO orderCreateVO, AccountVO user, String loginProject) {
|
||||
String orderCode = iOrderService.createOrder(orderCreateVO, user);
|
||||
return distributeFromOrder(orderCode, user, loginProject);
|
||||
}
|
||||
@ -632,7 +631,7 @@ public class PermissionDistributeService implements IPermissionDistributeService
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createAllMapDistribute(Project project, Integer num, LoginUserInfoVO loginInfo) {
|
||||
public String createAllMapDistribute(String project, Integer num, LoginUserInfoVO loginInfo) {
|
||||
iSysUserService.confirmAdmin(loginInfo.getAccountVO());
|
||||
List<MapVO> maps = iMapService.queryOnlineMapInfoListOfProject(project);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(maps,
|
||||
|
@ -2,8 +2,8 @@ package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.configuration.configProp.OtherConfig;
|
||||
import club.joylink.rtss.configuration.configProp.WeChatConfig;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.SystemEnv;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.auth.AuthenticateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -22,8 +22,9 @@ public class QRCodeManager {
|
||||
|
||||
/**
|
||||
* 登录二维码
|
||||
* TODO 20220922 用于替换上方方法 占位
|
||||
*/
|
||||
public String getLoginCode(String clientId, Project project, String sessionId) {
|
||||
public String getLoginCode(String clientId, String project, String sessionId) {
|
||||
String envName = this.otherConfig.getEnv();
|
||||
if (!SystemEnv.isPrdEnv(envName) && !SystemEnv.isTestEnv(envName)) {
|
||||
return "";
|
||||
@ -38,13 +39,13 @@ public class QRCodeManager {
|
||||
/**
|
||||
* 权限分发二维码
|
||||
*/
|
||||
public String getDistributeCode(long id, Project project) {
|
||||
public String getDistributeCode(long id, String project) {
|
||||
String envName = this.otherConfig.getEnv();
|
||||
if (!SystemEnv.isPrdEnv(envName) && !SystemEnv.isTestEnv(envName)) {
|
||||
return "";
|
||||
}
|
||||
if (project == null) {
|
||||
project = Project.DEFAULT;
|
||||
project = Project.DEFAULT_PROJECT_CODE;
|
||||
}
|
||||
String pro = selectProject(envName, project);
|
||||
String state = buildState(String.valueOf(id), pro);
|
||||
@ -54,7 +55,7 @@ public class QRCodeManager {
|
||||
/**
|
||||
* 综合演练二维码
|
||||
*/
|
||||
public String getSimulationCode(String group, Project project) {
|
||||
public String getSimulationCode(String group, String project) {
|
||||
String envName = this.otherConfig.getEnv();
|
||||
if (!SystemEnv.isPrdEnv(envName) && !SystemEnv.isTestEnv(envName)) {
|
||||
return "";
|
||||
@ -68,39 +69,33 @@ public class QRCodeManager {
|
||||
/**
|
||||
* 微信绑定账号二维码
|
||||
*/
|
||||
public String getWeChatBindUrl(long accountId, Project project) {
|
||||
public String getWeChatBindUrl(long accountId, String project) {
|
||||
String envName = this.otherConfig.getEnv();
|
||||
if (!SystemEnv.isPrdEnv(envName) && !SystemEnv.isTestEnv(envName)) {
|
||||
return "";
|
||||
}
|
||||
if (project == null)
|
||||
project = Project.DEFAULT;
|
||||
String pro = selectProject(envName, project);
|
||||
String state = buildState(String.valueOf(accountId), pro);
|
||||
return this.weChatConfig.getWmBindUrl(state);
|
||||
}
|
||||
|
||||
public String getOrgBindCode(long orgId, Project project) {
|
||||
public String getOrgBindCode(long orgId, String project) {
|
||||
String envName = this.otherConfig.getEnv();
|
||||
if (!SystemEnv.isPrdEnv(envName) && !SystemEnv.isTestEnv(envName)) {
|
||||
return "";
|
||||
}
|
||||
if (project == null)
|
||||
project = Project.DEFAULT;
|
||||
project = Project.DEFAULT_PROJECT_CODE;
|
||||
String pro = selectProject(envName, project);
|
||||
String state = buildState(String.valueOf(orgId), pro);
|
||||
return this.weChatConfig.getOrgBindCode(state);
|
||||
}
|
||||
|
||||
private String selectProject(String envName, Project project) {
|
||||
return selectProject(envName, project == null ? null : project.name());
|
||||
}
|
||||
|
||||
private String selectProject(String envName, String project) {
|
||||
if (SystemEnv.isPrdEnv(envName)) {
|
||||
return project;
|
||||
} else if (SystemEnv.isTestEnv(envName)) {
|
||||
return Project.TEST.name();
|
||||
return "TEST";
|
||||
}
|
||||
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("环境异常");
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package club.joylink.rtss.services;
|
||||
import club.joylink.rtss.configuration.configProp.WeChatConfig;
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.EmailSubject;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.StatusEnum;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.dao.SysAccountDAO;
|
||||
@ -87,7 +86,7 @@ public class SysUserService implements ISysUserService {
|
||||
private QRCodeManager qrCodeManager;
|
||||
|
||||
@Override
|
||||
public AccountVO findUserByAccountAndPassword(String account, String password, Project project) {
|
||||
public AccountVO findUserByAccountAndPassword(String account, String password, String project) {
|
||||
/* 先按手机号和邮箱查询 */
|
||||
SysAccountExample example = new SysAccountExample();
|
||||
example.createCriteria().andMobileEqualTo(account).andPasswordEqualTo(password); // 手机号
|
||||
@ -137,10 +136,10 @@ public class SysUserService implements ISysUserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrgInfoOfOrgRelWithTheProject(Project project, AccountVO accountVO) {
|
||||
public void setOrgInfoOfOrgRelWithTheProject(String project, AccountVO accountVO) {
|
||||
if (project != null) {
|
||||
Org topOrg = iOrgService.findTopOrgOfUser(accountVO.getId());
|
||||
if (topOrg != null && topOrg.getProjectCode().contains(project.name())) {
|
||||
if (topOrg != null && topOrg.getProjectCode().contains(project)) {
|
||||
setOrgInfoOfThisOrg(topOrg, accountVO);
|
||||
}
|
||||
}
|
||||
@ -385,7 +384,7 @@ public class SysUserService implements ISysUserService {
|
||||
@Override
|
||||
public WeChatBindStatusVO getWeChatBindUrl(LoginUserInfoVO loginInfo) {
|
||||
Long userId = loginInfo.getAccountVO().getId();
|
||||
String bindUrl = qrCodeManager.getWeChatBindUrl(userId, loginInfo.getProject());
|
||||
String bindUrl = qrCodeManager.getWeChatBindUrl(userId, loginInfo.getProjectInfo().name());
|
||||
WeChatBindStatusVO statusVO = new WeChatBindStatusVO(bindUrl, loginInfo.getAccountVO().getId());
|
||||
userBindStatusMap.put(userId, statusVO);
|
||||
return statusVO;
|
||||
@ -773,9 +772,10 @@ public class SysUserService implements ISysUserService {
|
||||
|
||||
/**
|
||||
* 通过邮箱验证码更新密码
|
||||
* @param account 要更新密码的账号
|
||||
*
|
||||
* @param account 要更新密码的账号
|
||||
* @param userVfCode 用户填写的验证码
|
||||
* @param newPwd 新密码
|
||||
* @param newPwd 新密码
|
||||
*/
|
||||
private void updatePwdByEmailVdCode(SysAccount account, String userVfCode, String newPwd) {
|
||||
if (Objects.nonNull(account)) {
|
||||
|
@ -344,7 +344,7 @@ public class UserPermissionService implements IUserPermissionService {
|
||||
* 从权限分发创建用户权限
|
||||
*
|
||||
* @param distribute 领取的权限分发
|
||||
* @param accountVO 要领取的用户
|
||||
* @param accountVO 要领取的用户
|
||||
*/
|
||||
@Override
|
||||
public void createUserPermissionFromPermissionDistribute(PermissionDistribute distribute, AccountVO accountVO) {
|
||||
@ -475,7 +475,7 @@ public class UserPermissionService implements IUserPermissionService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPermissions4Map(Long mapId, Integer count, AccountVO user, Project loginProject) {
|
||||
public void getPermissions4Map(Long mapId, Integer count, AccountVO user, String loginProject) {
|
||||
if (count == null || count == 0) {
|
||||
return;
|
||||
}
|
||||
@ -565,8 +565,8 @@ public class UserPermissionService implements IUserPermissionService {
|
||||
.map(PermissionDistribute::getId)
|
||||
.distinct()
|
||||
.forEach(distributeId -> {
|
||||
iPermissionDistributeService.takeBack(distributeId);
|
||||
iPermissionDistributeService.return2UserPermission(distributeId);
|
||||
iPermissionDistributeService.takeBack(distributeId);
|
||||
iPermissionDistributeService.return2UserPermission(distributeId);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -3,12 +3,13 @@ package club.joylink.rtss.services.auth;
|
||||
import club.joylink.rtss.configuration.configProp.OtherConfig;
|
||||
import club.joylink.rtss.configuration.configProp.WeChatConfig;
|
||||
import club.joylink.rtss.constants.Client;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.SysAccountLoginDAO;
|
||||
import club.joylink.rtss.entity.SysAccountLogin;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.*;
|
||||
import club.joylink.rtss.services.project.DeviceService;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.services.simulation.ProjectSimulationService;
|
||||
import club.joylink.rtss.simulation.cbtc.ProjectJointSimulationService;
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
@ -79,6 +80,9 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
@Autowired
|
||||
private QRCodeManager qrCodeManager;
|
||||
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
|
||||
@Scheduled(fixedRate = 1000)
|
||||
public void clearExpireCache() {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
@ -116,24 +120,25 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 20220922 用于替换上方方法 占位
|
||||
*/
|
||||
@Override
|
||||
public LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode) {
|
||||
public LoginStatusVO getWmLoginUrl(String clientId, String secret, String projectCode, String deviceCode) {
|
||||
Client client = Client.getByIdAndSecret(clientId, secret);
|
||||
if (Objects.isNull(project)) {
|
||||
project = Project.DEFAULT;
|
||||
}
|
||||
Project project = projectService.queryLoginProjectByCode(projectCode);
|
||||
ProjectDeviceVO deviceVO = null;
|
||||
if (!StringUtils.isEmpty(deviceCode)) {
|
||||
deviceVO = this.deviceService.getDeviceDetailInfoOf(project, deviceCode);
|
||||
deviceVO = this.deviceService.getDeviceDetailInfoOf(project.getCode(), deviceCode);
|
||||
}
|
||||
String sessionId = RandomGenerator.uuid();
|
||||
String url = qrCodeManager.getLoginCode(clientId, project, sessionId);
|
||||
String url = qrCodeManager.getLoginCode(clientId, project.name(), sessionId);
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
LoginStatusVO loginStatusVO = LoginStatusVO.builder()
|
||||
.url(url)
|
||||
.sessionId(sessionId)
|
||||
.client(client)
|
||||
.project(project)
|
||||
.projectInfo(project)
|
||||
.deviceVO(deviceVO)
|
||||
.time(now)
|
||||
.lastQueryTime(now)
|
||||
@ -209,8 +214,8 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
infoVOList.removeAll(removeList);
|
||||
}
|
||||
// 登录小程序助手
|
||||
LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(accountVO, Client.Assistant,
|
||||
Project.DEFAULT, null);
|
||||
LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(accountVO, Client.Assistant, Project.DEFAULT_PROJECT_CODE
|
||||
, null);
|
||||
String token = loginUserInfoVO.getToken();
|
||||
this.loginSessionManager.addLoginUserInfo(loginUserInfoVO);
|
||||
return loginUserInfoVO;
|
||||
@ -243,11 +248,10 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
AccountVO user = this.iSysUserService.getUserByWmOpenId(wmUserSession.getOpenid());
|
||||
if (StringUtils.isEmpty(loginStatusVo.getToken())) { //正常扫码登陆
|
||||
// 构造登陆用户信息
|
||||
LoginUserInfoVO loginUserInfo =
|
||||
new LoginUserInfoVO(user, loginStatusVo.getClient(),
|
||||
loginStatusVo.getProject(), loginStatusVo.getDeviceVO());
|
||||
LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(user, loginStatusVo.getClient(),
|
||||
loginStatusVo.getProjectInfo().name(), loginStatusVo.getDeviceVO());
|
||||
// 设置组织信息
|
||||
iSysUserService.setOrgInfoOfOrgRelWithTheProject(loginUserInfo.getProject(), user);
|
||||
iSysUserService.setOrgInfoOfOrgRelWithTheProject(loginUserInfo.getProjectInfo().name(), user);
|
||||
// 登陆
|
||||
login(loginUserInfo, true);
|
||||
// 更新登陆状态
|
||||
@ -274,10 +278,10 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
if (loginUserInfo.isProjectDeviceLogin()) {
|
||||
this.handleProjectDeviceLogin(loginUserInfo);
|
||||
}
|
||||
Project project = loginUserInfo.getProject();
|
||||
if (Project.isLoginWithCreateSimulation(project)) { // 行调竞赛实训系统登录
|
||||
String group = this.projectSimulationService
|
||||
.createCenterSimulation(loginUserInfo, project);
|
||||
// TODO 20220922 修改
|
||||
if (loginUserInfo.getProjectInfo().isLoginWithCreateSimulation()) { // 行调竞赛实训系统登录
|
||||
String group = this.projectSimulationService.createCenterSimulation(loginUserInfo,
|
||||
loginUserInfo.getProjectInfo());
|
||||
loginUserInfo.setGroup(group);
|
||||
}
|
||||
}
|
||||
@ -349,12 +353,9 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
|
||||
@Override
|
||||
public String loginWithPwd(LoginUserVO loginUser) {
|
||||
Project project = loginUser.getProject();
|
||||
if (Objects.isNull(project)) {
|
||||
project = Project.DEFAULT;
|
||||
}
|
||||
AccountVO user = this.iSysUserService
|
||||
.findUserByAccountAndPassword(loginUser.getAccount(), loginUser.getPassword(), project);
|
||||
// TODO 20220922
|
||||
Project project = projectService.queryLoginProjectByCode(loginUser.getProject());
|
||||
AccountVO user = this.iSysUserService.findUserByAccountAndPassword(loginUser.getAccount(), loginUser.getPassword(), project.name());
|
||||
BusinessExceptionAssertEnum.LOGIN_INFO_ERROR.assertNotNull(user, "账号或密码不正确!");
|
||||
if (loginUser.isTeacherLogin()) {
|
||||
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertEquals(true, user.getCompanyAdmin(), "账号无教师权限");
|
||||
@ -362,7 +363,7 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
Client client = Client.getByIdAndSecret(loginUser.getClientId(), loginUser.getSecret());
|
||||
ProjectDeviceVO deviceVO = null;
|
||||
if (!StringUtils.isEmpty(loginUser.getDeviceCode())) {
|
||||
deviceVO = this.deviceService.getDeviceDetailInfoOf(project, loginUser.getDeviceCode());
|
||||
deviceVO = this.deviceService.getDeviceDetailInfoOf(project.name(), loginUser.getDeviceCode());
|
||||
}
|
||||
// 构造登陆用户信息
|
||||
LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(user, client, project, deviceVO);
|
||||
@ -379,11 +380,10 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
AccountVO accountVO = this.iSysUserService.queryOrCreateThirdAccount(loginInfo.getParentAccount(),
|
||||
loginInfo.getAccount());
|
||||
Client client = Client.getByIdAndSecret(loginInfo.getClientId(), loginInfo.getSecret());
|
||||
if (Objects.isNull(loginInfo.getProject())) {
|
||||
loginInfo.setProject(Project.DEFAULT);
|
||||
}
|
||||
// TODO 20220922
|
||||
club.joylink.rtss.entity.project.Project project = projectService.queryLoginProjectByCode(loginInfo.getProject());
|
||||
// 构造登陆用户信息
|
||||
LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(accountVO, client, loginInfo.getProject(), null);
|
||||
LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(accountVO, client, project, null);
|
||||
// 执行登录
|
||||
login(loginUserInfo, true);
|
||||
return loginUserInfo.getToken();
|
||||
@ -481,7 +481,8 @@ public class AuthenticateService implements IAuthenticateService {
|
||||
if (Objects.nonNull(loginUserInfoVO)) {
|
||||
// 关联的设备已经登录,此设备登录
|
||||
AccountVO accountVO = loginUserInfoVO.getAccountVO();
|
||||
LoginUserInfoVO userInfoVO = new LoginUserInfoVO(accountVO, loginStatusVO.getClient(), deviceVO.getProject(), deviceVO);
|
||||
LoginUserInfoVO userInfoVO = new LoginUserInfoVO(accountVO, loginStatusVO.getClient()
|
||||
, deviceVO.getProject(), deviceVO);
|
||||
userInfoVO.setGroup(loginUserInfoVO.getGroup());
|
||||
this.loginSessionManager.addLoginUserInfo(userInfoVO);
|
||||
loginStatusVO.success(userInfoVO.getToken());
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services.auth;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.services.WxApiService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -11,6 +10,7 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 获取登陆状态/token
|
||||
*
|
||||
* @param sessionId
|
||||
* @return
|
||||
*/
|
||||
@ -19,12 +19,14 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 通过密码登陆
|
||||
*
|
||||
* @param loginUser
|
||||
*/
|
||||
String loginWithPwd(LoginUserVO loginUser);
|
||||
|
||||
/**
|
||||
* 第三方登录
|
||||
*
|
||||
* @param loginInfo
|
||||
* @return
|
||||
*/
|
||||
@ -32,12 +34,14 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 登出
|
||||
*
|
||||
* @param token
|
||||
*/
|
||||
void logout(String token);
|
||||
|
||||
/**
|
||||
* 微信小程序扫登陆二维码
|
||||
*
|
||||
* @param code
|
||||
* @param state
|
||||
* @return
|
||||
@ -46,16 +50,25 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 获取微信小程序登陆url
|
||||
*
|
||||
* @param clientId
|
||||
* @param secret
|
||||
* @param project
|
||||
* @param deviceCode
|
||||
* @return
|
||||
*/
|
||||
LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode);
|
||||
// LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode);
|
||||
|
||||
/**
|
||||
* TODO 20220922 用于替换上方方法 占位
|
||||
* <p>
|
||||
* 测试文档后删除相关注释
|
||||
*/
|
||||
LoginStatusVO getWmLoginUrl(String clientId, String secret, String projectCode, String deviceCode);
|
||||
|
||||
/**
|
||||
* 微信小程序确认登陆
|
||||
*
|
||||
* @param code
|
||||
* @param state
|
||||
*/
|
||||
@ -63,12 +76,14 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 通过token获取登陆用户信息
|
||||
*
|
||||
* @param token
|
||||
*/
|
||||
LoginUserInfoVO getLoginUserInfoByToken(String token);
|
||||
|
||||
/**
|
||||
* 根据微信小程序code获取用户(若不存在,创建用户);若已登录,则绑定微信
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@ -76,6 +91,7 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 玖琏科技小程序code换token
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@ -83,6 +99,7 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 到那儿了小程序code换token
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@ -90,6 +107,7 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 郑州共赢小程序code换token
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@ -99,6 +117,7 @@ public interface IAuthenticateService {
|
||||
|
||||
/**
|
||||
* 预登出(前端在刷新/关闭标签页的时候调用)
|
||||
*
|
||||
* @param token
|
||||
*/
|
||||
void preLogout(String token);
|
||||
|
@ -1,12 +1,17 @@
|
||||
package club.joylink.rtss.services.completition;
|
||||
|
||||
import club.joylink.rtss.constants.*;
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.SaleOrderPayStatusEnum;
|
||||
import club.joylink.rtss.constants.SaleOrderPayWaysEnum;
|
||||
import club.joylink.rtss.constants.SaleOrderTypeEnum;
|
||||
import club.joylink.rtss.dao.CompetitionDAO;
|
||||
import club.joylink.rtss.dao.CompetitionRecordDAO;
|
||||
import club.joylink.rtss.dao.CompetitionVoiceRecordDAO;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.*;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.services.script.IScriptService;
|
||||
import club.joylink.rtss.services.script.IScriptSimulationService;
|
||||
import club.joylink.rtss.services.simulation.ProjectSimulationService;
|
||||
@ -107,6 +112,9 @@ public class CompetitionPracticalService implements ICompetitionPracticalService
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
|
||||
@Override
|
||||
public PageVO<CompetitionVO> pagedQueryCompetition(CompetitionPagedQueryVO queryVO) {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
@ -378,7 +386,8 @@ public class CompetitionPracticalService implements ICompetitionPracticalService
|
||||
|
||||
@Override
|
||||
public String createSimulationAndLoadCompetition(Long id, LoginUserInfoVO userInfo) {
|
||||
String group = projectSimulationService.createCenterSimulation(userInfo, Project.DRTS);
|
||||
Project project = projectService.queryLoginProjectByCode("DRTS");
|
||||
String group = projectSimulationService.createCenterSimulation(userInfo, project);
|
||||
loadCompetition(group, id, userInfo);
|
||||
return group;
|
||||
}
|
||||
@ -439,8 +448,8 @@ public class CompetitionPracticalService implements ICompetitionPracticalService
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(monthAmount > 0,
|
||||
"购买月数需大于0");
|
||||
MapVO mapInfo = iMapService.getMapInfoById(mapId);
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(Project.DRTS.name().equals(mapInfo.getProjectCode()),
|
||||
"非国赛地图无需购买权限");
|
||||
Project project = projectService.queryLoginProjectByCode(mapInfo.getProjectCode());
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(project.isMapNeedCharge(), "非国赛地图无需购买权限");
|
||||
List<UserPermissionVO> ups = iUserPermissionService.getSimulationUserPermission(user, mapId, MapPrdTypeEnum.JOINT.getCode());
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotTrue(ups.size() > 1,
|
||||
"地图权限数量大于1,暂不能购买");
|
||||
|
@ -1,9 +1,9 @@
|
||||
package club.joylink.rtss.services.completition;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.RaceQuestionsRulesDAO;
|
||||
import club.joylink.rtss.entity.RaceQuestionsRules;
|
||||
import club.joylink.rtss.entity.RaceQuestionsRulesExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.competition.TheoryQuestionRuleQueryVO;
|
||||
@ -35,15 +35,8 @@ public class RaceQuestionsRuleService implements IRaceQuestionsRuleService {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
RaceQuestionsRulesExample example = new RaceQuestionsRulesExample();
|
||||
RaceQuestionsRulesExample.Criteria criteria = example.createCriteria();
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(queryVO.getProjectCode()));
|
||||
if (isDefault) {
|
||||
if (Project.isDefault(queryVO.getProjectCode())) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
// if (Objects.nonNull(queryVO.getCompanyId())) {
|
||||
// criteria.andCompanyIdEqualTo(queryVO.getCompanyId());
|
||||
// }
|
||||
// else {
|
||||
// criteria.andCompanyIdIsNull();
|
||||
// }
|
||||
} else {
|
||||
criteria.andProjectCodeEqualTo(queryVO.getProjectCode());
|
||||
}
|
||||
@ -64,8 +57,7 @@ public class RaceQuestionsRuleService implements IRaceQuestionsRuleService {
|
||||
public TheoryQuestionsRuleVO get(String projectCode, Long companyId) {
|
||||
RaceQuestionsRulesExample example = new RaceQuestionsRulesExample();
|
||||
RaceQuestionsRulesExample.Criteria criteria = example.createCriteria();
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
if (isDefault) {
|
||||
if (Project.isDefault(projectCode)) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
criteria.andCompanyIdEqualTo(companyId);
|
||||
@ -107,8 +99,7 @@ public class RaceQuestionsRuleService implements IRaceQuestionsRuleService {
|
||||
public boolean isExist(String projectCode, Long companyId) {
|
||||
RaceQuestionsRulesExample example = new RaceQuestionsRulesExample();
|
||||
RaceQuestionsRulesExample.Criteria criteria = example.createCriteria();
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
if (isDefault) {
|
||||
if (Project.isDefault(projectCode)) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
criteria.andCompanyIdEqualTo(companyId);
|
||||
|
@ -1,12 +1,12 @@
|
||||
package club.joylink.rtss.services.completition;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.RaceQuestionMocksStatsDAO;
|
||||
import club.joylink.rtss.dao.RaceResultDAO;
|
||||
import club.joylink.rtss.entity.RaceQuestionMocksStats;
|
||||
import club.joylink.rtss.entity.RaceResult;
|
||||
import club.joylink.rtss.entity.RaceResultExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.completition.question.IQuestionBankService;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
@ -66,10 +66,10 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
*/
|
||||
@Override
|
||||
public List<QuestionVO> getProjectTheory(String mode, String projectCode, Long companyId, AccountVO user) {
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
//相关竞赛项目下所有题目
|
||||
QuestionQueryVO questionQueryVO = new QuestionQueryVO();
|
||||
questionQueryVO.setProjectCode(isDefault ? null : projectCode);
|
||||
questionQueryVO.setProjectCode(projectCode);
|
||||
questionQueryVO.setCompanyId(companyId);
|
||||
List<QuestionVO> questionVOS = questionBankService.queryQuestionDetails(questionQueryVO);
|
||||
//默认试题规则,模拟考试模式删除答案
|
||||
@ -135,7 +135,7 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
List<Float> scores = new ArrayList<>() {{
|
||||
add(0f);
|
||||
}};
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
QuestionQueryVO questionQueryVO = new QuestionQueryVO();
|
||||
questionQueryVO.setProjectCode(isDefault ? null : projectCode);
|
||||
questionQueryVO.setCompanyId(companyId);
|
||||
@ -164,7 +164,7 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
Map<Long, List<TheoryAnswerVO.AnswerContent>> questionAnswerMap = theoryAnswers.getTheoryAnswers().stream().collect(Collectors.toMap(TheoryAnswerVO::getQuestionId, TheoryAnswerVO::getAnswerContents, (oldVal, newVal) -> newVal));
|
||||
List<QuestionVO> questions = questionVOS.stream().filter(questionVO -> {
|
||||
if (questionAnswerMap.containsKey(questionVO.getId())) {
|
||||
if (Objects.equals(BusinessConsts.AnswerMode.Mode02 , theoryAnswers.getMode())) {
|
||||
if (Objects.equals(BusinessConsts.AnswerMode.Mode02, theoryAnswers.getMode())) {
|
||||
TheoryQuestionsRuleVO ruleVO = iRaceQuestionsRuleService.get(projectCode, companyId);
|
||||
BusinessExceptionAssertEnum.QUESTION_RULE_NOT_EXIST.assertNotNull(ruleVO, "出题规则不存在,请先设置规则。");
|
||||
questionVO.setScore(ruleVO.getByType(questionVO.getType()).getPoint());
|
||||
@ -180,26 +180,26 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
List<Long> incorrectList = new ArrayList<>();
|
||||
questions.forEach(question -> {
|
||||
RaceResult raceResult = new RaceResult();
|
||||
raceResult.setProjectCode(isDefault ? null : projectCode);
|
||||
raceResult.setCompanyId(companyId);
|
||||
raceResult.setUserId(user.getId());
|
||||
raceResult.setQuestionTopic(question.getTopic());
|
||||
raceResult.setQuestionId(question.getId());
|
||||
raceResult.setTotalScore(question.getScore());
|
||||
raceResult.setProjectCode(isDefault ? null : projectCode);
|
||||
raceResult.setCompanyId(companyId);
|
||||
raceResult.setUserId(user.getId());
|
||||
raceResult.setQuestionTopic(question.getTopic());
|
||||
raceResult.setQuestionId(question.getId());
|
||||
raceResult.setTotalScore(question.getScore());
|
||||
|
||||
List<TheoryAnswerVO.AnswerContent> answerOptionIds = questionAnswerMap.get(question.getId());
|
||||
switch (BusinessConsts.TheoryType.valueOf(question.getType())){
|
||||
switch (BusinessConsts.TheoryType.valueOf(question.getType())) {
|
||||
case multi:
|
||||
List<Long> optionList = question.getOptionList().stream().filter(QuestionOptionVO::getCorrect).map(QuestionOptionVO::getId).collect(Collectors.toList());
|
||||
raceResult.setQuestionOptionId(JsonUtils.writeValueAsString(TheoryAnswerVO.getOptionIds(answerOptionIds)));
|
||||
if((!CollectionUtils.isEmpty(answerOptionIds)) && optionList.containsAll(TheoryAnswerVO.getOptionIds(answerOptionIds)) && TheoryAnswerVO.getOptionIds(answerOptionIds).containsAll(optionList)){
|
||||
if ((!CollectionUtils.isEmpty(answerOptionIds)) && optionList.containsAll(TheoryAnswerVO.getOptionIds(answerOptionIds)) && TheoryAnswerVO.getOptionIds(answerOptionIds).containsAll(optionList)) {
|
||||
|
||||
raceResult.setAnswerContent(String.join("|",question.getOptionList().stream().filter(q -> TheoryAnswerVO.getOptionIds(answerOptionIds).contains(q.getId())).map(QuestionOptionVO::getContent).collect(Collectors.toList())));
|
||||
raceResult.setAnswerContent(String.join("|", question.getOptionList().stream().filter(q -> TheoryAnswerVO.getOptionIds(answerOptionIds).contains(q.getId())).map(QuestionOptionVO::getContent).collect(Collectors.toList())));
|
||||
raceResult.setCorrect(true);
|
||||
scores.add(question.getScore());
|
||||
raceResult.setScore(question.getScore());
|
||||
} else {
|
||||
if(!CollectionUtils.isEmpty(answerOptionIds)){
|
||||
if (!CollectionUtils.isEmpty(answerOptionIds)) {
|
||||
incorrectList.add(question.getId());
|
||||
// incorrectNum.incrementAndGet();
|
||||
}
|
||||
@ -210,7 +210,7 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
case answer:
|
||||
case fill:
|
||||
raceResult.setQuestionOptionId(JsonUtils.writeValueAsString(TheoryAnswerVO.getOptionIds(answerOptionIds)));
|
||||
raceResult.setAnswerContent(String.join("|",TheoryAnswerVO.getOptionAnswers(answerOptionIds)));
|
||||
raceResult.setAnswerContent(String.join("|", TheoryAnswerVO.getOptionAnswers(answerOptionIds)));
|
||||
break;
|
||||
case select:
|
||||
case judge:
|
||||
@ -244,7 +244,7 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
RaceResultDetailVO raceResultDetailVO = new RaceResultDetailVO(raceResult);
|
||||
raceResultDetailVO.setQuestion(question);
|
||||
raceResultDetails.add(raceResultDetailVO);
|
||||
});
|
||||
});
|
||||
// }
|
||||
|
||||
//*******************
|
||||
@ -269,8 +269,8 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
}
|
||||
|
||||
//错题保存
|
||||
if(!CollectionUtils.isEmpty(incorrectList)){
|
||||
questionProgressService.addIncorrectQuestions(user.getId(),projectCode, companyId,incorrectList);
|
||||
if (!CollectionUtils.isEmpty(incorrectList)) {
|
||||
questionProgressService.addIncorrectQuestions(user.getId(), projectCode, companyId, incorrectList);
|
||||
}
|
||||
//计算分数
|
||||
|
||||
@ -279,13 +279,14 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
}
|
||||
|
||||
|
||||
/**清除考试结果*/
|
||||
/**
|
||||
* 清除考试结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteRaceTheoryResult(String projectCode, Long companyId) {
|
||||
RaceResultExample example = new RaceResultExample();
|
||||
RaceResultExample.Criteria criteria = example.createCriteria();
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
if (isDefault) {
|
||||
if (Project.isDefault(projectCode)) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
criteria.andCompanyIdEqualTo(companyId);
|
||||
@ -299,14 +300,13 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<RaceResultDetailVO> getTheoryResultDetails(String projectCode, Long companyId, Long userId) {
|
||||
//根据参赛id获取参赛成绩信息
|
||||
RaceResultExample example = new RaceResultExample();
|
||||
RaceResultExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserRaceIdEqualTo(userId);
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
@ -318,7 +318,7 @@ public class RaceTheoryService implements IRaceTheoryService {
|
||||
criteria.andProjectCodeEqualTo(projectCode);
|
||||
}
|
||||
List<RaceResult> raceResults = raceResultDAO.selectByExample(example);
|
||||
if(CollectionUtils.isEmpty(raceResults)){
|
||||
if (CollectionUtils.isEmpty(raceResults)) {
|
||||
return null;
|
||||
}
|
||||
return raceResults.stream().map(RaceResultDetailVO::new).map(resultDetailVO -> {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package club.joylink.rtss.services.completition;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.RaceQuestionProgressDAO;
|
||||
import club.joylink.rtss.entity.RaceQuestionProgress;
|
||||
import club.joylink.rtss.entity.RaceQuestionProgressExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.vo.client.competition.RaceQuestionProgressVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -23,7 +23,7 @@ public class UserQuestionProgressService implements IUserQuestionProgressService
|
||||
|
||||
@Override
|
||||
public RaceQuestionProgressVO getQuestionProgress(Long userId, String projectCode, Long companyId) {
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
RaceQuestionProgressExample example = new RaceQuestionProgressExample();
|
||||
RaceQuestionProgressExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserIdEqualTo(userId);
|
||||
@ -71,7 +71,7 @@ public class UserQuestionProgressService implements IUserQuestionProgressService
|
||||
public void addQuestionProgress(Long userId, String projectCode, Long companyId, Long questionIndex) {
|
||||
|
||||
// raceQuestionProgressDAO.insertOrUpdateSelective(entity);
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
RaceQuestionProgressExample example = new RaceQuestionProgressExample();
|
||||
RaceQuestionProgressExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserIdEqualTo(userId);
|
||||
@ -88,7 +88,7 @@ public class UserQuestionProgressService implements IUserQuestionProgressService
|
||||
List<RaceQuestionProgress> progresses = raceQuestionProgressDAO.selectByExample(example);
|
||||
|
||||
if (CollectionUtils.isEmpty(progresses)) {
|
||||
RaceQuestionProgressVO progressVO= new RaceQuestionProgressVO();
|
||||
RaceQuestionProgressVO progressVO = new RaceQuestionProgressVO();
|
||||
progressVO.setUserId(userId);
|
||||
progressVO.setProjectCode(projectCode);
|
||||
progressVO.setCompanyId(companyId);
|
||||
@ -112,7 +112,7 @@ public class UserQuestionProgressService implements IUserQuestionProgressService
|
||||
|
||||
RaceQuestionProgressExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserIdEqualTo(userId);
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
@ -148,7 +148,7 @@ public class UserQuestionProgressService implements IUserQuestionProgressService
|
||||
RaceQuestionProgressExample example = new RaceQuestionProgressExample();
|
||||
RaceQuestionProgressExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserIdEqualTo(userId);
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
@ -182,7 +182,7 @@ public class UserQuestionProgressService implements IUserQuestionProgressService
|
||||
RaceQuestionProgressExample example = new RaceQuestionProgressExample();
|
||||
RaceQuestionProgressExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andUserIdEqualTo(userId);
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package club.joylink.rtss.services.completition.question;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.RaceQuestionDAO;
|
||||
import club.joylink.rtss.dao.RaceQuestionOptionDAO;
|
||||
import club.joylink.rtss.entity.RaceQuestion;
|
||||
import club.joylink.rtss.entity.RaceQuestionExample;
|
||||
import club.joylink.rtss.entity.RaceQuestionOption;
|
||||
import club.joylink.rtss.entity.RaceQuestionOptionExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.completition.IUserQuestionProgressService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
@ -53,7 +53,7 @@ public class QuestionBankService implements IQuestionBankService {
|
||||
if (StringUtils.hasText(queryVO.getType())) {
|
||||
criteria.andTypeEqualTo(queryVO.getType());
|
||||
}
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(queryVO.getProjectCode()));
|
||||
boolean isDefault = Project.isDefault(queryVO.getProjectCode());
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(queryVO.getCompanyId())) {
|
||||
@ -85,7 +85,7 @@ public class QuestionBankService implements IQuestionBankService {
|
||||
if (StringUtils.hasText(queryVO.getType())) {
|
||||
criteria.andTypeEqualTo(queryVO.getType());
|
||||
}
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(queryVO.getProjectCode()));
|
||||
boolean isDefault = Project.isDefault(queryVO.getProjectCode());
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(queryVO.getCompanyId())) {
|
||||
@ -180,15 +180,15 @@ public class QuestionBankService implements IQuestionBankService {
|
||||
if (questionVO.isSelect() || questionVO.isJudge()) {
|
||||
long answerCount = questionVO.getOptionList().stream().filter(QuestionOptionVO::getCorrect).count();
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(answerCount == 1,
|
||||
String.format("题序[%s]:单选或判断题[%s]正确答案应当有且只有一个!", questionVO.getId(),topic));
|
||||
String.format("题序[%s]:单选或判断题[%s]正确答案应当有且只有一个!", questionVO.getId(), topic));
|
||||
}
|
||||
if (questionVO.isFill() || questionVO.isAnswer()) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(
|
||||
questionVO.getOptionList().stream().allMatch(QuestionOptionVO::getCorrect),
|
||||
String.format("题序[%s]:填空或问答题[%s]不能有错误选项!", questionVO.getId(),topic));
|
||||
String.format("题序[%s]:填空或问答题[%s]不能有错误选项!", questionVO.getId(), topic));
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(
|
||||
questionVO.getOptionList().stream().noneMatch(op -> Objects.isNull(op.getOrder())),
|
||||
String.format("题序[%s]:填空或问答题[%s]选项缺少序号!", questionVO.getId(),topic));
|
||||
String.format("题序[%s]:填空或问答题[%s]选项缺少序号!", questionVO.getId(), topic));
|
||||
if (questionVO.getOptionList().stream().anyMatch(op -> Objects.isNull(op.getOrder()))) {
|
||||
questionVO.getOptionList().sort(Comparator.comparing(QuestionOptionVO::getOrder));
|
||||
AtomicInteger i = new AtomicInteger(1);
|
||||
@ -201,7 +201,7 @@ public class QuestionBankService implements IQuestionBankService {
|
||||
}
|
||||
});
|
||||
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
//默认项目导入题考虑是否有单位关联
|
||||
if (isDefault) {
|
||||
RaceQuestionExample example = new RaceQuestionExample();
|
||||
@ -289,7 +289,7 @@ public class QuestionBankService implements IQuestionBankService {
|
||||
RaceQuestionExample questionExample = new RaceQuestionExample();
|
||||
RaceQuestionExample.Criteria criteria = questionExample.createCriteria();
|
||||
criteria.andTypeEqualTo(type);
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
boolean isDefault = Project.isDefault(projectCode);
|
||||
if (isDefault) {
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services.org;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -32,14 +31,17 @@ public interface IOrgService {
|
||||
|
||||
Org findEntity(long orgId);
|
||||
|
||||
Collection<Org> getEntities(Project project, String status);
|
||||
// TODO 20220922 将Project 修改为 String
|
||||
Collection<Org> getEntities(String project, String status);
|
||||
|
||||
Collection<Org> findEntities(Project project, String status);
|
||||
// TODO 20220922 将Project 修改为 String
|
||||
Collection<Org> findEntities(String project, String status);
|
||||
|
||||
CompanyVO updateOrg(Long id, CompanyVO companyVO, AccountVO user);
|
||||
|
||||
/**
|
||||
* 删除非顶级组织
|
||||
*
|
||||
* @param nonTopOrgId
|
||||
*/
|
||||
void deleteNonTopOrg(Long nonTopOrgId);
|
||||
@ -81,7 +83,7 @@ public interface IOrgService {
|
||||
|
||||
List<Org> queryAllSubOrgs(Long orgId);
|
||||
|
||||
String getBindQrCode(long orgId, Project project);
|
||||
String getBindQrCode(long orgId, String project);
|
||||
|
||||
/**
|
||||
* 获取该用户所属的顶级组织
|
||||
|
@ -1,7 +1,6 @@
|
||||
package club.joylink.rtss.services.org;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.OrgExample;
|
||||
@ -132,16 +131,16 @@ public class OrgService implements IOrgService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Org> getEntities(Project project, String status) {
|
||||
public Collection<Org> getEntities(String project, String status) {
|
||||
Collection<Org> orgs = findEntities(project, status);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(orgs, String.format("关联项目[%s]的组织不存在", project));
|
||||
return orgs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Org> findEntities(@NonNull Project project, String status) {
|
||||
public Collection<Org> findEntities(@NonNull String project, String status) {
|
||||
OrgExample example = new OrgExample();
|
||||
OrgExample.Criteria criteria = example.createCriteria().andProjectCodeLike(String.format("%%%s%%", project.name()));
|
||||
OrgExample.Criteria criteria = example.createCriteria().andProjectCodeLike(String.format("%%%s%%", project));
|
||||
if (StringUtils.hasText(status)) {
|
||||
criteria.andStatusEqualTo(status);
|
||||
}
|
||||
@ -290,7 +289,7 @@ public class OrgService implements IOrgService {
|
||||
List<Long> userIds = orgUsers.stream().map(OrgUser::getUserId).collect(Collectors.toList());
|
||||
Map<Long, SysAccount> userMap = iSysUserService.findEntities(userIds, null)
|
||||
.stream().collect(Collectors.toMap(SysAccount::getId, Function.identity()));
|
||||
all_orgId_node_map.forEach((k,v)->{
|
||||
all_orgId_node_map.forEach((k, v) -> {
|
||||
List<OrgUser> ous = groupByOrgIdOrgUsers.get(k);
|
||||
if (!CollectionUtils.isEmpty(ous)) {
|
||||
List<Node<Object>> children = ous.stream().map(ou -> {
|
||||
@ -322,6 +321,7 @@ public class OrgService implements IOrgService {
|
||||
|
||||
/**
|
||||
* 确认是顶级组织
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
@ -350,7 +350,7 @@ public class OrgService implements IOrgService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBindQrCode(long orgId, Project project) {
|
||||
public String getBindQrCode(long orgId, String project) {
|
||||
return qrCodeManager.getOrgBindCode(orgId, project);
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,20 @@
|
||||
package club.joylink.rtss.services.completition.question;
|
||||
package club.joylink.rtss.services.papger;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.PagerQuestionDAO;
|
||||
import club.joylink.rtss.entity.question.PaperQuestion;
|
||||
import club.joylink.rtss.entity.question.PaperQuestionExample;
|
||||
import club.joylink.rtss.dao.paper.PagerQuestionDAO;
|
||||
import club.joylink.rtss.entity.paper.question.PaperQuestion;
|
||||
import club.joylink.rtss.entity.paper.question.PaperQuestionExample;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.PagerLableQueryVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.PaperQuestionOptionVO2;
|
||||
import club.joylink.rtss.vo.client.pager.question.PaperQuestionVO;
|
||||
import club.joylink.rtss.vo.client.question.QuestionQueryVO;
|
||||
import club.joylink.rtss.vo.client.question.v2.PagerLableQueryVO;
|
||||
import club.joylink.rtss.vo.client.question.v2.PaperQuestionOptionVO2;
|
||||
import club.joylink.rtss.vo.client.question.v2.PaperQuestionVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.base.Strings;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@ -23,7 +22,10 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@ -76,7 +78,7 @@ public class PagerQuestionService {
|
||||
* @return
|
||||
*/
|
||||
public List<PaperQuestionVO> queryQuestions(QuestionQueryVO queryVO) {
|
||||
List<PaperQuestion> list = (List<PaperQuestion>) this.queryQuestions(queryVO,true);
|
||||
List<PaperQuestion> list = (List<PaperQuestion>) this.queryQuestions(queryVO,false);
|
||||
List<PaperQuestionVO> questionVOS = PaperQuestionVO.convert2VOList(list);
|
||||
return questionVOS;
|
||||
}
|
||||
@ -85,16 +87,31 @@ public class PagerQuestionService {
|
||||
/**
|
||||
* 获取题型所有数据
|
||||
* @param questionId
|
||||
* @param doNotCheckDel 是否检测数据状态是否删除 true = 不检测,false=检测
|
||||
* @return
|
||||
*/
|
||||
public PaperQuestionVO getQuestion(Long questionId) {
|
||||
public PaperQuestionVO getQuestion(Long questionId,boolean doNotCheckDel) {
|
||||
PaperQuestion question = questionDAO.selectByPrimaryKey(questionId);
|
||||
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(question) || question.getIsDel() == BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
boolean isDel = Objects.nonNull(question) || question.getIsDel() == BusinessConsts.DBLogicDelete.NORMAL.ordinal();
|
||||
if(doNotCheckDel){
|
||||
isDel = Objects.nonNull(question);
|
||||
}
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(isDel);
|
||||
PaperQuestionVO questionVO = new PaperQuestionVO(question);
|
||||
return questionVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测题目是否正确
|
||||
* @param questionId 题目id
|
||||
* @param answer 检测的答案
|
||||
* @return
|
||||
*/
|
||||
public boolean checkAnswer(Long questionId,String answer){
|
||||
PaperQuestionVO vo = this.getQuestion(questionId,true);
|
||||
return vo.getOptionList().stream().anyMatch(d->Objects.equals(d,answer.trim()) && Objects.equals(true,d.getCorrect()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有公司组织下的标签
|
||||
*
|
||||
@ -126,7 +143,7 @@ public class PagerQuestionService {
|
||||
* @param random
|
||||
* @return
|
||||
*/
|
||||
public List<PaperQuestionVO> queryQuestionsForRaceLable(String projectCode, PagerLableQueryVO queryVO,boolean random) {
|
||||
public List<PaperQuestionVO> queryQuestionsForRaceLable(String projectCode, PagerLableQueryVO queryVO, boolean random) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(queryVO.allNotNullOrEmpty(),"查询内容不能为空");
|
||||
int isDel = BusinessConsts.DBLogicDelete.NORMAL.ordinal();
|
||||
|
||||
@ -156,7 +173,7 @@ public class PagerQuestionService {
|
||||
PaperQuestion question = questionVO.convert2DB();
|
||||
question.setCreateUserId(accountVO.getId());
|
||||
question.setCreateTime(LocalDateTime.now());
|
||||
question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
// question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
if(Objects.nonNull(questionVO.getId())){
|
||||
PaperQuestionExample example = new PaperQuestionExample();
|
||||
PaperQuestionExample.Criteria criteria = example.createCriteria();
|
||||
@ -170,7 +187,6 @@ public class PagerQuestionService {
|
||||
questionDAO.updateByPrimaryKey(question);
|
||||
}else{
|
||||
questionDAO.insert(question);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -196,9 +212,9 @@ public class PagerQuestionService {
|
||||
|
||||
boolean isDefault = Project.isDefault(Project.valueOf(projectCode));
|
||||
//默认项目导入题考虑是否有单位关联
|
||||
PaperQuestionExample example = new PaperQuestionExample();
|
||||
PaperQuestionExample.Criteria criteria = example.createCriteria();
|
||||
if (isDefault) {
|
||||
PaperQuestionExample example = new PaperQuestionExample();
|
||||
PaperQuestionExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andProjectCodeIsNull();
|
||||
if (Objects.nonNull(companyId)) {
|
||||
criteria.andCompanyIdEqualTo(companyId);
|
||||
@ -213,14 +229,13 @@ public class PagerQuestionService {
|
||||
question.setCreateUserId(accountVO.getId());
|
||||
question.setCreateTime(LocalDateTime.now());
|
||||
question.setCompanyId(companyId);
|
||||
question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
// question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
questionDAO.insert(question);
|
||||
});
|
||||
|
||||
} else {
|
||||
//非默认项目导入题
|
||||
PaperQuestionExample example = new PaperQuestionExample();
|
||||
example.createCriteria().andProjectCodeEqualTo(projectCode);
|
||||
criteria.andProjectCodeEqualTo(projectCode);
|
||||
questionDAO.deleteByExample(example);
|
||||
questions.forEach(questionVO -> {
|
||||
questionVO.setProjectCode(projectCode);
|
||||
@ -228,15 +243,16 @@ public class PagerQuestionService {
|
||||
question.setProjectCode(projectCode);
|
||||
question.setCreateUserId(accountVO.getId());
|
||||
question.setCreateTime(LocalDateTime.now());
|
||||
question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
// question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
questionDAO.insert(question);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除 逻辑删除
|
||||
* @param questionId
|
||||
*/
|
||||
public void deleteQuestion(List<Long> questionId) {
|
||||
PaperQuestionExample example = new PaperQuestionExample();
|
||||
example.createCriteria().andIdIn(questionId);
|
@ -1,8 +1,8 @@
|
||||
package club.joylink.rtss.services.pay.wechat;
|
||||
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ServicePath;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.event.OrderPaySuccessEvent;
|
||||
import club.joylink.rtss.exception.BusinessException;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
@ -10,6 +10,7 @@ import club.joylink.rtss.exception.PayException;
|
||||
import club.joylink.rtss.services.*;
|
||||
import club.joylink.rtss.services.pay.bean.OrderPay;
|
||||
import club.joylink.rtss.services.pay.wechat.bean.WxUnifiedOrder;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.goods.GoodsVO;
|
||||
@ -83,6 +84,9 @@ public class WechatPayService {
|
||||
@Autowired
|
||||
private IPermissionDistributeService iPermissionDistributeService;
|
||||
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
|
||||
private CloseableHttpClient httpClient;
|
||||
|
||||
private AutoUpdateCertificatesVerifier verifier;
|
||||
@ -306,7 +310,8 @@ public class WechatPayService {
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(permission.getName().contains("综合演练"),
|
||||
String.format("支付的[%s]中的商品不是综合演练权限", orderVO.logStr()));
|
||||
MapVO mapInfo = iMapService.getMapInfoById(permission.getMapId());
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(Project.DRTS.name().equals(mapInfo.getProjectCode()),
|
||||
Project project = projectService.queryLoginProjectByCode(mapInfo.getProjectCode());
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(project.isMapNeedCharge(),
|
||||
String.format("支付的[%s]中的商品不是国赛的权限", orderVO.logStr()));
|
||||
|
||||
AccountVO user = iSysUserService.getUserById(orderVO.getCreatorId());
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -12,6 +11,7 @@ import java.util.List;
|
||||
public interface DeviceService {
|
||||
/**
|
||||
* 分页查询项目设备
|
||||
*
|
||||
* @param queryVO
|
||||
* @param userLoginInfo
|
||||
* @return
|
||||
@ -20,14 +20,16 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 项目设备编码是否存在
|
||||
*
|
||||
* @param project
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
boolean isDeviceCodeExist(Project project, String code);
|
||||
boolean isDeviceCodeExist(String project, String code);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param deviceVO
|
||||
* @param userLoginInfo
|
||||
* @return
|
||||
@ -36,6 +38,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 获取设备基础信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -45,6 +48,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新道岔配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -52,6 +56,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新信号机配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -59,6 +64,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新屏蔽门控制柜配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -66,6 +72,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新屏蔽门配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -73,6 +80,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新屏蔽门控制盒配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -80,6 +88,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新IBP盘配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -87,6 +96,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新虚拟IBP盘配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -94,6 +104,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新现地工作站配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -101,6 +112,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新大屏工作站配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -108,6 +120,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新CCTV工作站配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -115,6 +128,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新电子沙盘工作站配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -122,6 +136,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新现地ISCS工作站配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -129,6 +144,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新中心ISCS工作站配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -136,6 +152,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新虚拟屏蔽门客户端配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -143,6 +160,7 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 更新联锁工作站客户端配置
|
||||
*
|
||||
* @param id
|
||||
* @param configVO
|
||||
*/
|
||||
@ -155,29 +173,35 @@ public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
|
||||
/**
|
||||
* 查询某分类下的所有设备
|
||||
*
|
||||
* @param type
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
List<ProjectDeviceVO> queryByType(ProjectDeviceType type, Project project);
|
||||
List<ProjectDeviceVO> queryByType(ProjectDeviceType type, String project);
|
||||
|
||||
ProjectDeviceVO getDeviceDetailInfoById(Long id);
|
||||
|
||||
ProjectDeviceVO getDeviceDetailInfoOf(Project project, String deviceCode);
|
||||
/**
|
||||
* TODO 20220922用于替换上方方法,占位
|
||||
*/
|
||||
ProjectDeviceVO getDeviceDetailInfoOf(String projectCode, String deviceCode);
|
||||
|
||||
/**
|
||||
* 查询指定分类下的所有设备
|
||||
*
|
||||
* @param typeList
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
List<ProjectDeviceVO> queryDetailByTypes(List<ProjectDeviceType> typeList, Project project);
|
||||
List<ProjectDeviceVO> queryDetailByTypes(List<ProjectDeviceType> typeList, String project);
|
||||
|
||||
void addOrUpdateXtyDeviceConfig(AccountVO accountVO);
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.dao.ProjectDeviceDAO;
|
||||
import club.joylink.rtss.entity.ProjectDevice;
|
||||
import club.joylink.rtss.entity.ProjectDeviceExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.IMapService;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
@ -59,8 +59,8 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
LoginUserInfoVO userLoginInfo) {
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
ProjectDeviceExample.Criteria criteria = example.createCriteria();
|
||||
if (!Objects.equals(userLoginInfo.getProject(), Project.DEFAULT)) {
|
||||
criteria.andProjectCodeEqualTo(userLoginInfo.getProject().name());
|
||||
if (!Objects.equals(userLoginInfo.getProject(), Project.DEFAULT_PROJECT_CODE)) {
|
||||
criteria.andProjectCodeEqualTo(userLoginInfo.getProject());
|
||||
}
|
||||
if (StringUtils.hasText(queryVO.getCode())) {
|
||||
criteria.andCodeLike(String.format("%%%s%%", queryVO.getCode()));
|
||||
@ -75,13 +75,11 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDeviceCodeExist(Project project, String code) {
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotEquals(project, Project.DEFAULT,
|
||||
public boolean isDeviceCodeExist(String project, String code) {
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotEquals(project, Project.DEFAULT_PROJECT_CODE,
|
||||
String.format("项目[%s]没有权限", project));
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(project.name())
|
||||
.andCodeEqualTo(code);
|
||||
example.createCriteria().andProjectCodeEqualTo(project).andCodeEqualTo(code);
|
||||
if (this.projectDeviceDAO.countByExample(example) > 0) {
|
||||
return true;
|
||||
}
|
||||
@ -91,9 +89,9 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
@Override
|
||||
public String create(ProjectDeviceVO deviceVO, LoginUserInfoVO userLoginInfo) {
|
||||
ProjectDevice projectDevice = deviceVO.buildDB();
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotEquals(userLoginInfo.getProject(), Project.DEFAULT,
|
||||
String.format("项目[%s]无权添加设备", userLoginInfo.getProject()));
|
||||
projectDevice.setProjectCode(userLoginInfo.getProject().name());
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotEquals(userLoginInfo.getProject(),
|
||||
Project.DEFAULT_PROJECT_CODE, String.format("项目[%s]无权添加设备", userLoginInfo.getProject()));
|
||||
projectDevice.setProjectCode(userLoginInfo.getProject());
|
||||
projectDevice.setCreator(userLoginInfo.getAccountVO().getId());
|
||||
projectDevice.setCreateTime(LocalDateTime.now());
|
||||
this.projectDeviceDAO.insert(projectDevice);
|
||||
@ -286,7 +284,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
private void check(ProjectDevice entity, ProjectDeviceVO projectDeviceVO) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertEquals(entity.getProjectCode(), projectDeviceVO.getProject().name());
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertEquals(entity.getProjectCode(), projectDeviceVO.getProject());
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertEquals(entity.getCode(), projectDeviceVO.getCode());
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertEquals(entity.getType(), projectDeviceVO.getType().name());
|
||||
}
|
||||
@ -297,13 +295,11 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectDeviceVO> queryByType(ProjectDeviceType type, Project project) {
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotEquals(project, Project.DEFAULT,
|
||||
public List<ProjectDeviceVO> queryByType(ProjectDeviceType type, String project) {
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotEquals(project, Project.DEFAULT_PROJECT_CODE,
|
||||
String.format("项目[%s]没有权限", project));
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(project.name())
|
||||
.andTypeEqualTo(type.name());
|
||||
example.createCriteria().andProjectCodeEqualTo(project).andTypeEqualTo(type.name());
|
||||
List<ProjectDevice> projectDevices = this.projectDeviceDAO.selectByExample(example);
|
||||
return ProjectDeviceVO.convert2VOList(projectDevices);
|
||||
}
|
||||
@ -316,12 +312,13 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
return projectDeviceVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 20220922 用于替换上方方法 占位
|
||||
*/
|
||||
@Override
|
||||
public ProjectDeviceVO getDeviceDetailInfoOf(Project project, String deviceCode) {
|
||||
public ProjectDeviceVO getDeviceDetailInfoOf(String project, String deviceCode) {
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(project.name())
|
||||
.andCodeEqualTo(deviceCode);
|
||||
example.createCriteria().andProjectCodeEqualTo(project).andCodeEqualTo(deviceCode);
|
||||
List<ProjectDevice> projectDevices = this.projectDeviceDAO.selectByExampleWithBLOBs(example);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(projectDevices,
|
||||
String.format("[project:%s,code:%s]的设备不存在", project, deviceCode));
|
||||
@ -330,13 +327,13 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectDeviceVO> queryDetailByTypes(List<ProjectDeviceType> typeList, Project project) {
|
||||
public List<ProjectDeviceVO> queryDetailByTypes(List<ProjectDeviceType> typeList, String project) {
|
||||
if (CollectionUtils.isEmpty(typeList)) {
|
||||
throw new IllegalArgumentException("ProjectDeviceType list cannot empty");
|
||||
}
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(project.name())
|
||||
.andProjectCodeEqualTo(project)
|
||||
.andTypeIn(typeList.stream().map(type -> type.name()).collect(Collectors.toList()));
|
||||
List<ProjectDevice> list = this.projectDeviceDAO.selectByExampleWithBLOBs(example);
|
||||
return ProjectDeviceVO.convert2VOList(list);
|
||||
@ -347,7 +344,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// 删除旧配置
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(Project.XTY.name())
|
||||
.andProjectCodeEqualTo("XTY")
|
||||
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
|
||||
.map(type -> type.name()).collect(Collectors.toList()));
|
||||
this.projectDeviceDAO.deleteByExample(example);
|
||||
@ -363,7 +360,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
List<ProjectDevice> list = new ArrayList<>();
|
||||
// PLC网关
|
||||
ProjectDevice plcGateway = new ProjectDevice();
|
||||
plcGateway.setProjectCode(Project.XTY.name());
|
||||
plcGateway.setProjectCode("XTY");
|
||||
plcGateway.setCode("xty-gateway");
|
||||
plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name());
|
||||
plcGateway.setCreator(accountVO.getId());
|
||||
@ -373,7 +370,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(plcGateway);
|
||||
// 屏蔽门
|
||||
ProjectDevice psd = new ProjectDevice();
|
||||
psd.setProjectCode(Project.XTY.name());
|
||||
psd.setProjectCode("XTY");
|
||||
psd.setCode("xty-psd");
|
||||
psd.setType(ProjectDeviceType.PSD.name());
|
||||
psd.setCreator(accountVO.getId());
|
||||
@ -389,7 +386,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// 删除旧配置
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(Project.GZB.name())
|
||||
.andProjectCodeEqualTo("GZB")
|
||||
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
|
||||
.map(Enum::name).collect(Collectors.toList()));
|
||||
this.projectDeviceDAO.deleteByExample(example);
|
||||
@ -405,7 +402,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// 删除旧配置
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(Project.SDY.name())
|
||||
.andProjectCodeEqualTo("SDY")
|
||||
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
|
||||
.map(Enum::name).collect(Collectors.toList()));
|
||||
this.projectDeviceDAO.deleteByExample(example);
|
||||
@ -421,7 +418,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// 删除旧配置
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(Project.RICHOR_JOINT.name())
|
||||
.andProjectCodeEqualTo("RICHOR_JOINT")
|
||||
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
|
||||
.map(Enum::name).collect(Collectors.toList()));
|
||||
this.projectDeviceDAO.deleteByExample(example);
|
||||
@ -437,7 +434,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// 删除旧配置
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(Project.SR_SANDBOX.name())
|
||||
.andProjectCodeEqualTo("SR_SANDBOX")
|
||||
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
|
||||
.map(Enum::name).collect(Collectors.toList()));
|
||||
this.projectDeviceDAO.deleteByExample(example);
|
||||
@ -453,7 +450,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// 删除旧配置
|
||||
ProjectDeviceExample example = new ProjectDeviceExample();
|
||||
example.createCriteria()
|
||||
.andProjectCodeEqualTo(Project.RICHOR_HHCJ.name())
|
||||
.andProjectCodeEqualTo("RICHOR_HHCJ")
|
||||
.andTypeIn(ProjectDeviceType.PlcDeviceList().stream()
|
||||
.map(Enum::name).collect(Collectors.toList()));
|
||||
this.projectDeviceDAO.deleteByExample(example);
|
||||
@ -469,7 +466,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
List<ProjectDevice> list = new ArrayList<>();
|
||||
// PLC网关
|
||||
ProjectDevice plcGateway = new ProjectDevice();
|
||||
plcGateway.setProjectCode(Project.RICHOR_HHCJ.name());
|
||||
plcGateway.setProjectCode("RICHOR_HHCJ");
|
||||
plcGateway.setCode("hhcj-gateway");
|
||||
plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name());
|
||||
plcGateway.setCreator(accountVO.getId());
|
||||
@ -479,7 +476,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(plcGateway);
|
||||
// IBP盘
|
||||
ProjectDevice ibp = new ProjectDevice();
|
||||
ibp.setProjectCode(Project.RICHOR_HHCJ.name());
|
||||
ibp.setProjectCode("RICHOR_HHCJ");
|
||||
ibp.setCode("hhcj-ibp");
|
||||
ibp.setType(ProjectDeviceType.IBP.name());
|
||||
ibp.setCreator(accountVO.getId());
|
||||
@ -489,7 +486,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(ibp);
|
||||
// PSD
|
||||
ProjectDevice psd = new ProjectDevice();
|
||||
psd.setProjectCode(Project.RICHOR_HHCJ.name());
|
||||
psd.setProjectCode("RICHOR_HHCJ");
|
||||
psd.setCode("hhcj-psd");
|
||||
psd.setType(ProjectDeviceType.PSD.name());
|
||||
psd.setCreator(accountVO.getId());
|
||||
@ -506,7 +503,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
List<ProjectDevice> list = new ArrayList<>();
|
||||
//UDP下位机
|
||||
ProjectDevice udp = new ProjectDevice();
|
||||
udp.setProjectCode(Project.SR_SANDBOX.name());
|
||||
udp.setProjectCode("SR_SANDBOX");
|
||||
udp.setCode("sr-udp");
|
||||
udp.setType(ProjectDeviceType.UDP_LOW.name());
|
||||
udp.setCreator(accountVO.getId());
|
||||
@ -516,7 +513,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(udp);
|
||||
//UDP客户端
|
||||
ProjectDevice udpClient = new ProjectDevice();
|
||||
udpClient.setProjectCode(Project.SR_SANDBOX.name());
|
||||
udpClient.setProjectCode("SR_SANDBOX");
|
||||
udpClient.setCode("sr-udp-client");
|
||||
udpClient.setType(ProjectDeviceType.UDP_CLIENT.name());
|
||||
udpClient.setCreator(accountVO.getId());
|
||||
@ -531,7 +528,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
for (MapSignalNewVO mapSignalNewVO : graphDataNew.getSignalList()) {
|
||||
if (StringUtils.hasText(mapSignalNewVO.getSrCode())) {
|
||||
ProjectDevice signal = new ProjectDevice();
|
||||
signal.setProjectCode(Project.SR_SANDBOX.name());
|
||||
signal.setProjectCode("SR_SANDBOX");
|
||||
signal.setCode("sr-signal-" + mapSignalNewVO.getCode());
|
||||
signal.setType(ProjectDeviceType.SIGNAL.name());
|
||||
signal.setCreator(accountVO.getId());
|
||||
@ -545,7 +542,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
for (MapSwitchVO mapSwitchVO : graphDataNew.getSwitchList()) {
|
||||
if (StringUtils.hasText(mapSwitchVO.getSrCode())) {
|
||||
ProjectDevice aSwitch = new ProjectDevice();
|
||||
aSwitch.setProjectCode(Project.SR_SANDBOX.name());
|
||||
aSwitch.setProjectCode("SR_SANDBOX");
|
||||
aSwitch.setCode("sr-switch-" + mapSwitchVO.getCode());
|
||||
aSwitch.setType(ProjectDeviceType.SWITCH.name());
|
||||
aSwitch.setCreator(accountVO.getId());
|
||||
@ -559,7 +556,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
for (MapSectionNewVO mapSectionNewVO : graphDataNew.getSectionList()) {
|
||||
if (StringUtils.hasText(mapSectionNewVO.getSrCode())) {
|
||||
ProjectDevice section = new ProjectDevice();
|
||||
section.setProjectCode(Project.SR_SANDBOX.name());
|
||||
section.setProjectCode("SR_SANDBOX");
|
||||
section.setCode("sr-section-" + mapSectionNewVO.getCode());
|
||||
section.setType(ProjectDeviceType.SECTION.name());
|
||||
section.setCreator(accountVO.getId());
|
||||
@ -574,7 +571,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
List<MapTrainVO> trainList = graphDataNew.getTrainList();
|
||||
for (MapTrainVO mapTrainVO : trainList) {
|
||||
ProjectDevice train = new ProjectDevice();
|
||||
train.setProjectCode(Project.SR_SANDBOX.name());
|
||||
train.setProjectCode("SR_SANDBOX");
|
||||
train.setCode("sr-train-" + mapTrainVO.getGroupNumber());
|
||||
train.setType(ProjectDeviceType.TRAIN.name());
|
||||
train.setCreator(accountVO.getId());
|
||||
@ -646,7 +643,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
List<ProjectDevice> list = new ArrayList<>();
|
||||
// PLC网关
|
||||
ProjectDevice plcGateway = new ProjectDevice();
|
||||
plcGateway.setProjectCode(Project.RICHOR_JOINT.name());
|
||||
plcGateway.setProjectCode("RICHOR_JOINT");
|
||||
plcGateway.setCode("zjd-gateway");
|
||||
plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name());
|
||||
plcGateway.setCreator(accountVO.getId());
|
||||
@ -656,7 +653,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(plcGateway);
|
||||
// 屏蔽门
|
||||
ProjectDevice psd = new ProjectDevice();
|
||||
psd.setProjectCode(Project.RICHOR_JOINT.name());
|
||||
psd.setProjectCode("RICHOR_JOINT");
|
||||
psd.setCode("zjd-psd");
|
||||
psd.setType(ProjectDeviceType.PSD.name());
|
||||
psd.setCreator(accountVO.getId());
|
||||
@ -666,7 +663,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(psd);
|
||||
// IBP盘
|
||||
ProjectDevice ibp = new ProjectDevice();
|
||||
ibp.setProjectCode(Project.RICHOR_JOINT.name());
|
||||
ibp.setProjectCode("RICHOR_JOINT");
|
||||
ibp.setCode("zjd-ibp");
|
||||
ibp.setType(ProjectDeviceType.IBP.name());
|
||||
ibp.setCreator(accountVO.getId());
|
||||
@ -676,7 +673,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(ibp);
|
||||
// PSL
|
||||
ProjectDevice psl = new ProjectDevice();
|
||||
psl.setProjectCode(Project.RICHOR_JOINT.name());
|
||||
psl.setProjectCode("RICHOR_JOINT");
|
||||
psl.setCode("zjd-psl");
|
||||
psl.setType(ProjectDeviceType.PSL.name());
|
||||
psl.setCreator(accountVO.getId());
|
||||
@ -694,7 +691,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
// list.add(buildIm(Project.SDY, userVO.getId()));
|
||||
// PLC网关
|
||||
ProjectDevice plcGateway = new ProjectDevice();
|
||||
plcGateway.setProjectCode(Project.SDY.name());
|
||||
plcGateway.setProjectCode("SDY");
|
||||
plcGateway.setCode("sdy-gateway");
|
||||
plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name());
|
||||
plcGateway.setCreator(accountVO.getId());
|
||||
@ -704,7 +701,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(plcGateway);
|
||||
// 屏蔽门
|
||||
ProjectDevice psd = new ProjectDevice();
|
||||
psd.setProjectCode(Project.SDY.name());
|
||||
psd.setProjectCode("SDY");
|
||||
psd.setCode("sdy-psd");
|
||||
psd.setType(ProjectDeviceType.PSD.name());
|
||||
psd.setCreator(accountVO.getId());
|
||||
@ -714,7 +711,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(psd);
|
||||
// PSL盘
|
||||
ProjectDevice psl = new ProjectDevice();
|
||||
psl.setProjectCode(Project.SDY.name());
|
||||
psl.setProjectCode("SDY");
|
||||
psl.setCode("sdy-psl");
|
||||
psl.setType(ProjectDeviceType.PSL.name());
|
||||
psl.setCreator(accountVO.getId());
|
||||
@ -740,7 +737,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
List<ProjectDevice> list = new ArrayList<>();
|
||||
// PLC网关
|
||||
ProjectDevice plcGateway = new ProjectDevice();
|
||||
plcGateway.setProjectCode(Project.GZB.name());
|
||||
plcGateway.setProjectCode("GZB");
|
||||
plcGateway.setCode("gzb-gateway");
|
||||
plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name());
|
||||
plcGateway.setCreator(accountVO.getId());
|
||||
@ -750,7 +747,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(plcGateway);
|
||||
// 道岔
|
||||
ProjectDevice switchA = new ProjectDevice();
|
||||
switchA.setProjectCode(Project.GZB.name());
|
||||
switchA.setProjectCode("GZB");
|
||||
switchA.setCode("gzb-switch");
|
||||
switchA.setType(ProjectDeviceType.SWITCH.name());
|
||||
switchA.setCreator(accountVO.getId());
|
||||
@ -760,7 +757,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
list.add(switchA);
|
||||
// 信号机
|
||||
ProjectDevice signal = new ProjectDevice();
|
||||
signal.setProjectCode(Project.GZB.name());
|
||||
signal.setProjectCode("GZB");
|
||||
signal.setCode("gzb-signal");
|
||||
signal.setType(ProjectDeviceType.SIGNAL.name());
|
||||
signal.setCreator(accountVO.getId());
|
||||
|
@ -1,6 +1,7 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
|
||||
@ -17,56 +18,76 @@ public interface ProjectService {
|
||||
*/
|
||||
PageVO<Project> pagingQuery(PageQueryVO queryVO);
|
||||
|
||||
/**
|
||||
* 前端设置信息分页
|
||||
*/
|
||||
PageVO<ProjectView> projectViewPagingQuery(PageQueryVO queryVO);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
List<Project> getAllProject();
|
||||
|
||||
/**
|
||||
* 前端通过项目编码(前端)请求项目信息
|
||||
* 获取所有的前端配置
|
||||
*/
|
||||
Project queryProjectByMarkKey(String project);
|
||||
|
||||
/**
|
||||
* 前端通过项目编码(前端)请求项目信息
|
||||
*/
|
||||
Project queryLoginProjectByMarkKey(String project);
|
||||
List<ProjectView> getAllProjectView();
|
||||
|
||||
/**
|
||||
* 前端通过项目编码(前端)请求项目信息
|
||||
*/
|
||||
Project queryLoginProjectByCode(String code);
|
||||
|
||||
/**
|
||||
* 前端通过项目编码(前端)请求项目信息
|
||||
*/
|
||||
ProjectView queryLoginProjectByMarkKey(String project);
|
||||
|
||||
/**
|
||||
* 项目Id请求项目信息
|
||||
*/
|
||||
Project queryProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 项目Code请求项目信息
|
||||
* 配置ID获取前端配置信息
|
||||
*/
|
||||
List<Project> queryProjectByCode(String code);
|
||||
ProjectView queryProjectViewById(Long id);
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*/
|
||||
void updateProject(Project project);
|
||||
|
||||
/**
|
||||
* 修改项目前端配置信息
|
||||
*/
|
||||
void updateProjectView(ProjectView projectView);
|
||||
|
||||
/**
|
||||
* 删除项目信息
|
||||
*/
|
||||
void deleteProject(Long id);
|
||||
|
||||
/**
|
||||
* 更新项目的前端设置信息
|
||||
* 删除项目前端配置信息
|
||||
*/
|
||||
Map<String, Object> getProjectViewSetting(String project);
|
||||
void deleteProjectView(Long id);
|
||||
|
||||
/**
|
||||
* 保存项目信息
|
||||
*/
|
||||
void save(Project project);
|
||||
|
||||
/**
|
||||
* 保存前端配置信息
|
||||
*/
|
||||
void saveProjectView(ProjectView projectView);
|
||||
|
||||
/**
|
||||
* 更新项目的前端设置信息
|
||||
*/
|
||||
Map<String, Object> getProjectViewSetting(String project);
|
||||
|
||||
/**
|
||||
* 获取项目的简要信息,前端关联时使用
|
||||
*/
|
||||
|
@ -1,8 +1,11 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.dao.ProjectDAO;
|
||||
import club.joylink.rtss.dao.project.ProjectDAO;
|
||||
import club.joylink.rtss.dao.project.ProjectViewDAO;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectExample;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.entity.project.ProjectViewExample;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
@ -24,73 +27,64 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class ProjectServiceImpl implements ProjectService {
|
||||
|
||||
/**
|
||||
* 有效信息标识
|
||||
*/
|
||||
private final static Integer EFFECT_PROJECT_STATUS = 1;
|
||||
|
||||
/**
|
||||
* 默认项目的markKey
|
||||
*/
|
||||
private final static String DEFAULT_PROJECT_MARK_KEY = "login";
|
||||
|
||||
/**
|
||||
* 默认项目的Code
|
||||
*/
|
||||
private final static String DEFAULT_PROJECT_CODE = "DEFAULT";
|
||||
|
||||
@Autowired
|
||||
private ProjectDAO projectDAO;
|
||||
|
||||
@Autowired
|
||||
private ProjectViewDAO projectViewDAO;
|
||||
|
||||
@Override
|
||||
public PageVO<Project> pagingQuery(PageQueryVO queryVO) {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS);
|
||||
projectExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS);
|
||||
Page<Project> page = (Page<Project>) projectDAO.selectByExample(projectExample);
|
||||
return PageVO.convert(page, page.getResult());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageVO<ProjectView> projectViewPagingQuery(PageQueryVO queryVO) {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
ProjectViewExample projectViewExample = new ProjectViewExample();
|
||||
projectViewExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS);
|
||||
Page<ProjectView> page = (Page<ProjectView>) projectViewDAO.selectByExample(projectViewExample);
|
||||
return PageVO.convert(page, page.getResult());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Project> getAllProject() {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS);
|
||||
projectExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS);
|
||||
return projectDAO.selectByExample(projectExample);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project queryProjectByMarkKey(String project) {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andMarkKeyEqualTo(project);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) {
|
||||
return null;
|
||||
}
|
||||
return projectList.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project queryLoginProjectByMarkKey(String project) {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
String markKey = StringUtils.isEmpty(project) ? DEFAULT_PROJECT_MARK_KEY : project;
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andMarkKeyEqualTo(markKey);
|
||||
List<Project> projectList = projectDAO.selectByExample(projectExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 未找到项目则获取默认信息
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andMarkKeyEqualTo(DEFAULT_PROJECT_MARK_KEY);
|
||||
projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
}
|
||||
return projectList.get(0);
|
||||
public List<ProjectView> getAllProjectView() {
|
||||
ProjectViewExample projectViewExample = new ProjectViewExample();
|
||||
projectViewExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS);
|
||||
return projectViewDAO.selectByExample(projectViewExample);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project queryLoginProjectByCode(String code) {
|
||||
String codeKey = Project.isDefault(code) ? Project.DEFAULT_PROJECT_CODE : code;
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
String codeKey = StringUtils.isEmpty(code) ? DEFAULT_PROJECT_CODE : code;
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andCodeEqualTo(codeKey);
|
||||
List<Project> projectList = projectDAO.selectByExample(projectExample);
|
||||
projectExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andCodeEqualTo(codeKey);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 未找到项目则获取默认信息
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andCodeEqualTo(DEFAULT_PROJECT_CODE);
|
||||
projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
return projectList.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectView queryLoginProjectByMarkKey(String project) {
|
||||
String markKey = StringUtils.isEmpty(project) ? Project.DEFAULT_PROJECT_MARK_KEY : project;
|
||||
ProjectViewExample projectViewExample = new ProjectViewExample();
|
||||
projectViewExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andMarkKeyEqualTo(markKey);
|
||||
List<ProjectView> projectList = projectViewDAO.selectWithBLOBsByExample(projectViewExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 未找到项目则获取默认信息
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
return projectList.get(0);
|
||||
}
|
||||
@ -98,26 +92,30 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
@Override
|
||||
public Project queryProjectById(Long id) {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andIdEqualTo(id);
|
||||
projectExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andIdEqualTo(id);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) {
|
||||
return null;
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
return projectList.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Project> queryProjectByCode(String code) {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andCodeEqualTo(code);
|
||||
return projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
public ProjectView queryProjectViewById(Long id) {
|
||||
ProjectViewExample projectViewExample = new ProjectViewExample();
|
||||
projectViewExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andIdEqualTo(id);
|
||||
List<ProjectView> projectList = projectViewDAO.selectWithBLOBsByExample(projectViewExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 未找到项目则获取默认信息
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
return projectList.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateProject(Project project) {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andIdEqualTo(project.getId());
|
||||
projectExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andIdEqualTo(project.getId());
|
||||
List<Project> projectList = projectDAO.selectByExample(projectExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
@ -126,21 +124,27 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
projectDAO.updateByPrimaryKeySelective(project);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateProjectView(ProjectView projectView) {
|
||||
ProjectViewExample projectViewExample = new ProjectViewExample();
|
||||
projectViewExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andIdEqualTo(projectView.getId());
|
||||
List<ProjectView> projectList = projectViewDAO.selectWithBLOBsByExample(projectViewExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 未找到项目则获取默认信息
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
projectView.setUpdateTime(LocalDateTime.now());
|
||||
projectViewDAO.updateByPrimaryKeySelective(projectView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProject(Long id) {
|
||||
projectDAO.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectViewSetting(String project) {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andMarkKeyEqualTo(project);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) {
|
||||
return null;
|
||||
}
|
||||
Project projectInfo = projectList.get(0);
|
||||
return JsonUtils.read(projectInfo.getViewSetting(), Map.class);
|
||||
public void deleteProjectView(Long id) {
|
||||
projectViewDAO.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -151,10 +155,32 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
projectDAO.insert(project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveProjectView(ProjectView projectView) {
|
||||
projectView.setCreateTime(LocalDateTime.now());
|
||||
projectView.setUpdateTime(LocalDateTime.now());
|
||||
projectView.setStatus(1);
|
||||
projectViewDAO.insert(projectView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectViewSetting(String project) {
|
||||
String markKey = Project.isDefault(project) ? Project.DEFAULT_PROJECT_MARK_KEY : project;
|
||||
ProjectViewExample projectViewExample = new ProjectViewExample();
|
||||
projectViewExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andMarkKeyEqualTo(markKey);
|
||||
List<ProjectView> projectList = projectViewDAO.selectWithBLOBsByExample(projectViewExample);
|
||||
if (CollectionUtils.isEmpty(projectList)) { // 未找到项目则获取默认信息
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
ProjectView projectInfo = projectList.get(0);
|
||||
return JsonUtils.read(projectInfo.getViewSetting(), Map.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Project.SimpleProject> getSimpleProjectList() {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andViewShowEqualTo(1);
|
||||
projectExample.createCriteria().andStatusEqualTo(Project.EFFECT_PROJECT_STATUS).andViewShowEqualTo(1);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
return projectList.stream().map(Project::generateSimpleProject).collect(Collectors.toList());
|
||||
}
|
||||
|
@ -1,13 +1,12 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.project.ProjectServerQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectServerVO;
|
||||
|
||||
public interface ServerService {
|
||||
ProjectServerVO getByProject(Project project);
|
||||
ProjectServerVO getByProject(String project);
|
||||
|
||||
PageVO<ProjectServerVO> pagingQuery(ProjectServerQueryVO queryVO);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.dao.ProjectServerDAO;
|
||||
import club.joylink.rtss.entity.ProjectServer;
|
||||
import club.joylink.rtss.entity.ProjectServerExample;
|
||||
@ -28,10 +27,9 @@ public class ServerServiceImpl implements ServerService {
|
||||
private ProjectServerDAO projectServerDAO;
|
||||
|
||||
@Override
|
||||
public ProjectServerVO getByProject(@NonNull Project project) {
|
||||
public ProjectServerVO getByProject(@NonNull String project) {
|
||||
ProjectServerExample example = new ProjectServerExample();
|
||||
example.createCriteria()
|
||||
.andProjectEqualTo(project.name());
|
||||
example.createCriteria().andProjectEqualTo(project);
|
||||
List<ProjectServer> projectServerList = this.projectServerDAO.selectByExample(example);
|
||||
// if (CollectionUtils.isEmpty(projectServerList)) {
|
||||
// example.clear();
|
||||
@ -48,8 +46,7 @@ public class ServerServiceImpl implements ServerService {
|
||||
public PageVO<ProjectServerVO> pagingQuery(ProjectServerQueryVO queryVO) {
|
||||
ProjectServerExample example = new ProjectServerExample();
|
||||
if (queryVO.getProject() != null) {
|
||||
example.createCriteria()
|
||||
.andProjectEqualTo(queryVO.getProject().name());
|
||||
example.createCriteria().andProjectEqualTo(queryVO.getProject());
|
||||
}
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
Page<ProjectServer> projectServerList = (Page<ProjectServer>) this.projectServerDAO.selectByExample(example);
|
||||
@ -69,10 +66,9 @@ public class ServerServiceImpl implements ServerService {
|
||||
return db.getId().toString();
|
||||
}
|
||||
|
||||
private boolean isProjectDataExist(Project project) {
|
||||
private boolean isProjectDataExist(String project) {
|
||||
ProjectServerExample example = new ProjectServerExample();
|
||||
example.createCriteria()
|
||||
.andProjectEqualTo(project.name());
|
||||
example.createCriteria().andProjectEqualTo(project);
|
||||
return this.projectServerDAO.countByExample(example) > 0;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package club.joylink.rtss.services.simulation;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
|
||||
/**
|
||||
@ -10,6 +9,7 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
public interface ProjectSimulationService {
|
||||
/**
|
||||
* 项目创建中心行调仿真
|
||||
*
|
||||
* @param loginUserInfo
|
||||
* @param project
|
||||
* @return
|
||||
|
@ -1,7 +1,7 @@
|
||||
package club.joylink.rtss.services.simulation;
|
||||
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.IMapService;
|
||||
import club.joylink.rtss.services.IUserPermissionService;
|
||||
@ -47,12 +47,11 @@ public class ProjectSimulationServiceImpl implements ProjectSimulationService {
|
||||
|
||||
// 查询项目地图,默认取第一个(暂时这样处理,后面考虑配置实训室-地图对应?)
|
||||
List<MapVO> mapList = this.iMapService.findOnlineMapByProjectCode(project.name());
|
||||
BusinessExceptionAssertEnum.INVALID_OPERATION.assertCollectionNotEmpty(mapList,
|
||||
String.format("项目[%s]无地图", project));
|
||||
BusinessExceptionAssertEnum.INVALID_OPERATION.assertCollectionNotEmpty(mapList, String.format("项目[%s]无地图", project.name()));
|
||||
Long mapId = mapList.get(0).getId();
|
||||
|
||||
// 权限判断
|
||||
if (Project.BJD.equals(project)) {
|
||||
// 权限判断 : Project.BJD.equals(project)
|
||||
if (project.isPermissionVail()) {
|
||||
List<UserPermissionVO> userPermissionList = this.iUserPermissionService
|
||||
.getSimulationUserPermission(accountVO, mapId, MapPrdTypeEnum.CENTER.getCode());
|
||||
BusinessExceptionAssertEnum.SIMULATION_PERMISSION_NOT_EXIST
|
||||
@ -66,12 +65,12 @@ public class ProjectSimulationServiceImpl implements ProjectSimulationService {
|
||||
BusinessExceptionAssertEnum.SIMULATION_PERMISSION_NOT_AVAILABLE
|
||||
.assertNotTrue(CollectionUtils.isEmpty(collect), "用户仿真权限当前时间不可用");
|
||||
}
|
||||
if (Project.WJLS.equals(project)) {
|
||||
// Project.WJLS.equals(project)
|
||||
if (project.isCreateLocalSimulation()) {
|
||||
return rtSimulationService.create(loginUserInfo.getAccountVO(), mapId, MapPrdTypeEnum.LOCAL).getId();
|
||||
}
|
||||
// 构建仿真
|
||||
Simulation simulation = this.groupSimulationService.create(loginUserInfo, mapId,
|
||||
MapPrdTypeEnum.CENTER, Simulation.FunctionalType.SIMULATION);
|
||||
Simulation simulation = this.groupSimulationService.create(loginUserInfo, mapId, MapPrdTypeEnum.CENTER, Simulation.FunctionalType.SIMULATION);
|
||||
RunAsPlanParam param = new RunAsPlanParam(LocalTime.now(), null);
|
||||
this.groupSimulationService.runAsPlan(simulation.getId(), param);
|
||||
return simulation.getId();
|
||||
|
@ -13,6 +13,7 @@ import club.joylink.rtss.websocket.StompMessageService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
@ -33,7 +34,7 @@ public class DisCmdSendService {
|
||||
*/
|
||||
public void autoSendUnread(Simulation simulation, String userId) {
|
||||
SimulationMember member = simulation.querySimulationMemberByUserId(userId);
|
||||
if (null == member) return;
|
||||
if (null == member || member.getDevice() == null) return;
|
||||
DisCmdDb db = commonService.getCmdDb(simulation);
|
||||
try {
|
||||
db.lock();
|
||||
@ -168,7 +169,7 @@ public class DisCmdSendService {
|
||||
//机车号
|
||||
String trainCode = to.getCode();
|
||||
List<VirtualRealityTrain> trains = simulation.getRepository().getOnlineTrainList().stream().filter(tr -> {
|
||||
return tr.getTripNumber().equals(trainNum)&&tr.getGroupNumber().equals(trainCode);
|
||||
return tr.getTripNumber().equals(trainNum) && tr.getGroupNumber().equals(trainCode);
|
||||
}).collect(Collectors.toList());
|
||||
if (null != trains && !trains.isEmpty()) {
|
||||
VirtualRealityTrain train = trains.get(0);
|
||||
|
@ -3,12 +3,13 @@ package club.joylink.rtss.simulation.cbtc;
|
||||
import club.joylink.rtss.configuration.configProp.OtherConfig;
|
||||
import club.joylink.rtss.configuration.configProp.WeChatConfig;
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.*;
|
||||
import club.joylink.rtss.services.org.IOrgService;
|
||||
import club.joylink.rtss.services.org.IOrgUserService;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.services.runplan.IRunPlanParktimeService;
|
||||
import club.joylink.rtss.services.runplan.IRunPlanRunlevelService;
|
||||
import club.joylink.rtss.services.script.IScriptService;
|
||||
@ -151,6 +152,8 @@ public class GroupSimulationServiceImpl implements GroupSimulationService {
|
||||
private QRCodeManager qrCodeManager;
|
||||
@Autowired
|
||||
private ConversationManagerService conversationManagerService;
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
// /**
|
||||
// * 创建仿真并进行缓存
|
||||
// *
|
||||
@ -1061,8 +1064,8 @@ public class GroupSimulationServiceImpl implements GroupSimulationService {
|
||||
@Override
|
||||
public boolean hasPermission(AccountVO accountVO, Long mapId, String prdType) {
|
||||
MapVO mapDetail = iMapService.getMapDetail(mapId);
|
||||
if (Project.CGY.name().equals(mapDetail.getProjectCode()) ||
|
||||
Project.ZZWW.name().equals(mapDetail.getProjectCode())) { //成都工业,郑州共赢所有资源免费
|
||||
Project project = projectService.queryLoginProjectByCode(mapDetail.getProjectCode());
|
||||
if (project.isFreeSource()) { //成都工业,郑州共赢所有资源免费
|
||||
return true;
|
||||
}
|
||||
List<UserPermissionVO> ups = iUserPermissionService.getSimulationUserPermission(accountVO, mapId, prdType);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.simulation.cbtc;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
|
||||
/**
|
||||
@ -9,6 +8,7 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
public interface ProjectJointSimulationService {
|
||||
/**
|
||||
* 实训室教员机登录创建仿真
|
||||
*
|
||||
* @param loginUserInfo
|
||||
* @return
|
||||
*/
|
||||
@ -16,10 +16,11 @@ public interface ProjectJointSimulationService {
|
||||
|
||||
/**
|
||||
* 获取实训室仿真
|
||||
*
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
Simulation getProjectSimulation(Project project);
|
||||
Simulation getProjectSimulation(String project);
|
||||
|
||||
void handleWorkStationLogin(LoginUserInfoVO loginUserInfo);
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package club.joylink.rtss.simulation.cbtc;
|
||||
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.IMapService;
|
||||
@ -50,7 +49,7 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class ProjectJointSimulationServiceImpl implements ProjectJointSimulationService {
|
||||
|
||||
private static final Map<Project, Simulation> projectSimulationMap = new ConcurrentHashMap<>();
|
||||
private static final Map<String, Simulation> projectSimulationMap = new ConcurrentHashMap<>();
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
@ -75,7 +74,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
|
||||
@Override
|
||||
public Simulation createSimulation(LoginUserInfoVO loginUserInfo) {
|
||||
Project project = loginUserInfo.getProject();
|
||||
String project = loginUserInfo.getProject();
|
||||
Simulation oldSimulation = projectSimulationMap.get(project);
|
||||
// 之前的仿真销毁
|
||||
if (Objects.nonNull(oldSimulation)) {
|
||||
@ -87,7 +86,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
// 查询用户综合演练配置
|
||||
|
||||
// 查询项目地图,默认取第一个(暂时这样处理,后面考虑配置实训室-地图对应?)
|
||||
List<MapVO> mapList = this.iMapService.findOnlineMapByProjectCode(project.name());
|
||||
List<MapVO> mapList = this.iMapService.findOnlineMapByProjectCode(project);
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertCollectionNotEmpty(mapList,
|
||||
String.format("项目[%s]无地图", project));
|
||||
// 查询项目设备
|
||||
@ -132,7 +131,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
|
||||
private String queryDeviceCodeFromConfig(RealDeviceConfig config) {
|
||||
switch (config.getProject()) {
|
||||
case HEB:{
|
||||
case "HEB": {
|
||||
switch (config.getDeviceType()) {
|
||||
case IBP:
|
||||
return ((Heb1IbpConfig) config).getConfig().getStationCode();
|
||||
@ -143,14 +142,14 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XTY:{
|
||||
case "XTY": {
|
||||
switch (config.getDeviceType()) {
|
||||
case PSD:
|
||||
return ((XtyPsdConfig) config).getConfig().getPsdCode();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RICHOR_JOINT: {
|
||||
case "RICHOR_JOINT": {
|
||||
switch (config.getDeviceType()) {
|
||||
case IBP:
|
||||
return ((ZjdIbpConfig) config).getConfigVO().getIbpCode();
|
||||
@ -159,7 +158,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SR_SANDBOX: {
|
||||
case "SR_SANDBOX": {
|
||||
switch (config.getDeviceType()) {
|
||||
case SIGNAL:
|
||||
return ((SrSignalConfig) config).getConfigVO().getVrCode();
|
||||
@ -172,7 +171,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RICHOR_HHCJ: {
|
||||
case "RICHOR_HHCJ": {
|
||||
switch (config.getDeviceType()) {
|
||||
case IBP:
|
||||
return ((HhcjIbpConfig) config).getConfigVO().getIbpCode();
|
||||
@ -185,13 +184,13 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
return null;
|
||||
}
|
||||
|
||||
private Simulation queryProjectSimulation(Project project) {
|
||||
private Simulation queryProjectSimulation(String project) {
|
||||
Simulation simulation = projectSimulationMap.get(project);
|
||||
return simulation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Simulation getProjectSimulation(Project project) {
|
||||
public Simulation getProjectSimulation(String project) {
|
||||
Simulation simulation = projectSimulationMap.get(project);
|
||||
BusinessExceptionAssertEnum.TRAINING_ROOM_SIMULATION_NOT_EXIST
|
||||
.assertNotNull(simulation, String.format("项目[%s]实训室仿真不存在", project));
|
||||
@ -207,7 +206,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
SimulationUserEnterEvent userEnterEvent = new SimulationUserEnterEvent(this, simulation, simulationUser);
|
||||
this.applicationContext.publishEvent(userEnterEvent);
|
||||
switch (deviceVO.getType()) {
|
||||
case LW:{
|
||||
case LW: {
|
||||
// 暂时默认先按配置的车站创建成员
|
||||
LwConfigVO lwConfigVO = deviceVO.buildLwConfig();
|
||||
Station station = simulation.getRepository().getByCode(lwConfigVO.getStationCode(), Station.class);
|
||||
@ -216,7 +215,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
// 现地工作站
|
||||
break;
|
||||
}
|
||||
case CW:{
|
||||
case CW: {
|
||||
// 行调工作站
|
||||
List<SimulationMember> dispatcherList = simulation.querySimulationMembersOfRole(SimulationMember.Type.DISPATCHER);
|
||||
SimulationMember dispatcher = null;
|
||||
@ -233,7 +232,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
this.memberManager.playRole(simulation, loginUserInfo.getAccountVO().getId(), dispatcher.getId());
|
||||
break;
|
||||
}
|
||||
case DEPOT:{
|
||||
case DEPOT: {
|
||||
List<SimulationMember> depoterList = simulation.querySimulationMembersOfRole(SimulationMember.Type.DEPOT_DISPATCHER);
|
||||
SimulationMember depoter = null;
|
||||
for (SimulationMember member : depoterList) {
|
||||
@ -248,7 +247,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
this.memberManager.playRole(simulation, loginUserInfo.getAccountVO().getId(), depoter.getId());
|
||||
break;
|
||||
}
|
||||
case SCHEDULING:{
|
||||
case SCHEDULING: {
|
||||
|
||||
}
|
||||
}
|
||||
@ -273,7 +272,7 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation
|
||||
case DEPOT:
|
||||
case DRIVE:
|
||||
case CW:
|
||||
case LW:{
|
||||
case LW: {
|
||||
ProjectDeviceLogoutEvent lwLogoutEvent = new ProjectDeviceLogoutEvent(this, deviceVO);
|
||||
this.applicationContext.publishEvent(lwLogoutEvent);
|
||||
SimulationUser simulationUser = simulation.querySimulationUserById(loginUserInfoVO.getAccountVO().getId());
|
||||
|
@ -1,8 +1,8 @@
|
||||
package club.joylink.rtss.simulation.cbtc;
|
||||
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.data.SimulationLog;
|
||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcRepository;
|
||||
@ -66,7 +66,9 @@ public class Simulation extends club.joylink.rtss.simulation.Simulation<Simulati
|
||||
/**
|
||||
* 所属项目
|
||||
*/
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
private Project projectInfo;
|
||||
|
||||
/**
|
||||
* 数据仓库
|
||||
@ -255,7 +257,7 @@ public class Simulation extends club.joylink.rtss.simulation.Simulation<Simulati
|
||||
return list;
|
||||
}
|
||||
|
||||
public boolean isSame(Project project) {
|
||||
public boolean isSame(String project) {
|
||||
return Objects.equals(this.project, project);
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ public class SimulationBuilder {
|
||||
if (Objects.nonNull(buildParams.getLoginUserInfo())) {
|
||||
simulation.setCreatorId(buildParams.getLoginUserInfo().getAccountVO().getIdStr());
|
||||
simulation.setProject(buildParams.getLoginUserInfo().getProject());
|
||||
simulation.setProjectInfo(buildParams.getLoginUserInfo().getProjectInfo());
|
||||
}
|
||||
// 线路配置参数
|
||||
simulation.getRepository().setConfig(buildConfig(buildParams.getMap().getConfigVO(),
|
||||
@ -361,15 +362,15 @@ public class SimulationBuilder {
|
||||
String stationCode = station.getCode();
|
||||
CtcEffectRepository.StationTrackSectionRepository rep = stationTrackRepositoryMap.get(stationCode);
|
||||
CtcEffectRepository.StationDoorRepository doorRep = doorRepository.get(stationCode);
|
||||
if(rep == null){
|
||||
if (rep == null) {
|
||||
rep = new CtcEffectRepository.StationTrackSectionRepository();
|
||||
rep.incrementVersionOne();
|
||||
stationTrackRepositoryMap.put(stationCode,rep);
|
||||
stationTrackRepositoryMap.put(stationCode, rep);
|
||||
}
|
||||
if(doorRep == null){
|
||||
if (doorRep == null) {
|
||||
doorRep = new CtcEffectRepository.StationDoorRepository();
|
||||
doorRep.incrementVersionOne();
|
||||
doorRepository.put(stationCode,doorRep);
|
||||
doorRepository.put(stationCode, doorRep);
|
||||
}
|
||||
for (StationDirection sd : station.getStationDirectionMap().values()) {
|
||||
doorRep.save(sd.clone());
|
||||
@ -380,53 +381,52 @@ public class SimulationBuilder {
|
||||
}
|
||||
}
|
||||
//复制编辑区的股道数据到生效,编辑区
|
||||
copyEditToTargetForStationTrack(stationTrackRepositoryMap,effectStationTrackMap);
|
||||
copyEditToTargetForStationTrack(stationTrackRepositoryMap,updateStationTrackMap);
|
||||
copyEditToTargetForStationTrack(stationTrackRepositoryMap, effectStationTrackMap);
|
||||
copyEditToTargetForStationTrack(stationTrackRepositoryMap, updateStationTrackMap);
|
||||
//复制编辑区的出入口数据到生效,编辑区
|
||||
copyEditToTargetForDoor(doorRepository,effectDoorMap);
|
||||
copyEditToTargetForDoor(doorRepository,updateDoorMap);
|
||||
copyEditToTargetForDoor(doorRepository, effectDoorMap);
|
||||
copyEditToTargetForDoor(doorRepository, updateDoorMap);
|
||||
}
|
||||
|
||||
private static void copyEditToTargetForStationTrack(Map<String, ? extends CtcEffectRepository.StationTrackSectionRepository> source, Map<String, CtcEffectRepository.StationTrackSectionRepository> target){
|
||||
private static void copyEditToTargetForStationTrack(Map<String, ? extends CtcEffectRepository.StationTrackSectionRepository> source, Map<String, CtcEffectRepository.StationTrackSectionRepository> target) {
|
||||
for (Map.Entry<String, ? extends CtcEffectRepository.StationTrackSectionRepository> entry : source.entrySet()) {
|
||||
String stationCode = entry.getKey();
|
||||
CtcEffectRepository.StationTrackSectionRepository val = entry.getValue();
|
||||
CtcEffectRepository.StationTrackSectionRepository targetRepository = target.get(stationCode);
|
||||
if(Objects.isNull(targetRepository)){
|
||||
if (Objects.isNull(targetRepository)) {
|
||||
targetRepository = new CtcEffectRepository.StationTrackSectionRepository();
|
||||
targetRepository.resetVersion(val.version());
|
||||
target.put(stationCode,targetRepository);
|
||||
target.put(stationCode, targetRepository);
|
||||
}
|
||||
for (Map.Entry<String, TrackSection> valEntry : val.getDataMap().entrySet()) {
|
||||
String code = valEntry.getKey();
|
||||
TrackSection vals = valEntry.getValue();
|
||||
targetRepository.getDataMap().put(code,vals);
|
||||
targetRepository.getDataMap().put(code, vals);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private static void copyEditToTargetForDoor(Map<String, ? extends CtcEffectRepository.StationDoorRepository> source, Map<String, CtcEffectRepository.StationDoorRepository> target){
|
||||
|
||||
private static void copyEditToTargetForDoor(Map<String, ? extends CtcEffectRepository.StationDoorRepository> source, Map<String, CtcEffectRepository.StationDoorRepository> target) {
|
||||
for (Map.Entry<String, ? extends CtcEffectRepository.StationDoorRepository> entry : source.entrySet()) {
|
||||
String stationCode = entry.getKey();
|
||||
CtcEffectRepository.StationDoorRepository val = entry.getValue();
|
||||
CtcEffectRepository.StationDoorRepository targetRepository = target.get(stationCode);
|
||||
if(Objects.isNull(targetRepository)){
|
||||
if (Objects.isNull(targetRepository)) {
|
||||
targetRepository = new CtcEffectRepository.StationDoorRepository();
|
||||
targetRepository.resetVersion(val.version());
|
||||
target.put(stationCode,targetRepository);
|
||||
target.put(stationCode, targetRepository);
|
||||
}
|
||||
for (Map.Entry<String, StationDirection> valEntry : val.getDataMap().entrySet()) {
|
||||
String code = valEntry.getKey();
|
||||
StationDirection vals = valEntry.getValue();
|
||||
targetRepository.getDataMap().put(code,vals);
|
||||
targetRepository.getDataMap().put(code, vals);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static List<String> checkRunPlanAndBuildLostRoutePaths(Map<String, List<TripPlan>> serverTripMap,
|
||||
Map<String, List<RoutePath>> routePathMap) {
|
||||
Map<String, String> errMsgMap = new HashMap<>();
|
||||
|
@ -40,7 +40,7 @@ public class PlcGatewayConnectManager {
|
||||
}
|
||||
|
||||
public Channel getChannel(PlcGateway plcGateway) {
|
||||
return gatewayChannelMap.get(plcGateway.getProjectDevice().getProject().name());
|
||||
return gatewayChannelMap.get(plcGateway.getProjectDevice().getProject());
|
||||
}
|
||||
|
||||
public Channel getChannel(String code) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package club.joylink.rtss.simulation.cbtc.device.real.modbustcp;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.simulation.cbtc.GroupSimulationCache;
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||
@ -42,6 +42,9 @@ public class SimulationRealDeviceThread {
|
||||
@Autowired
|
||||
private RealDeviceServiceManager realDeviceServiceManager;
|
||||
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
|
||||
@EventListener
|
||||
public void simulationReset(SimulationResetEvent event) {
|
||||
Simulation simulation = event.getSimulation();
|
||||
@ -67,7 +70,7 @@ public class SimulationRealDeviceThread {
|
||||
public void controlDevice(Simulation simulation) {
|
||||
List<RealDeviceConfig> realDeviceList = simulation.getRealDeviceList();
|
||||
if (!CollectionUtils.isEmpty(realDeviceList)) {
|
||||
if (Project.HEB.equals(realDeviceList.get(0).getProjectDevice().getProject())) {
|
||||
if (simulation.getProjectInfo().isControlDevice()) {
|
||||
Set<VirtualRealityScreenDoor> vrPsdSet = new HashSet<>();
|
||||
Set<VirtualRealitySwitch> vrSwitchSet = new HashSet<>();
|
||||
for (RealDeviceConfig realDevice : realDeviceList) {
|
||||
@ -89,6 +92,7 @@ public class SimulationRealDeviceThread {
|
||||
|
||||
/**
|
||||
* 获取真实设备数据
|
||||
*
|
||||
* @param simulation
|
||||
*/
|
||||
public void queryDeviceStatus(Simulation simulation) {
|
||||
@ -110,6 +114,7 @@ public class SimulationRealDeviceThread {
|
||||
|
||||
/**
|
||||
* 根据获取到的真实设备状态更新仿真设备状态
|
||||
*
|
||||
* @param simulation
|
||||
*/
|
||||
public void UpdateDeviceStatusByCollection(Simulation simulation) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
package club.joylink.rtss.simulation.cbtc.device.real.modbustcp.device;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
||||
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@ -37,7 +36,7 @@ public abstract class RealDeviceConfig {
|
||||
for (int i = 0; i < 8 - bs.length(); i++) {
|
||||
bsb.append(0);
|
||||
}
|
||||
} else if(bs.length() > 8) {
|
||||
} else if (bs.length() > 8) {
|
||||
bs = bs.substring(bs.length() - 8);
|
||||
}
|
||||
bsb.append(bs);
|
||||
@ -70,6 +69,7 @@ public abstract class RealDeviceConfig {
|
||||
|
||||
/**
|
||||
* 转换16进制字符串为10进制int
|
||||
*
|
||||
* @param hexStr
|
||||
* @return
|
||||
*/
|
||||
@ -79,6 +79,7 @@ public abstract class RealDeviceConfig {
|
||||
|
||||
/**
|
||||
* 转换16进制字符串为10进制int
|
||||
*
|
||||
* @param hexStr
|
||||
* @return
|
||||
*/
|
||||
@ -88,36 +89,37 @@ public abstract class RealDeviceConfig {
|
||||
|
||||
/**
|
||||
* 转换位索引为byte值
|
||||
*
|
||||
* @param index
|
||||
* @return
|
||||
*/
|
||||
public static byte convertBitIndex2Byte(int index) {
|
||||
switch (index) {
|
||||
case 0:{
|
||||
case 0: {
|
||||
return 0x01;
|
||||
}
|
||||
case 1:{
|
||||
case 1: {
|
||||
return 0x02;
|
||||
}
|
||||
case 2:{
|
||||
case 2: {
|
||||
return 0x04;
|
||||
}
|
||||
case 3:{
|
||||
case 3: {
|
||||
return 0x08;
|
||||
}
|
||||
case 4:{
|
||||
case 4: {
|
||||
return 0x10;
|
||||
}
|
||||
case 5:{
|
||||
case 5: {
|
||||
return 0x20;
|
||||
}
|
||||
case 6:{
|
||||
case 6: {
|
||||
return 0x40;
|
||||
}
|
||||
case 7:{
|
||||
case 7: {
|
||||
return (byte) 0x80;
|
||||
}
|
||||
default:{
|
||||
default: {
|
||||
throw new IllegalArgumentException("转换为byte的位索引只能是[0,7]");
|
||||
}
|
||||
}
|
||||
@ -125,6 +127,7 @@ public abstract class RealDeviceConfig {
|
||||
|
||||
/**
|
||||
* 获取指定位值
|
||||
*
|
||||
* @param buf
|
||||
* @param bitIndex 从左到右位的索引
|
||||
* @return
|
||||
@ -136,7 +139,7 @@ public abstract class RealDeviceConfig {
|
||||
return (val & (1 << nbIndex)) != 0;
|
||||
}
|
||||
|
||||
public Project getProject() {
|
||||
public String getProject() {
|
||||
return this.projectDevice.getProject();
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
package club.joylink.rtss.simulation.rt;
|
||||
|
||||
import club.joylink.rtss.constants.MapPrdTypeEnum;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.IDailyRunPlanService;
|
||||
import club.joylink.rtss.services.ILoadPlanService;
|
||||
import club.joylink.rtss.services.IRunPlanTemplateService;
|
||||
import club.joylink.rtss.services.MapService;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.simulation.SimulationManager;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||
import club.joylink.rtss.simulation.rt.ATS.AtsLogicService;
|
||||
@ -29,6 +30,7 @@ import club.joylink.rtss.vo.client.runplan.RunPlanVO;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
@ -59,6 +61,9 @@ public class RtSimulationService {
|
||||
@Autowired
|
||||
private SrTrainOperationHandler srTrainOperationHandler;
|
||||
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
|
||||
public RtSimulation create(AccountVO accountVO, Long mapId, MapPrdTypeEnum prdTypeEnum) {
|
||||
Objects.requireNonNull(mapId);
|
||||
MapVO mapVO = this.mapService.getMapDetail(mapId);
|
||||
@ -77,8 +82,8 @@ public class RtSimulationService {
|
||||
}
|
||||
rtSimulation.init();
|
||||
// 郑州共赢驾驶默认加载一辆列车
|
||||
if (Objects.equals(Project.ZZWW.name(), mapVO.getProjectCode()) &&
|
||||
Objects.equals(MapPrdTypeEnum.DRIVER, prdTypeEnum)) {
|
||||
Project project = projectService.queryLoginProjectByCode(mapVO.getProjectCode());
|
||||
if (project.getDefaultLoadTrain() > 0 && Objects.equals(MapPrdTypeEnum.DRIVER, prdTypeEnum)) {
|
||||
this.srTrainOperationHandler.loadTrain(rtSimulation, "001", true, "T21");
|
||||
}
|
||||
simulationManager.start(rtSimulation.getId());
|
||||
@ -117,17 +122,13 @@ public class RtSimulationService {
|
||||
private void initCreatorPlayMember(RtSimulation rtSimulation, MapVO mapVO) {
|
||||
// RtSimulationMember simulationMember = rtSimulation.querySimulationMemberById("2");
|
||||
// List<RtSimulationMember> memberList = rtSimulation.querySimulationMembersOfRole(RtSimulationMember.Role.LOWS);
|
||||
// 大铁微机联锁项目默认新绛站值班员
|
||||
if (Objects.equals(Project.WJLS.name(), mapVO.getProjectCode())) {
|
||||
this.simulationManager.memberPlayedByUser(rtSimulation.getId(), "2", rtSimulation.getCreator().getId());
|
||||
Project project = projectService.queryLoginProjectByCode(mapVO.getProjectCode());
|
||||
if (!StringUtils.isEmpty(project.getDefaultMemberId())) {
|
||||
// 大铁微机联锁项目默认新绛站值班员
|
||||
this.simulationManager.memberPlayedByUser(rtSimulation.getId(), project.getDefaultMemberId(), rtSimulation.getCreator().getId());
|
||||
} else {
|
||||
String memberId = "1";
|
||||
for (RtSimulationMember rtSimulationMember : rtSimulation.getSimulationMembers()) {
|
||||
if (Objects.equals("001", rtSimulationMember.deviceId)) {
|
||||
memberId = rtSimulationMember.getId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
String memberId = rtSimulation.getSimulationMembers().stream().filter(r -> Objects.equals("001", r.deviceId))
|
||||
.map(RtSimulationMember::getId).findFirst().orElse("1");
|
||||
this.simulationManager.memberPlayedByUser(rtSimulation.getId(), memberId, rtSimulation.getCreator().getId());
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package club.joylink.rtss.vo;
|
||||
|
||||
import club.joylink.rtss.constants.Client;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.SysAccountLogin;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.util.EncryptUtil;
|
||||
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
|
||||
import lombok.Getter;
|
||||
@ -26,7 +26,10 @@ public class LoginUserInfoVO {
|
||||
/**
|
||||
* 所属项目
|
||||
*/
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
//TODO 20220922 添加
|
||||
private Project projectInfo;
|
||||
|
||||
private ProjectDeviceVO deviceVO;
|
||||
|
||||
@ -45,7 +48,7 @@ public class LoginUserInfoVO {
|
||||
private LocalDateTime preLogoutTime;
|
||||
private LocalDateTime lastQueryTime; // 最后使用时间
|
||||
|
||||
public LoginUserInfoVO(AccountVO accountVO, Client client, Project project, ProjectDeviceVO deviceVO) {
|
||||
public LoginUserInfoVO(AccountVO accountVO, Client client, String project, ProjectDeviceVO deviceVO) {
|
||||
this.accountVO = accountVO;
|
||||
this.client = client;
|
||||
this.project = project;
|
||||
@ -56,6 +59,18 @@ public class LoginUserInfoVO {
|
||||
this.token = buildToken();
|
||||
}
|
||||
|
||||
public LoginUserInfoVO(AccountVO accountVO, Client client, Project projectInfo, ProjectDeviceVO deviceVO) {
|
||||
this.accountVO = accountVO;
|
||||
this.client = client;
|
||||
this.projectInfo = projectInfo;
|
||||
this.project = projectInfo.name();
|
||||
this.deviceVO = deviceVO;
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
this.loginTime = now;
|
||||
this.lastQueryTime = now;
|
||||
this.token = buildToken();
|
||||
}
|
||||
|
||||
public void updateLastQueryTime() {
|
||||
this.lastQueryTime = LocalDateTime.now();
|
||||
}
|
||||
@ -64,7 +79,7 @@ public class LoginUserInfoVO {
|
||||
AccountVO accountVO = new AccountVO();
|
||||
accountVO.setId(1l);
|
||||
accountVO.setNickname("stressTest");
|
||||
LoginUserInfoVO vo = new LoginUserInfoVO(accountVO, Client.Joylink, Project.DEFAULT, null);
|
||||
LoginUserInfoVO vo = new LoginUserInfoVO(accountVO, Client.Joylink, Project.DEFAULT_PROJECT_CODE, null);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@ -81,7 +96,7 @@ public class LoginUserInfoVO {
|
||||
SysAccountLogin accountLogin = new SysAccountLogin();
|
||||
accountLogin.setUserId(this.getAccountVO().getId());
|
||||
accountLogin.setClient(this.getClient().getName());
|
||||
accountLogin.setProject(this.getProject().name());
|
||||
accountLogin.setProject(this.getProject());
|
||||
if (Objects.nonNull(this.deviceVO)) {
|
||||
accountLogin.setDevice(String.format("%s-%s-%s",
|
||||
this.deviceVO.getProject(), this.deviceVO.getType(), this.deviceVO.getCode()));
|
||||
@ -117,7 +132,7 @@ public class LoginUserInfoVO {
|
||||
}
|
||||
|
||||
public boolean isDispatcherRaceTrainingLogin() {
|
||||
return Project.DRTS.equals(this.project);
|
||||
return "DRTS".equals(this.project);
|
||||
}
|
||||
|
||||
public boolean isWechatLogin() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package club.joylink.rtss.vo.client;
|
||||
|
||||
import club.joylink.rtss.constants.Client;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Builder;
|
||||
@ -23,8 +23,12 @@ public class LoginStatusVO {
|
||||
@JsonIgnore
|
||||
private Client client;
|
||||
|
||||
//TODO 20220922
|
||||
@JsonIgnore
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
@JsonIgnore
|
||||
private Project projectInfo;
|
||||
|
||||
private ProjectDeviceVO deviceVO;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.vo.client;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.client.validGroup.LoginInfoCheck;
|
||||
import club.joylink.rtss.vo.client.validGroup.ThirdLoginInfoCheck;
|
||||
import lombok.Getter;
|
||||
@ -12,37 +11,39 @@ import javax.validation.constraints.NotBlank;
|
||||
@Setter
|
||||
public class LoginUserVO {
|
||||
|
||||
@NotBlank(message = "账号不能为空", groups = {ThirdLoginInfoCheck.class})
|
||||
private String parentAccount;
|
||||
/**
|
||||
* 手机号/邮箱/账号account
|
||||
*/
|
||||
@NotBlank(message = "账号不能为空", groups = {LoginInfoCheck.class, ThirdLoginInfoCheck.class})
|
||||
private String account;
|
||||
@NotBlank(message = "账号不能为空", groups = {ThirdLoginInfoCheck.class})
|
||||
private String parentAccount;
|
||||
/**
|
||||
* 手机号/邮箱/账号account
|
||||
*/
|
||||
@NotBlank(message = "账号不能为空", groups = {LoginInfoCheck.class, ThirdLoginInfoCheck.class})
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空", groups = {LoginInfoCheck.class})
|
||||
private String password;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空", groups = {LoginInfoCheck.class})
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 登陆的客户端id
|
||||
*/
|
||||
@NotBlank(message = "客户端id不能为空", groups = {LoginInfoCheck.class, ThirdLoginInfoCheck.class})
|
||||
private String clientId;
|
||||
private String clientId;
|
||||
|
||||
@NotBlank(message = "客户端密钥不能为空", groups = {LoginInfoCheck.class, ThirdLoginInfoCheck.class})
|
||||
private String secret;
|
||||
/**
|
||||
* 所属项目
|
||||
*/
|
||||
private Project project;
|
||||
/**
|
||||
* 设备code
|
||||
*/
|
||||
/**
|
||||
* 所属项目
|
||||
*/
|
||||
private String project;
|
||||
/**
|
||||
* 设备code
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/** 教师登录(CGY) */
|
||||
/**
|
||||
* 教师登录(CGY)
|
||||
*/
|
||||
private boolean teacherLogin;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package club.joylink.rtss.vo.client.competition;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.RaceQuestionProgress;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -26,17 +26,21 @@ public class RaceQuestionProgressVO {
|
||||
@NotNull
|
||||
private Long userId;
|
||||
|
||||
/**答题进度*/
|
||||
/**
|
||||
* 答题进度
|
||||
*/
|
||||
private Long questionIndex;
|
||||
|
||||
private String projectCode;
|
||||
|
||||
private Long companyId;
|
||||
|
||||
/**错题列表*/
|
||||
/**
|
||||
* 错题列表
|
||||
*/
|
||||
private List<Long> incorrectList;
|
||||
|
||||
public RaceQuestionProgressVO(RaceQuestionProgress entity){
|
||||
public RaceQuestionProgressVO(RaceQuestionProgress entity) {
|
||||
this.id = entity.getId();
|
||||
this.userId = entity.getUserId();
|
||||
this.questionIndex = entity.getQuestionIndex();
|
||||
@ -61,11 +65,13 @@ public class RaceQuestionProgressVO {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public boolean addIncorrectQuestion(Long questionId){
|
||||
if(Objects.isNull(incorrectList)){
|
||||
incorrectList = new ArrayList<Long>(){{add(questionId);}};
|
||||
}else{
|
||||
if(incorrectList.contains(questionId)){
|
||||
public boolean addIncorrectQuestion(Long questionId) {
|
||||
if (Objects.isNull(incorrectList)) {
|
||||
incorrectList = new ArrayList<Long>() {{
|
||||
add(questionId);
|
||||
}};
|
||||
} else {
|
||||
if (incorrectList.contains(questionId)) {
|
||||
return false;
|
||||
}
|
||||
incorrectList.add(questionId);
|
||||
@ -73,11 +79,11 @@ public class RaceQuestionProgressVO {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean addIncorrectQuestions(List<Long> questionIds){
|
||||
if(Objects.isNull(incorrectList)){
|
||||
public boolean addIncorrectQuestions(List<Long> questionIds) {
|
||||
if (Objects.isNull(incorrectList)) {
|
||||
incorrectList = questionIds;
|
||||
}else{
|
||||
if(incorrectList.containsAll(questionIds)&& questionIds.containsAll(incorrectList)){
|
||||
} else {
|
||||
if (incorrectList.containsAll(questionIds) && questionIds.containsAll(incorrectList)) {
|
||||
return false;
|
||||
}
|
||||
questionIds.addAll(incorrectList);
|
||||
@ -86,19 +92,20 @@ public class RaceQuestionProgressVO {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void deleteIncorrectQuestion(Long questionId){
|
||||
if(Objects.isNull(incorrectList)){
|
||||
public void deleteIncorrectQuestion(Long questionId) {
|
||||
if (Objects.isNull(incorrectList)) {
|
||||
return;
|
||||
}else{
|
||||
} else {
|
||||
incorrectList.remove(questionId);
|
||||
}
|
||||
}
|
||||
|
||||
public RaceQuestionProgress toDB() {
|
||||
RaceQuestionProgress entity = new RaceQuestionProgress();
|
||||
entity.setId(id);
|
||||
entity.setUserId(userId);
|
||||
entity.setQuestionIndex(questionIndex);
|
||||
entity.setProjectCode(Project.isDefault(Project.valueOf(projectCode)) ? null : projectCode);
|
||||
entity.setProjectCode(Project.isDefault(projectCode) ? null : projectCode);
|
||||
entity.setCompanyId(companyId);
|
||||
if (Objects.nonNull(incorrectList)) {
|
||||
entity.setIncorrect(JsonUtils.writeValueAsString(incorrectList));
|
||||
|
@ -1,7 +1,7 @@
|
||||
package club.joylink.rtss.vo.client.competition;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.RaceQuestionsRules;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@ -20,38 +20,54 @@ import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**项目或单位的理论题出题规则*/
|
||||
/**
|
||||
* 项目或单位的理论题出题规则
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TheoryQuestionsRuleVO {
|
||||
|
||||
/**规则id*/
|
||||
/**
|
||||
* 规则id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**出题规则*/
|
||||
/**
|
||||
* 出题规则
|
||||
*/
|
||||
@Valid
|
||||
@NotEmpty(message = "出题规则不能为空")
|
||||
private Set<Rule> rules;
|
||||
|
||||
/**项目code*/
|
||||
/**
|
||||
* 项目code
|
||||
*/
|
||||
private String projectCode;
|
||||
|
||||
/**公司/单位id*/
|
||||
/**
|
||||
* 公司/单位id
|
||||
*/
|
||||
private Long companyId;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public static class Rule{
|
||||
/**题型*/
|
||||
public static class Rule {
|
||||
/**
|
||||
* 题型
|
||||
*/
|
||||
@NotNull
|
||||
private String type;
|
||||
/**题数*/
|
||||
/**
|
||||
* 题数
|
||||
*/
|
||||
@Positive
|
||||
private Integer num;
|
||||
/**每道题分值*/
|
||||
/**
|
||||
* 每道题分值
|
||||
*/
|
||||
@Positive
|
||||
private Float point;
|
||||
|
||||
@ -85,7 +101,7 @@ public class TheoryQuestionsRuleVO {
|
||||
public RaceQuestionsRules toDB() {
|
||||
RaceQuestionsRules entity = new RaceQuestionsRules();
|
||||
entity.setId(id);
|
||||
entity.setProjectCode(Project.isDefault(Project.valueOf(projectCode)) ? null : projectCode);
|
||||
entity.setProjectCode(Project.isDefault(projectCode) ? null : projectCode);
|
||||
entity.setCompanyId(companyId);
|
||||
entity.setRules(JsonUtils.writeValueAsString(rules));
|
||||
return entity;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.vo.client.learn;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -15,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
@NoArgsConstructor
|
||||
public class LearnPostCreateVO {
|
||||
@NotNull
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
@NotNull(message = "名称不能为空")
|
||||
private String title;
|
||||
|
@ -1,11 +1,8 @@
|
||||
package club.joylink.rtss.vo.client.question.v2;
|
||||
package club.joylink.rtss.vo.client.pager.question;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
@ -1,4 +1,4 @@
|
||||
package club.joylink.rtss.vo.client.question.v2;
|
||||
package club.joylink.rtss.vo.client.pager.question;
|
||||
|
||||
import club.joylink.rtss.entity.RaceQuestionOption;
|
||||
import lombok.Getter;
|
@ -1,9 +1,10 @@
|
||||
package club.joylink.rtss.vo.client.question.v2;
|
||||
package club.joylink.rtss.vo.client.pager.question;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.question.PaperQuestion;
|
||||
import club.joylink.rtss.entity.paper.question.PaperQuestion;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -53,6 +54,7 @@ public class PaperQuestionVO implements Cloneable {
|
||||
/**
|
||||
*分值
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Float score = 1f;
|
||||
|
||||
public PaperQuestionVO(PaperQuestion question) {
|
||||
@ -74,7 +76,7 @@ public class PaperQuestionVO implements Cloneable {
|
||||
question.setCompanyId(companyId);
|
||||
question.setQuestions(JsonUtils.writeValueAsString(this.optionList));
|
||||
question.setRaceLable(this.raceLable);
|
||||
|
||||
question.setIsDel(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
return question;
|
||||
}
|
||||
|
||||
@ -106,14 +108,15 @@ public class PaperQuestionVO implements Cloneable {
|
||||
clone.setOptionList(cloneList);
|
||||
return clone;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isSelect() {
|
||||
return BusinessConsts.TheoryType.select.name().equals(type);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isJudge() {
|
||||
return BusinessConsts.TheoryType.judge.name().equals(type);
|
||||
}
|
||||
@JsonIgnore
|
||||
public boolean isMulti(){
|
||||
return BusinessConsts.TheoryType.multi.name().equals(type);
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.vo.client.post;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -14,5 +13,5 @@ import lombok.Setter;
|
||||
@NoArgsConstructor
|
||||
public class LearnPostPagedQueryVO extends PageQueryVO {
|
||||
|
||||
private Project project;
|
||||
private String project;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.vo.client.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.constants.ProjectDeviceType;
|
||||
import club.joylink.rtss.entity.ProjectDevice;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
@ -52,7 +51,7 @@ public class ProjectDeviceVO {
|
||||
* 所属项目
|
||||
*/
|
||||
// @NotBlank(message = "所属项目编码不能为空")
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 设备编号(或名称),一个项目下唯一
|
||||
@ -82,7 +81,7 @@ public class ProjectDeviceVO {
|
||||
|
||||
public ProjectDeviceVO(ProjectDevice device) {
|
||||
this.id = device.getId();
|
||||
this.project = Project.valueOf(device.getProjectCode());
|
||||
this.project = device.getProjectCode();
|
||||
this.code = device.getCode();
|
||||
this.type = ProjectDeviceType.valueOf(device.getType());
|
||||
this.creator = device.getCreator();
|
||||
@ -101,27 +100,27 @@ public class ProjectDeviceVO {
|
||||
public static List<RealDeviceConfig> convert2RealDeviceList(List<ProjectDeviceVO> voList) {
|
||||
List<RealDeviceConfig> list = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(voList)) {
|
||||
Project project = voList.get(0).getProject();
|
||||
String project = voList.get(0).getProject();
|
||||
switch (project) {
|
||||
case XTY:{
|
||||
case "XTY": {
|
||||
return xtyDeviceConfigConvert(voList);
|
||||
}
|
||||
case GZB:{
|
||||
case "GZB": {
|
||||
return gzbDeviceConfigConvert(voList);
|
||||
}
|
||||
case HEB: {
|
||||
case "HEB": {
|
||||
return heb1DeviceConfigConvert(voList);
|
||||
}
|
||||
case SDY: {
|
||||
case "SDY": {
|
||||
return sdyDeviceConfigConvert(voList);
|
||||
}
|
||||
case RICHOR_JOINT: {
|
||||
case "RICHOR_JOINT": {
|
||||
return zjdDeviceConfigConvert(voList);
|
||||
}
|
||||
case SR_SANDBOX: {
|
||||
case "SR_SANDBOX": {
|
||||
return srSandboxDeviceConfigConvert(voList);
|
||||
}
|
||||
case RICHOR_HHCJ: {
|
||||
case "RICHOR_HHCJ": {
|
||||
return hhcjDeviceConfigConvert(voList);
|
||||
}
|
||||
}
|
||||
@ -236,7 +235,7 @@ public class ProjectDeviceVO {
|
||||
case PLC_GATEWAY:
|
||||
list.add(new PlcGateway(deviceVO));
|
||||
break;
|
||||
default:{
|
||||
default: {
|
||||
log.warn(String.format("设备[%s]不是PLC可连接控制设备", deviceVO));
|
||||
break;
|
||||
}
|
||||
@ -258,7 +257,7 @@ public class ProjectDeviceVO {
|
||||
case PLC_GATEWAY:
|
||||
list.add(new PlcGateway(deviceVO));
|
||||
break;
|
||||
default:{
|
||||
default: {
|
||||
log.warn(String.format("设备[%s]不是PLC可连接控制设备", deviceVO));
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package club.joylink.rtss.vo.client.question;
|
||||
|
||||
import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.RaceQuestion;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -15,7 +15,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*题库题目
|
||||
* 题库题目
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ -26,19 +26,19 @@ public class QuestionVO implements Cloneable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*类型
|
||||
* 类型
|
||||
*/
|
||||
@NotBlank(message = "类型不能为空")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
*题目
|
||||
* 题目
|
||||
*/
|
||||
@NotBlank(message = "题目不能为空")
|
||||
private String topic;
|
||||
|
||||
/**
|
||||
*选项列表
|
||||
* 选项列表
|
||||
*/
|
||||
private List<QuestionOptionVO> optionList;
|
||||
|
||||
@ -50,7 +50,7 @@ public class QuestionVO implements Cloneable {
|
||||
private Long companyId;
|
||||
|
||||
/**
|
||||
*分值
|
||||
* 分值
|
||||
*/
|
||||
private Float score = 1f;
|
||||
|
||||
@ -66,7 +66,7 @@ public class QuestionVO implements Cloneable {
|
||||
RaceQuestion question = new RaceQuestion();
|
||||
question.setType(type);
|
||||
question.setTopic(topic);
|
||||
question.setProjectCode(Project.isDefault(Project.valueOf(projectCode)) ? null : projectCode);
|
||||
question.setProjectCode(Project.isDefault(projectCode) ? null : projectCode);
|
||||
question.setCompanyId(companyId);
|
||||
return question;
|
||||
}
|
||||
@ -78,9 +78,9 @@ public class QuestionVO implements Cloneable {
|
||||
return question;
|
||||
}
|
||||
|
||||
public static List<QuestionVO> convert2VOList(List<RaceQuestion> questions){
|
||||
public static List<QuestionVO> convert2VOList(List<RaceQuestion> questions) {
|
||||
List<QuestionVO> voList = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(questions)) {
|
||||
if (!CollectionUtils.isEmpty(questions)) {
|
||||
questions.forEach(e -> voList.add(new QuestionVO(e)));
|
||||
}
|
||||
return voList;
|
||||
@ -99,7 +99,7 @@ public class QuestionVO implements Cloneable {
|
||||
error.set(true);
|
||||
return null;
|
||||
}).collect(Collectors.toList());
|
||||
if(error.get()){
|
||||
if (error.get()) {
|
||||
throw new CloneNotSupportedException("克隆题目选项失败");
|
||||
}
|
||||
clone.setOptionList(cloneList);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.vo.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -10,6 +9,6 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class ProjectServerQueryVO extends PageQueryVO {
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.vo.project;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.ProjectServer;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
@ -20,7 +19,7 @@ public class ProjectServerVO {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private Project project;
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 域名
|
||||
@ -44,7 +43,7 @@ public class ProjectServerVO {
|
||||
|
||||
public ProjectServerVO(ProjectServer projectServer) {
|
||||
this.id = projectServer.getId();
|
||||
this.project = Project.valueOf(projectServer.getProject());
|
||||
this.project = projectServer.getProject();
|
||||
this.domainName = projectServer.getDomainName();
|
||||
this.resourcesDomainName = projectServer.getResourcesDomainName();
|
||||
this.createUserId = projectServer.getCreateUserId();
|
||||
@ -65,7 +64,7 @@ public class ProjectServerVO {
|
||||
|
||||
public ProjectServer toDB4Create() {
|
||||
ProjectServer db = new ProjectServer();
|
||||
db.setProject(this.project.name());
|
||||
db.setProject(this.project);
|
||||
db.setDomainName(this.domainName);
|
||||
db.setResourcesDomainName(this.resourcesDomainName);
|
||||
return db;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package club.joylink.rtss.websocket.interceptor;
|
||||
|
||||
import club.joylink.rtss.constants.Project;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.services.SysUserService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -21,26 +21,28 @@ public class VSimpleInterceptor extends BaseInterceptor {
|
||||
|
||||
|
||||
public final static String ATT_USER_KEY = "userVo";
|
||||
|
||||
@Override
|
||||
public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse serverHttpResponse, WebSocketHandler webSocketHandler, Map<String, Object> attributes) throws Exception {
|
||||
Map<String, String> map = this.findQueryParams(request);
|
||||
log.info(String.format("webSocket handshake query: [%s]", map));
|
||||
try{
|
||||
try {
|
||||
AccountVO vo = this.checkUserInfo(map);
|
||||
if(Objects.isNull(vo)){
|
||||
if (Objects.isNull(vo)) {
|
||||
return false;
|
||||
}
|
||||
attributes.put(ATT_USER_KEY,vo);
|
||||
attributes.put(ATT_USER_KEY, vo);
|
||||
return true;
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final static String USER_ACCOUNT = "user_account";
|
||||
private final static String ACCOUNT_PWD = "account_pwd";
|
||||
private AccountVO checkUserInfo(Map<String,String> dataMap){
|
||||
AccountVO vo = this.sysUserService.findUserByAccountAndPassword(dataMap.get(USER_ACCOUNT),dataMap.get(ACCOUNT_PWD), Project.DEFAULT);
|
||||
|
||||
private AccountVO checkUserInfo(Map<String, String> dataMap) {
|
||||
AccountVO vo = this.sysUserService.findUserByAccountAndPassword(dataMap.get(USER_ACCOUNT), dataMap.get(ACCOUNT_PWD), Project.DEFAULT_PROJECT_CODE);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.rtss.dao.PagerQuestionDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.question.PaperQuestion">
|
||||
<mapper namespace="club.joylink.rtss.dao.paper.PagerQuestionDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.paper.question.PaperQuestion">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
|
||||
@ -105,7 +105,7 @@
|
||||
</if>
|
||||
</if>
|
||||
</select>-->
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.question.PaperQuestionExample" resultMap="BaseResultMap">
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
@ -141,13 +141,13 @@
|
||||
delete from paper_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.question.PaperQuestionExample">
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionExample">
|
||||
delete from paper_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.question.PaperQuestionWithBLOBs">
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
insert into paper_question (id, `type`, create_user_id,
|
||||
create_time, project_code, company_id,
|
||||
race_lable, is_del, topic,
|
||||
@ -157,7 +157,7 @@
|
||||
#{raceLable,jdbcType=VARCHAR}, #{isDel,jdbcType=INTEGER}, #{topic,jdbcType=LONGVARCHAR},
|
||||
#{questions,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.question.PaperQuestionWithBLOBs">
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
insert into paper_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@ -224,7 +224,7 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.question.PaperQuestionExample" resultType="java.lang.Long">
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionExample" resultType="java.lang.Long">
|
||||
select count(*) from paper_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
@ -301,7 +301,7 @@
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.question.PaperQuestionWithBLOBs">
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
update paper_question
|
||||
<set>
|
||||
<if test="type != null">
|
||||
@ -347,7 +347,7 @@
|
||||
questions = #{questions,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>-->
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.question.PaperQuestion">
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestion">
|
||||
update paper_question
|
||||
set `type` = #{type,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId,jdbcType=BIGINT},
|
||||
|
@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="club.joylink.rtss.dao.ProjectDAO">
|
||||
<mapper namespace="club.joylink.rtss.dao.project.ProjectDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.project.Project">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="mark_key" property="markKey" jdbcType="VARCHAR"/>
|
||||
<result column="code" property="code" jdbcType="VARCHAR"/>
|
||||
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||
<result column="name_en" property="nameEn" jdbcType="VARCHAR"/>
|
||||
@ -15,7 +14,6 @@
|
||||
</resultMap>
|
||||
<resultMap id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.project.Project" extends="BaseResultMap">
|
||||
<result column="server_setting" property="serverSetting" jdbcType="LONGVARCHAR"/>
|
||||
<result column="view_setting" property="viewSetting" jdbcType="LONGVARCHAR"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -77,12 +75,11 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, mark_key, code, name, name_en, simple_name, create_time, update_time, status, view_show
|
||||
id, code, name, name_en, simple_name, create_time, update_time, status, view_show
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
server_setting,view_setting
|
||||
server_setting
|
||||
</sql>
|
||||
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.project.ProjectExample"
|
||||
@ -150,14 +147,14 @@
|
||||
</delete>
|
||||
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
insert into project ( mark_key, code,
|
||||
insert into project ( code,
|
||||
name, name_en, simple_name,
|
||||
create_time, update_time, status,
|
||||
server_setting, view_setting,view_show)
|
||||
values (#{markKey,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||||
server_setting,view_show)
|
||||
values (#{code,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{nameEn,jdbcType=VARCHAR}, #{simpleName,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
|
||||
#{server_setting,jdbcType=LONGVARCHAR}, #{viewSetting,jdbcType=LONGVARCHAR}, #{viewShow,jdbcType=INTEGER})
|
||||
#{serverSetting,jdbcType=LONGVARCHAR},#{viewShow,jdbcType=INTEGER})
|
||||
</insert>
|
||||
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
@ -166,9 +163,6 @@
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="markKey != null">
|
||||
mark_key,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
@ -193,19 +187,13 @@
|
||||
<if test="serverSetting != null">
|
||||
server_setting,
|
||||
</if>
|
||||
<if test="viewSetting != null">
|
||||
view_setting,
|
||||
</if>
|
||||
<if test="viewShow != null">
|
||||
view_show,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="markKey != null">
|
||||
#{markKey,jdbcType=VARCHAR},
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
@ -231,9 +219,6 @@
|
||||
<if test="serverSetting != null">
|
||||
#{serverSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="viewSetting != null">
|
||||
#{viewSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="viewShow != null">
|
||||
#{viewShow,jdbcType=INTEGER},
|
||||
</if>
|
||||
@ -243,9 +228,6 @@
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
update project
|
||||
<set>
|
||||
<if test="markKey != null">
|
||||
mark_key = #{markKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -270,20 +252,16 @@
|
||||
<if test="serverSetting != null">
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="viewSetting != null">
|
||||
view_setting = #{viewSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="viewShow != null">
|
||||
view_show = #{viewShow,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
update project
|
||||
set mark_key = #{markKey,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
name_en = #{nameEn,jdbcType=VARCHAR},
|
||||
simple_name = #{simpleName,jdbcType=VARCHAR},
|
||||
@ -291,23 +269,20 @@
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR},
|
||||
view_setting = #{viewSetting,jdbcType=LONGVARCHAR},
|
||||
view_show = #{viewShow,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
update project
|
||||
set mark_key = #{markKey,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
name_en = #{nameEn,jdbcType=VARCHAR},
|
||||
simple_name = #{simpleName,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR},
|
||||
view_show = #{viewShow,jdbcType=INTEGER}
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
|
249
src/main/resources/mybatis/mapper/ProjectViewDaoMapper.xml
Normal file
249
src/main/resources/mybatis/mapper/ProjectViewDaoMapper.xml
Normal file
@ -0,0 +1,249 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="club.joylink.rtss.dao.project.ProjectViewDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.project.ProjectView">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="mark_key" property="markKey" jdbcType="VARCHAR"/>
|
||||
<result column="project" property="project" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
<resultMap id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.project.ProjectView" extends="BaseResultMap">
|
||||
<result column="view_setting" property="viewSetting" jdbcType="LONGVARCHAR"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, mark_key, project, create_time, update_time, status
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
view_setting
|
||||
</sql>
|
||||
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.project.ProjectViewExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from project_view
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectWithBLOBsByExample" parameterType="club.joylink.rtss.entity.project.ProjectViewExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from project_view
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from project_view
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from project_view where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.project.ProjectView">
|
||||
insert into project_view (mark_key, project, create_time, update_time, status, view_setting)
|
||||
values ( #{markKey,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
|
||||
#{viewSetting,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.project.ProjectView">
|
||||
insert into project_view
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="markKey != null">
|
||||
mark_key,
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="viewSetting != null">
|
||||
view_setting,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="markKey != null">
|
||||
#{markKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="viewSetting != null">
|
||||
#{viewSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.project.ProjectView">
|
||||
update project_view
|
||||
<set>
|
||||
<if test="markKey != null">
|
||||
mark_key = #{markKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="viewSetting != null">
|
||||
view_setting = #{viewSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.project.ProjectView">
|
||||
update project_view
|
||||
set mark_key = #{markKey,jdbcType=VARCHAR},
|
||||
project = #{project,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
view_setting = #{viewSetting,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.project.ProjectView">
|
||||
update project_view
|
||||
set mark_key = #{markKey,jdbcType=VARCHAR},
|
||||
project = #{project,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -22,7 +22,7 @@ class QRCodeManagerTest {
|
||||
for (String env : envArr) {
|
||||
otherConfig.setEnv(env);
|
||||
for (Project project : Project.values()) {
|
||||
String result = qrCodeManager.getLoginCode(null, project, null);
|
||||
String result = qrCodeManager.getLoginCode(null, project.name(), null);
|
||||
switch (env) {
|
||||
case "dev":
|
||||
assertEquals("", result);
|
||||
@ -49,7 +49,7 @@ class QRCodeManagerTest {
|
||||
for (String env : envArr) {
|
||||
otherConfig.setEnv(env);
|
||||
for (Project project : Project.values()) {
|
||||
String result = qrCodeManager.getDistributeCode(1, project);
|
||||
String result = qrCodeManager.getDistributeCode(1, project.name());
|
||||
switch (env) {
|
||||
case "dev":
|
||||
assertEquals("", result);
|
||||
@ -76,7 +76,7 @@ class QRCodeManagerTest {
|
||||
for (String env : envArr) {
|
||||
otherConfig.setEnv(env);
|
||||
for (Project project : Project.values()) {
|
||||
String result = qrCodeManager.getSimulationCode("42-10086", project);
|
||||
String result = qrCodeManager.getSimulationCode("42-10086", project.name());
|
||||
switch (env) {
|
||||
case "dev":
|
||||
assertEquals("", result);
|
||||
@ -103,7 +103,7 @@ class QRCodeManagerTest {
|
||||
for (String env : envArr) {
|
||||
otherConfig.setEnv(env);
|
||||
for (Project project : Project.values()) {
|
||||
String result = qrCodeManager.getWeChatBindUrl(1, project);
|
||||
String result = qrCodeManager.getWeChatBindUrl(1, project.name());
|
||||
switch (env) {
|
||||
case "dev":
|
||||
assertEquals("", result);
|
||||
@ -130,7 +130,7 @@ class QRCodeManagerTest {
|
||||
for (String env : envArr) {
|
||||
otherConfig.setEnv(env);
|
||||
for (Project project : Project.values()) {
|
||||
String result = qrCodeManager.getOrgBindCode(1, project);
|
||||
String result = qrCodeManager.getOrgBindCode(1, project.name());
|
||||
switch (env) {
|
||||
case "dev":
|
||||
assertEquals("", result);
|
||||
|
@ -19,7 +19,7 @@ class ServerServiceImplTest {
|
||||
void getByProject() {
|
||||
//正常取值
|
||||
for (Project project : Project.values()) {
|
||||
serverService.getByProject(project);
|
||||
serverService.getByProject(project.name());
|
||||
}
|
||||
//参数异常
|
||||
try {
|
||||
@ -28,10 +28,10 @@ class ServerServiceImplTest {
|
||||
assertTrue(e instanceof NullPointerException);
|
||||
}
|
||||
//校验取值结果
|
||||
ProjectServerVO xtyProjectVO = serverService.getByProject(Project.XTY);
|
||||
ProjectServerVO xtyProjectVO = serverService.getByProject("XTY");
|
||||
assertEquals(xtyProjectVO.getDomainName(), "test.joylink.club/jlcloud");
|
||||
assertEquals(xtyProjectVO.getResourcesDomainName(), "joylink.club/oss/joylink");
|
||||
ProjectServerVO drtsProjectVO = serverService.getByProject(Project.DRTS);
|
||||
ProjectServerVO drtsProjectVO = serverService.getByProject("DRTS");
|
||||
assertNull(drtsProjectVO);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user