Merge remote-tracking branch 'origin/fix_bug_first_stage' into fix_bug_first_stage
This commit is contained in:
@@ -440,7 +440,7 @@ CREATE TABLE `laws_weilai`.`doc_translation` (
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文档翻译表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 文档翻译-源语言数据字典
|
||||
-- 文档翻译-源语言数据字典 2022-7-25 已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550306517749547010', '文档翻译-翻译语言-源语言', 'source_language', '文档翻译-翻译语言-源语言', 0, 'admin', '2022-07-22 10:27:32', 'admin', '2022-07-22 10:29:17', NULL, NULL, 1, 0, '1', 2);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030756958032691412', '1550306517749547010', '中文', 'zh', '中文', 2, 1, 'admin', '2022-07-22 10:31:43', 'admin', '2022-07-22 10:31:59', 1, NULL, NULL, '0', 'Chinese');
|
||||
@@ -459,7 +459,7 @@ INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_v
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503119403009474586', '1550306517749547010', '朝鲜语', 'ko', '朝鲜语', 15, 1, 'admin', '2022-07-22 10:49:05', NULL, NULL, 1, NULL, NULL, '0', 'Korean');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503120084961361947', '1550306517749547010', '越南语', 'vi', '越南语', 16, 1, 'admin', '2022-07-22 10:49:21', NULL, NULL, 1, NULL, NULL, '0', 'Vietnamese');
|
||||
|
||||
-- 文档翻译-目标语言数据字典
|
||||
-- 文档翻译-目标语言数据字典 2022-7-25 已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550306581909815297', '文档翻译-翻译语言-目标语言', 'target_language', '文档翻译-翻译语言-目标语言', 0, 'admin', '2022-07-22 10:27:47', 'admin', '2022-07-22 10:29:13', NULL, NULL, 1, 0, '1', 1);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503075695803269141', '1550306581909815297', '中文', 'zh', '中文', 2, 1, 'admin', '2022-07-22 10:31:43', 'admin', '2022-07-22 10:31:59', 1, NULL, NULL, '0', 'Chinese');
|
||||
@@ -478,19 +478,217 @@ INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_v
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311940300947458', '1550306581909815297', '朝鲜语', 'ko', '朝鲜语', 15, 1, 'admin', '2022-07-22 10:49:05', NULL, NULL, 1, NULL, NULL, '0', 'Korean');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550312008496136194', '1550306581909815297', '越南语', 'vi', '越南语', 16, 1, 'admin', '2022-07-22 10:49:21', NULL, NULL, 1, NULL, NULL, '0', 'Vietnamese');
|
||||
|
||||
-- 文档翻译-发布情况数据字典
|
||||
-- 文档翻译-发布情况数据字典 2022-7-25 已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550314527293128705', '文档翻译-发布情况', 'release_condition', '文档翻译-发布情况', 0, 'admin', '2022-07-22 10:59:21', 'admin', '2022-07-22 11:01:07', NULL, NULL, 1, 0, '1', 2);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550314666682433537', '1550314527293128705', '已发布', 'published', '已发布', 1, 1, 'admin', '2022-07-22 10:59:55', NULL, NULL, 1, NULL, NULL, '0', 'Have published');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550314731320852482', '1550314527293128705', '草稿', 'draft', '草稿', 2, 1, 'admin', '2022-07-22 11:00:10', NULL, NULL, 1, NULL, NULL, '0', 'Draft');
|
||||
|
||||
-- 文档翻译-翻译结果数据字典
|
||||
-- 文档翻译-翻译结果数据字典 2022-7-25 已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550314971079852034', '文档翻译-翻译结果', 'translation_result', '文档翻译-翻译结果', 0, 'admin', '2022-07-22 11:01:07', NULL, NULL, NULL, NULL, 1, 0, '1', 1);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550315090797871105', '1550314971079852034', '翻译中', 'In the translation', '翻译中', 1, 1, 'admin', '2022-07-22 11:01:36', NULL, NULL, 1, NULL, NULL, '0', 'In the translation');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550315193285689345', '1550314971079852034', '翻译完成', 'Translation done', '翻译完成', 2, 1, 'admin', '2022-07-22 11:02:00', NULL, NULL, 1, NULL, NULL, '0', 'Translation done');
|
||||
|
||||
-- 文档翻译表-增加字段 编号、标题
|
||||
-- 文档翻译表-增加字段 编号、标题 2022-7-25 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`doc_translation`
|
||||
ADD COLUMN `serial_number` varchar(255) NULL COMMENT '编号' AFTER `buss_document_library_id`,
|
||||
ADD COLUMN `title` varchar(255) NULL COMMENT '标题' AFTER `serial_number`;
|
||||
|
||||
-- 菜单管理 添加上报库按钮 2022-07-28
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552487817415819266', '1552487412749369345', '自定义导出', NULL, NULL, NULL, NULL, 2, 'report:detail:export:custom', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:55:14', NULL, NULL, 0, 0, '1', 0, 'Custom Export');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552487616038895618', '1552487412749369345', '常规导出', NULL, NULL, NULL, NULL, 2, 'report:detail:export:normal', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:54:26', NULL, NULL, 0, 0, '1', 0, 'Normal Export');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552487412749369345', '1539429224550457346', '查看', NULL, NULL, NULL, NULL, 2, 'report:detail:list', '1', 1.00, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2022-07-28 10:53:38', NULL, NULL, 0, 0, '1', 0, 'Detail');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552487236076896257', '1539429224550457346', '导出历史', NULL, NULL, NULL, NULL, 2, 'params:report:history', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:52:56', NULL, NULL, 0, 0, '1', 0, 'Export History');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552484580440735746', '1539426795780005889', '批量删除', NULL, NULL, NULL, NULL, 2, 'report:exportTemplate:deleteBatch', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:42:22', NULL, NULL, 0, 0, '1', 0, 'Batch Delete');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552484462484324353', '1539426795780005889', '删除', NULL, NULL, NULL, NULL, 2, 'report:exportTemplate:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:41:54', NULL, NULL, 0, 0, '1', 0, 'Delete');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552484292065558530', '1539426795780005889', '编辑', NULL, NULL, NULL, NULL, 2, 'report:exportTemplate:edit', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:41:14', NULL, NULL, 0, 0, '1', 0, 'Edit');
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1552484136976973825', '1539426795780005889', '新增', NULL, NULL, NULL, NULL, 2, 'report:exportTemplate:add', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-07-28 10:40:37', NULL, NULL, 0, 0, '1', 0, 'Add');
|
||||
UPDATE `laws_weilai`.`sys_permission` SET `parent_id` = '1516964175944798210', `name` = '上报库管理', `url` = '/escalationlibrary', `component` = 'parameter/escalationlibrary/index', `component_name` = NULL, `redirect` = NULL, `menu_type` = 1, `perms` = 'params:report:page', `perms_type` = '1', `sort_no` = 3.00, `always_show` = 0, `icon` = NULL, `is_route` = 1, `is_leaf` = 0, `keep_alive` = 0, `hidden` = 0, `description` = NULL, `create_by` = 'admin', `create_time` = '2022-06-22 10:05:03', `update_by` = 'admin', `update_time` = '2022-07-28 10:52:00', `del_flag` = 0, `rule_flag` = 0, `status` = '1', `internal_or_external` = 0, `menu_en` = 'Escalation library management' WHERE `id` = '1539429224550457346';
|
||||
UPDATE `laws_weilai`.`sys_permission` SET `parent_id` = '1516964175944798210', `name` = '参数导出模板管理', `url` = '/Parameterexport', `component` = 'parameter/parameterexport/index', `component_name` = NULL, `redirect` = NULL, `menu_type` = 1, `perms` = 'report:exportTemplate:page', `perms_type` = '1', `sort_no` = 2.00, `always_show` = 0, `icon` = NULL, `is_route` = 1, `is_leaf` = 0, `keep_alive` = 0, `hidden` = 0, `description` = NULL, `create_by` = 'admin', `create_time` = '2022-06-22 09:55:24', `update_by` = 'admin', `update_time` = '2022-07-28 10:40:02', `del_flag` = 0, `rule_flag` = 0, `status` = '1', `internal_or_external` = 0, `menu_en` = 'Parameter export template management' WHERE `id` = '1539426795780005889';
|
||||
|
||||
-- 角色表-增加对外报告管理员角色 2022-7-28 已同步生产环境
|
||||
INSERT INTO `sys_role` VALUES ('1552536424587862017', '对外报告管理员', 'ExternalReportsManager', '对外报告文件夹列表的管理员', 'admin', '2022-7-28 14:08:23', NULL, NULL, NULL, NULL);
|
||||
|
||||
-- 菜单管理 添加对外报告文件夹管理按钮权限 2022-07-28 已同步生产环境
|
||||
INSERT INTO `sys_permission` VALUES ('1552182885208608770', '1549937961282908162', '对外报告文件夹管理', '', NULL, NULL, NULL, 2, 'externalReports:folder', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-7-27 14:43:33', NULL, NULL, 0, 0, '1', 0, 'External Report Folder Management ');
|
||||
|
||||
-- 对外报告文件夹表 2022-7-29 已同步生产环境
|
||||
DROP TABLE IF EXISTS `ext_repo_folder`;
|
||||
CREATE TABLE `ext_repo_folder` (
|
||||
`id` varchar(36) NOT NULL,
|
||||
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
|
||||
`folder_name` varchar(255) DEFAULT NULL COMMENT '文件夹名称',
|
||||
`order_id` int(11) DEFAULT NULL COMMENT '文件夹排序',
|
||||
`sup_folder` varchar(36) DEFAULT NULL COMMENT '所属文件夹',
|
||||
`auth_view_ids_name` varchar(2000) DEFAULT NULL COMMENT '查看权限人员',
|
||||
`auth_manage_ids_name` varchar(2000) DEFAULT NULL COMMENT '管理权限人员',
|
||||
`auth_view_ids` varchar(2000) DEFAULT NULL COMMENT '查看权限人员id',
|
||||
`auth_manage_ids` varchar(2000) DEFAULT NULL COMMENT '管理权限人员id',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
INSERT INTO `ext_repo_folder` VALUES ('1552846304994131970', 'admin', '2022-07-01 11:11:11', 'admin', '2022-11-11 11:11:11', 'A01', '文件夹', '1', 'root', '', '', '', '');
|
||||
|
||||
-- 对外报告数据表 2022-7-29 已同步生产环境
|
||||
DROP TABLE IF EXISTS `ext_repo_data`;
|
||||
CREATE TABLE `ext_repo_data` (
|
||||
`id` varchar(36) NOT NULL,
|
||||
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
|
||||
`file_key` varchar(255) DEFAULT NULL COMMENT '文件标识',
|
||||
`file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
|
||||
`file_description` varchar(255) DEFAULT NULL COMMENT '文件说明',
|
||||
`sup_folder` varchar(36) DEFAULT NULL COMMENT '所属文件夹',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 参数项收集清单 认证类别取消列表显示 2022-08-02
|
||||
UPDATE `laws_weilai`.`onl_cgform_field`
|
||||
SET `is_show_list` = 0, `update_by` = 'admin', `update_time` = '2022-08-02 09:36:09'
|
||||
WHERE `id` = '7b8ef9f8da124ed93e5c10a14b903390';
|
||||
|
||||
-- 问题知识库开发。
|
||||
-- Country Card模板维护表 2022-08-02
|
||||
CREATE TABLE `laws_weilai`.`country_card_temp` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`lable_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称',
|
||||
`lable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签类型',
|
||||
`order_num` int(11) NULL DEFAULT NULL COMMENT '展示顺序',
|
||||
`relevant_url` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联网址',
|
||||
`description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Country Card模板维护表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- Country Card模板维护-字典项表 2022-08-02
|
||||
CREATE TABLE `laws_weilai`.`country_card_temp_item` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`country_card_temp_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模板维护表id',
|
||||
`item_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项值',
|
||||
`item_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项中文名称',
|
||||
`en_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典项英文名称',
|
||||
`del_flag` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '逻辑删除标识',
|
||||
`status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态(1启用 0不启用)',
|
||||
`description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Country Card模板维护-字典项表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库-分类表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base_classify` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`problem_label` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题标签',
|
||||
`charge_person_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库-分类表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
|
||||
`problem_type` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题分类',
|
||||
`target_market` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市场',
|
||||
`buss_document_library_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id',
|
||||
`stand_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准编号',
|
||||
`stand_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准标题',
|
||||
`content` blob NULL COMMENT '内容(正文)',
|
||||
`accessory_file` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件',
|
||||
`show_permissions` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '展示权限',
|
||||
`release_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布人id',
|
||||
`release_time` datetime NULL DEFAULT NULL COMMENT '发布日期',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库展示权限表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base_user` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`problem_knowledge_base_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题知识库id',
|
||||
`user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库展示权限表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库评论表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base_comment` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`problem_knowledge_base_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题知识库id',
|
||||
`comment_content` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评论内容',
|
||||
`comment_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评论用户id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库评论表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库浏览历史表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base_browsing_history` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`problem_knowledge_base_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题知识库id',
|
||||
`browsing_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览人员id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库浏览历史表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库点赞表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base_praise` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`problem_knowledge_base_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题知识库id',
|
||||
`praise_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '点赞人员id',
|
||||
`praise_status` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '点赞状态',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库点赞表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 问题知识库收藏表 2022-08-03
|
||||
CREATE TABLE `laws_weilai`.`problem_knowledge_base_collect` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`problem_knowledge_base_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题知识库id',
|
||||
`collect_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收藏用户id',
|
||||
`collect_status` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收藏状态',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题知识库收藏表' ROW_FORMAT = Dynamic;
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.jero.modules.cert.collect.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.cert.collect.service.IParamsManifestEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags="项目详情-参数收集统计接口")
|
||||
@RestController
|
||||
@RequestMapping("/project/projectLibraryBase")
|
||||
@Slf4j
|
||||
public class ProjectDetailsStatisticsCollectManifestController {
|
||||
@Autowired
|
||||
private IParamsManifestEOService paramsManifestEOService;
|
||||
|
||||
/**
|
||||
* 项目详情-参数收集统计接口-清单下拉选项
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-参数收集统计接口-清单下拉选项")
|
||||
@ApiOperation(value="项目详情-参数收集统计接口-清单下拉选项", notes="项目详情-参数收集统计接口-清单下拉选项")
|
||||
@GetMapping(value = "/getProjectDetailsStatisticsCollectManifestLabel")
|
||||
public Result<?> getProjectDetailsStatisticsCollectManifestLabel(@RequestParam(name="id",required=true) String id) {
|
||||
List<Map<String, String>> labelList = paramsManifestEOService.labelListForProjectDetails(id);
|
||||
return Result.OK(labelList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情-参数收集统计接口-统计结果
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-参数收集统计接口-统计结果")
|
||||
@ApiOperation(value="项目详情-参数收集统计接口-统计结果", notes="项目详情-参数收集统计接口-统计结果")
|
||||
@GetMapping(value = "/getProjectDetailsStatisticsCollectManifestData")
|
||||
public Result<?> getProjectDetailsStatisticsCollectManifestData(@RequestParam(name="paramsManifestId",required=true) String paramsManifestId,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
Map<String, Object> data = paramsManifestEOService.getStatisticsForProjectDetails(paramsManifestId, cut);
|
||||
return Result.OK(data);
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.cert.collect.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum CollectManifestStatisticsStateEnum {
|
||||
NOT_START("未开始","Not start","not start"),
|
||||
COLLECTING("收集中","Collecting","collecting"),
|
||||
SUBMIT("已提交","Submit","submit"),
|
||||
SYNC_REPORT("已同步至上报库","Sync Report","sync report");
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
CollectManifestStatisticsStateEnum(String name, String enName, String value) {
|
||||
this.name = name;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public static Map<String,String> toMap(String cut){
|
||||
Map<String,String> map = new HashMap<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
for (CollectManifestStatisticsStateEnum collectManifestStatisticsStateEnum : CollectManifestStatisticsStateEnum.values()) {
|
||||
map.put(collectManifestStatisticsStateEnum.getValue(), collectManifestStatisticsStateEnum.getName());
|
||||
}
|
||||
} else if (CutEnum.EN.getValue().equals(cut)) {
|
||||
for (CollectManifestStatisticsStateEnum collectManifestStatisticsStateEnum : CollectManifestStatisticsStateEnum.values()) {
|
||||
map.put(collectManifestStatisticsStateEnum.getValue(), collectManifestStatisticsStateEnum.getEnName());
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@ public enum CollectManifestUserTypeEnum {
|
||||
DRE("填写人", "Dre People","dre"),
|
||||
STUDIO("R&H Studio","R&H Studio","studio"),
|
||||
MANAGER("R&H Manager","R&H Manager","manager"),
|
||||
ADMIN("系统管理员","Administrator","admin"),
|
||||
ADMIN("系统","Administrator","admin"),
|
||||
GUEST("游客", "Guest","guest");
|
||||
|
||||
String name;
|
||||
|
||||
+2
@@ -7,6 +7,7 @@ import com.jero.modules.cert.collect.vo.ParamsManifestVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 参数清单
|
||||
@@ -25,4 +26,5 @@ public interface ParamsManifestEOMapper extends BaseMapper<ParamsManifestEO> {
|
||||
|
||||
ParamsManifestVO getProjectById(@Param("projectId") String projectId);
|
||||
|
||||
List<Map<String, String>> labelListForProjectDetails(@Param("projectId") String projectId);
|
||||
}
|
||||
|
||||
+9
@@ -124,4 +124,13 @@
|
||||
) tmp_tb
|
||||
where project_id = #{projectId}
|
||||
</select>
|
||||
|
||||
<select id="labelListForProjectDetails" resultType="java.util.LinkedHashMap">
|
||||
select
|
||||
title as label,
|
||||
id as value
|
||||
from params_manifest
|
||||
where project_id = #{projectId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
+5
@@ -9,6 +9,7 @@ import com.jero.modules.cert.collect.vo.ParamsManifestVO;
|
||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 参数清单
|
||||
@@ -82,4 +83,8 @@ public interface IParamsManifestEOService extends IService<ParamsManifestEO> {
|
||||
ParamsManifestEO copy(ParamsManifestEO paramsManifestEO, String sourceManifestId);
|
||||
|
||||
ParamsManifestVO getProjectById(String projectId);
|
||||
|
||||
List<Map<String, String>> labelListForProjectDetails(String projectId);
|
||||
|
||||
Map<String, Object> getStatisticsForProjectDetails(String paramsManifestId, String cut);
|
||||
}
|
||||
|
||||
+6
-1
@@ -676,6 +676,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
map.put("db_field_name", paramsConfigEO.getId());
|
||||
map.put("db_field_txt", paramsConfigEO.getConfigName());
|
||||
map.put("type", true); //配置列 标识
|
||||
map.put("isLock", paramsConfigEO.getIsLock()); //配置列 冻结标识
|
||||
listConfig.add(map);
|
||||
}
|
||||
|
||||
@@ -1544,7 +1545,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
Map<String, String> msgMap = new HashMap<>();
|
||||
msgMap.put("nioNumber", paramsCollectManifestEO.getNioNumber());
|
||||
msgMap.put("state", paramsCollectManifestEO.getState());
|
||||
msgMap.put("state", "1");
|
||||
msgMap.put("type", "1");
|
||||
msgMapList.add(msgMap);
|
||||
}
|
||||
|
||||
@@ -1581,6 +1582,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String content = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter the link to handle it.";
|
||||
|
||||
SysUser sysUser = sysUserService.getUserByName(sdt);
|
||||
if(sysUser == null){
|
||||
continue;
|
||||
}
|
||||
|
||||
String[] thirdIds = new String[1];
|
||||
thirdIds[0] = sysUser.getThirdId();
|
||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||
|
||||
+106
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsConfigDataEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsConfigEO;
|
||||
@@ -30,6 +31,7 @@ import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysDictMapper;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -38,6 +40,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -87,6 +90,8 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
@Autowired
|
||||
private IParamsReportEOService paramsReportEOService;
|
||||
|
||||
@Autowired
|
||||
private SysDictMapper sysDictMapper;
|
||||
|
||||
|
||||
|
||||
@@ -624,4 +629,105 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
public ParamsManifestVO getProjectById(String projectId) {
|
||||
return paramsManifestEOMapper.getProjectById(projectId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> labelListForProjectDetails(String projectId) {
|
||||
return paramsManifestEOMapper.labelListForProjectDetails(projectId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getStatisticsForProjectDetails(String paramsManifestId, String cut) {
|
||||
// 查询所有责任领域
|
||||
List<DictModel> dutyTerritoryDictList = sysDictMapper.queryDictItemsByCode("duty_territory");
|
||||
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
List<String> dutyTerritoryNameList = new LinkedList<>();
|
||||
List<Map<String, Object>> notStartList = new LinkedList<>();
|
||||
List<Map<String, Object>> collectingList = new LinkedList<>();
|
||||
List<Map<String, Object>> submitList = new LinkedList<>();
|
||||
List<Map<String, Object>> syncReportList = new LinkedList<>();
|
||||
|
||||
// 统计清单参数
|
||||
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
|
||||
paramsCollectManifestEO.setParamsManifestId(paramsManifestId);
|
||||
List<Map<String, Object>> listAll = paramsCollectManifestEOMapper.listInfoForExport(paramsCollectManifestEO);
|
||||
|
||||
// 循环责任领域,计算每个责任领域中的四种状态数据
|
||||
dutyTerritoryDictList.forEach(item->{
|
||||
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
dutyTerritoryNameList.add(item.getTextEn());
|
||||
|
||||
} else {
|
||||
dutyTerritoryNameList.add(item.getText());
|
||||
|
||||
}
|
||||
|
||||
// 计算数量
|
||||
double notStartNumber = listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.get("state"))
|
||||
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(e.get("state"))
|
||||
|| CollectManifestStateEnum.CHANGE.getValue().equals(e.get("state"))) && item.getValue().equals(e.get("duty_territory")))
|
||||
.count(); // 未开始的参数项 数量
|
||||
|
||||
double collectingNumber = listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.get("state"))
|
||||
|| CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.get("state"))
|
||||
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.get("state"))
|
||||
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(e.get("state"))) && item.getValue().equals(e.get("duty_territory")))
|
||||
.count(); // 收集中的参数项 数量
|
||||
|
||||
double submitNumber = listAll.stream().filter(e -> CollectManifestStateEnum.SUBMIT.getValue().equals(e.get("state")) && item.getValue().equals(e.get("duty_territory")))
|
||||
.count(); // 已提交的参数项 数量
|
||||
|
||||
double syncReportNumber = listAll.stream().filter(e -> CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.get("state")) && item.getValue().equals(e.get("duty_territory")))
|
||||
.count(); // 已同步上报库的参数项 数量
|
||||
|
||||
// 计算百分比
|
||||
double total = notStartNumber + collectingNumber + submitNumber + syncReportNumber; // 当前责任领域参数项总数
|
||||
String notStartPercent = getRatio(notStartNumber, total); // 未开始的参数项 百分比
|
||||
String collectingPercent = getRatio(collectingNumber, total); // 收集中的参数项 百分比
|
||||
String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比
|
||||
String syncReportPercent = getRatio(syncReportNumber, total); // 已同步上报库的参数项 百分比
|
||||
|
||||
// 组装数据 返回前端
|
||||
getData(notStartList, notStartNumber, notStartPercent);
|
||||
getData(collectingList, collectingNumber, collectingPercent);
|
||||
getData(submitList, submitNumber, submitPercent);
|
||||
getData(syncReportList, syncReportNumber, syncReportPercent);
|
||||
|
||||
});
|
||||
|
||||
result.put("dutyTerritory", dutyTerritoryNameList);
|
||||
result.put("notStart", notStartList);
|
||||
result.put("collecting", collectingList);
|
||||
result.put("submit", submitList);
|
||||
result.put("syncReport", syncReportList);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void getData(List<Map<String, Object>> data, double quantity, String percentage) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("quantity", quantity);
|
||||
map.put("percentage", percentage);
|
||||
data.add(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算百分比
|
||||
* @param d1
|
||||
* @param d2
|
||||
* @return
|
||||
*/
|
||||
private String getRatio(Double d1, Double d2) {
|
||||
if (d1 == null || d2 == null || d2 <= 0) {
|
||||
// return "0.00%";
|
||||
return "0.00"; // 前端不需要返百分号
|
||||
}
|
||||
NumberFormat percent = NumberFormat.getPercentInstance();
|
||||
percent.setMaximumFractionDigits(2);
|
||||
percent.setMinimumFractionDigits(2);
|
||||
String result = percent.format(d1/d2);
|
||||
return result.substring(0,result.lastIndexOf("%")); // 前端不需要返百分号
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-5
@@ -13,6 +13,7 @@ import com.jero.modules.system.util.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -51,7 +52,7 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
@AutoLog(value = "参数导出模板表-分页列表查询")
|
||||
@ApiOperation(value="参数导出模板表-分页列表查询", notes="参数导出模板表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
// @RequiresPermissions("report:exportTemplate:page")
|
||||
@RequiresPermissions("report:exportTemplate:page")
|
||||
public Result<?> queryPageList(ParamsExportTemplateEO paramsExportTemplateEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@@ -111,7 +112,7 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
@AutoLog(value = "参数导出模板表-添加")
|
||||
@ApiOperation(value="参数导出模板表-添加", notes="参数导出模板表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
// @RequiresPermissions("report:exportTemplate:add")
|
||||
@RequiresPermissions("report:exportTemplate:add")
|
||||
public Result<?> add(@Validated @RequestBody ParamsExportTemplateEO paramsExportTemplateEO) {
|
||||
boolean isSuccess = paramsExportTemplateEOService.add(paramsExportTemplateEO);
|
||||
if (isSuccess) {
|
||||
@@ -130,7 +131,7 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
@AutoLog(value = "参数导出模板表-编辑")
|
||||
@ApiOperation(value="参数导出模板表-编辑", notes="参数导出模板表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
// @RequiresPermissions("report:exportTemplate:edit")
|
||||
@RequiresPermissions("report:exportTemplate:edit")
|
||||
public Result<?> edit(@Validated @RequestBody ParamsExportTemplateEO paramsExportTemplateEO) {
|
||||
boolean isSuccess = paramsExportTemplateEOService.editById(paramsExportTemplateEO);
|
||||
if (isSuccess) {
|
||||
@@ -149,7 +150,7 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
@AutoLog(value = "参数导出模板表-通过id删除")
|
||||
@ApiOperation(value="参数导出模板表-通过id删除", notes="参数导出模板表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
// @RequiresPermissions("report:exportTemplate:delete")
|
||||
@RequiresPermissions("report:exportTemplate:delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
boolean isSuccess = paramsExportTemplateEOService.deleteById(id);
|
||||
if (isSuccess) {
|
||||
@@ -168,7 +169,7 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
@AutoLog(value = "参数导出模板表-批量删除")
|
||||
@ApiOperation(value="参数导出模板表-批量删除", notes="参数导出模板表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
// @RequiresPermissions("report:exportTemplate:deleteBatch")
|
||||
@RequiresPermissions("report:exportTemplate:deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
boolean isSuccess = paramsExportTemplateEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
if (isSuccess) {
|
||||
|
||||
+29
-12
@@ -20,11 +20,9 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -64,7 +62,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@AutoLog(value = "上报库参数项-表头中英文切换")
|
||||
@ApiOperation(value="上报库参数项-表头中英文切换", notes="上报库参数项-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
// @RequiresPermissions("report:detail:list")
|
||||
@RequiresPermissions("report:detail:list")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
|
||||
@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
@@ -80,7 +78,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@AutoLog(value = "上报库参数项-列表查询")
|
||||
@ApiOperation(value="上报库参数项-列表查询", notes="上报库参数项-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
// @RequiresPermissions("report:detail:list")
|
||||
@RequiresPermissions("report:detail:list")
|
||||
public Result<?> queryList(ParamsReportDetailEO paramsReportDetailEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="100") Integer pageSize,
|
||||
@@ -105,7 +103,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
|
||||
@ApiOperation(value = "上报库参数项-常规导出")
|
||||
@GetMapping(value = "/exportNormal")
|
||||
// @RequiresPermissions("report:detail:export:normal")
|
||||
@RequiresPermissions("report:detail:export:normal")
|
||||
public void exportNormal(ParamsReportDetailVO paramsReportDetailVO,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
@@ -121,7 +119,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@AutoLog(value = "上报库参数项-配置下拉选项(常规导出)")
|
||||
@ApiOperation(value="上报库参数项-配置下拉选项(常规导出)", notes="上报库参数项-配置下拉选项(常规导出)")
|
||||
@GetMapping(value = "/getConfigLabelList")
|
||||
// @RequiresPermissions("report:detail:export:normal")
|
||||
@RequiresPermissions("report:detail:export:normal")
|
||||
public Result<?> getConfigLableList(ParamsReportDetailVO paramsReportDetailVO) {
|
||||
List<Map<String, String>> configLabelList = paramsReportDetailEOService.getConfigLabelList(paramsReportDetailVO);
|
||||
return Result.OK(configLabelList);
|
||||
@@ -136,7 +134,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@AutoLog(value = "上报库参数项-配置下拉选项(自定义导出)")
|
||||
@ApiOperation(value="上报库参数项-配置下拉选项(自定义导出)", notes="上报库参数项-配置下拉选项(自定义导出)")
|
||||
@GetMapping(value = "/getConfigLabelListCustom")
|
||||
// @RequiresPermissions("report:detail:export:custom")
|
||||
@RequiresPermissions("report:detail:export:custom")
|
||||
public Result<?> getConfigLableListCustom(ParamsReportDetailVO paramsReportDetailVO) {
|
||||
List<Map<String, String>> configLabelList = paramsReportDetailEOService.getConfigLabelList(paramsReportDetailVO);
|
||||
return Result.OK(configLabelList);
|
||||
@@ -151,7 +149,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@AutoLog(value = "上报库参数项-导出模板下拉选项")
|
||||
@ApiOperation(value="上报库参数项-导出模板下拉选项", notes="上报库参数项-导出模板下拉选项")
|
||||
@GetMapping(value = "/getTemplateLabelList")
|
||||
// @RequiresPermissions("report:detail:export:custom")
|
||||
@RequiresPermissions("report:detail:export:custom")
|
||||
public Result<?> getTemplateLabelList() {
|
||||
List<Map<String, String>> templateLabelList = paramsReportDetailEOService.getTemplateLabelList();
|
||||
return Result.OK(templateLabelList);
|
||||
@@ -159,7 +157,7 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
|
||||
@ApiOperation(value = "上报库参数项-自定义导出")
|
||||
@GetMapping(value = "/exportCustom")
|
||||
// @RequiresPermissions("report:detail:export:custom")
|
||||
@RequiresPermissions("report:detail:export:custom")
|
||||
public void exportCustom(ParamsReportDetailVO paramsReportDetailVO,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
@@ -190,10 +188,29 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@AutoLog(value = "上报库参数配置-查看单个详情")
|
||||
@ApiOperation(value="上报库参数配置-查看单个详情", notes="上报库参数配置-查看单个详情")
|
||||
@GetMapping(value = "/getConfig")
|
||||
// @RequiresPermissions("report:detail:list")
|
||||
@RequiresPermissions("report:detail:list")
|
||||
public Result<ParamsReportConfigEO> getById(@RequestParam(name = "id") String id) {
|
||||
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(id);
|
||||
return Result.OK(paramsReportConfigEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂存
|
||||
*
|
||||
* @param paramsReportDetailVO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上报库参数项-保存")
|
||||
@ApiOperation(value="参数项收集清单-保存", notes="参数项收集清单-保存")
|
||||
@PostMapping(value = "/save")
|
||||
@RequiresPermissions("report:detail:export:save")
|
||||
public Result<?> save(@RequestBody ParamsReportDetailVO paramsReportDetailVO) {
|
||||
boolean isSuccess = paramsReportDetailEOService.save(paramsReportDetailVO.getConfigDataList(), paramsReportDetailVO.getParamsManifestId());
|
||||
if (isSuccess) {
|
||||
return Result.OK("保存成功!");
|
||||
} else {
|
||||
return Result.error("保存失败!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -13,6 +13,7 @@ import com.jero.modules.system.util.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -53,7 +54,7 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
@AutoLog(value = "上报库-分页列表查询")
|
||||
@ApiOperation(value="上报库-分页列表查询", notes="上报库-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
// @RequiresPermissions("params:report:page")
|
||||
@RequiresPermissions("params:report:page")
|
||||
public Result<?> queryPageList(ParamsReportEO paramsReportEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@@ -82,7 +83,7 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
||||
@AutoLog(value = "上报库-导出历史分页查询")
|
||||
@ApiOperation(value="上报库-导出历史分页查询", notes="上报库-导出历史分页查询")
|
||||
@GetMapping(value = "/exportHistoryPage")
|
||||
// @RequiresPermissions("params:report:history")
|
||||
@RequiresPermissions("params:report:history")
|
||||
public Result<?> exportHistoryPage(ParamsReportExportHistoryEO paramsReportExportHistoryEO,
|
||||
@RequestParam(name="cut") String cut,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
|
||||
+14
-5
@@ -40,13 +40,22 @@
|
||||
AND params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailEO.paramsName}),'%')
|
||||
</if>
|
||||
<if test="paramsReportDetailEO.certCategory !=null and paramsReportDetailEO.certCategory !=''">
|
||||
AND cert_category LIKE CONCAT(CONCAT('%',#{paramsReportDetailEO.certCategory}),'%')
|
||||
AND
|
||||
<foreach collection="paramsReportDetailEO.certCategory.split(',')" index="" item="item" open="(" close=")" separator="or">
|
||||
cert_category LIKE CONCAT(CONCAT('%',#{item}),'%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailEO.sdt !=null and paramsReportDetailEO.sdt !=''">
|
||||
AND sdt LIKE CONCAT(CONCAT('%',#{paramsReportDetailEO.sdt}),'%')
|
||||
AND sdt in
|
||||
<foreach collection="paramsReportDetailEO.sdt.split(',')" index="" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailEO.dre !=null and paramsReportDetailEO.dre !=''">
|
||||
AND dre LIKE CONCAT(CONCAT('%',#{paramsReportDetailEO.dre}),'%')
|
||||
AND dre in
|
||||
<foreach collection="paramsReportDetailEO.dre.split(',')" index="" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailEO.paramsManifestId !=null and paramsReportDetailEO.paramsManifestId !=''">
|
||||
AND params_manifest_id = #{paramsReportDetailEO.paramsManifestId}
|
||||
@@ -96,7 +105,7 @@
|
||||
select *
|
||||
from params_report_detail
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by nio_number asc, sync_time desc
|
||||
order by sync_time desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="listInfoForExport" resultType="java.util.LinkedHashMap">
|
||||
@@ -117,7 +126,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by prd.nio_number ASC
|
||||
order by prd.sync_time desc, prd.nio_number ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+7
@@ -23,4 +23,11 @@ public interface IParamsReportConfigDataEOService extends IService<ParamsReportC
|
||||
ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
|
||||
|
||||
List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId);
|
||||
|
||||
/**
|
||||
* 查询清单的所有配置数据
|
||||
* @param configIdList
|
||||
* @return
|
||||
*/
|
||||
List<ParamsReportConfigDataEO> queryListByConfigIdList(List<String> configIdList);
|
||||
}
|
||||
|
||||
+7
-1
@@ -1,7 +1,8 @@
|
||||
package com.jero.modules.cert.report.service;
|
||||
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -12,5 +13,10 @@ import java.util.List;
|
||||
*/
|
||||
public interface IParamsReportConfigEOService extends IService<ParamsReportConfigEO> {
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
* @param paramsManifestId
|
||||
* @return
|
||||
*/
|
||||
List<ParamsReportConfigEO> queryList(String paramsManifestId);
|
||||
}
|
||||
|
||||
+4
@@ -53,6 +53,10 @@ public interface IParamsReportDetailEOService extends IService<ParamsReportDetai
|
||||
// 自定义导出-word模板
|
||||
void exportCustomWord(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
// 自定义导出-excel模板
|
||||
void exportCustomExcel(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
// 保存
|
||||
boolean save(List<Map<String, Object>> configDataList, String paramsManifestId);
|
||||
|
||||
}
|
||||
|
||||
+6
-6
@@ -42,10 +42,10 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
// 模板名称唯一校验
|
||||
boolean isRepeat = verifyTemplateName(paramsExportTemplateEO.getTemplateName());
|
||||
if (isRepeat) {
|
||||
if (CutEnum.CN.equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
} else {
|
||||
if (CutEnum.EN.getValue().equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("Template Name already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
}
|
||||
}
|
||||
// 处理附件模板 修改文件表关联信息connect_id 一个文件
|
||||
@@ -84,10 +84,10 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
// 模板名称唯一校验
|
||||
boolean isRepeat = verifyTemplateName(paramsExportTemplateEO.getTemplateName());
|
||||
if (isRepeat) {
|
||||
if (CutEnum.CN.equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
} else {
|
||||
if (CutEnum.EN.getValue().equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("Template Name already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.cert.report.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO;
|
||||
@@ -38,4 +39,20 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl<ParamsRepor
|
||||
public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) {
|
||||
return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询清单的所有配置数据
|
||||
* @param configIdList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ParamsReportConfigDataEO> queryListByConfigIdList(List<String> configIdList) {
|
||||
if (CollectionUtil.isNotEmpty(configIdList)) {
|
||||
LambdaQueryWrapper<ParamsReportConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(ParamsReportConfigDataEO::getParamsConfigId, configIdList);
|
||||
return list(queryWrapper);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+171
-15
@@ -20,6 +20,7 @@ import com.jero.modules.cert.collect.enums.CollectManifestStateEnum;
|
||||
import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum;
|
||||
import com.jero.modules.cert.collect.vo.ParamsConfigDataVO;
|
||||
import com.jero.modules.cert.report.entity.*;
|
||||
import com.jero.modules.cert.report.enums.ExportTemplateStateEnum;
|
||||
import com.jero.modules.cert.report.enums.ExportTypeEnum;
|
||||
import com.jero.modules.cert.report.mapper.ParamsReportDetailEOMapper;
|
||||
import com.jero.modules.cert.report.service.*;
|
||||
@@ -36,11 +37,14 @@ import com.jero.modules.system.service.ISysDictItemService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.util.HSSFColor;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.*;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.docx4j.Docx4J;
|
||||
import org.docx4j.openpackaging.exceptions.Docx4JException;
|
||||
import org.docx4j.openpackaging.packages.SpreadsheetMLPackage;
|
||||
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -496,9 +500,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
OutputStream os = null;
|
||||
OutputStream excelOS = null;
|
||||
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||
String fileOriName = "上报库参数项常规导出信息";
|
||||
String fileOriName = "常规导出";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
fileOriName = "Params report normal data";
|
||||
fileOriName = "normal";
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getExportName())) {
|
||||
fileOriName = paramsReportDetailVO.getExportName();
|
||||
@@ -513,7 +517,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
try{
|
||||
String fileName = fileOriName + ".xlsx";
|
||||
// 设置表格相关属性
|
||||
XSSFSheet sheetItems = workbook.createSheet("上报库参数项信息");
|
||||
String sheetName = "参数项信息";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
sheetName = "Params data";
|
||||
}
|
||||
XSSFSheet sheetItems = workbook.createSheet(sheetName);
|
||||
String[] titles = getWorkbookTitleForExport(paramsReportDetailVO); // 获取表头
|
||||
|
||||
String[] headers = titles[1].split(",");
|
||||
@@ -547,7 +555,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
cell.setCellValue(text);
|
||||
cell.setCellStyle(cellStyle1);
|
||||
// 设置单元格宽度
|
||||
if("参数值".equals(headers[i])) {
|
||||
String ParamsValues = "参数值";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
ParamsValues = "Params Values";
|
||||
}
|
||||
if(ParamsValues.equals(headers[i])) {
|
||||
sheetItems.setColumnWidth(i, 80 * 256);
|
||||
} else {
|
||||
sheetItems.setColumnWidth(i, 20 * 256);
|
||||
@@ -579,7 +591,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
//下载关联文件内容
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + "导出文件");
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
|
||||
String repFileName = fileName.replaceAll("/","_");
|
||||
@@ -617,7 +633,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
fis.close(); // 先开后关
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
throw new JeroBootException("Failed to download file, please try again");
|
||||
} else {
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
}
|
||||
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
IOUtils.closeQuietly(excelOS);
|
||||
@@ -654,7 +675,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
public List<Map<String, String>> getTemplateLabelList() {
|
||||
// 查询所有导出模板
|
||||
LambdaQueryWrapper<ParamsExportTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.orderByDesc(ParamsExportTemplateEO::getCreateTime);
|
||||
queryWrapper.eq(ParamsExportTemplateEO::getState, ExportTemplateStateEnum.ENABLE.getValue())
|
||||
.orderByDesc(ParamsExportTemplateEO::getCreateTime);
|
||||
List<ParamsExportTemplateEO> paramsExportTemplateEOList = paramsExportTemplateEOService.list(queryWrapper);
|
||||
|
||||
List<Map<String, String>> templateLabelList = new ArrayList<>();
|
||||
@@ -674,9 +696,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
public void exportCustomWord(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
OutputStream wordOS = null;
|
||||
String fileOriName = "上报库参数项自定义导出信息";
|
||||
String fileOriName = "自定义导出";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
fileOriName = "Params report custom data";
|
||||
fileOriName = "custom";
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getExportName())) {
|
||||
fileOriName = paramsReportDetailVO.getExportName();
|
||||
@@ -708,7 +730,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(2).get("fileListAll");
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + "导出文件");
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
|
||||
// 拿取模板
|
||||
@@ -761,7 +787,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
throw new JeroBootException("Failed to download file, please try again");
|
||||
} else {
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
}
|
||||
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
@@ -795,6 +825,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
// 查询导出数据
|
||||
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
||||
HashMap<String, String> params = (HashMap<String, String>) allParamsInfoList.get(0);
|
||||
List<Map<String, Object>> imgListAll = (List<Map<String, Object>>) allParamsInfoList.get(1).get("imgListAll");
|
||||
|
||||
String templateUrl = "";
|
||||
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
||||
@@ -810,7 +841,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(2).get("fileListAll");
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + "导出文件");
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
|
||||
// 拿取模板
|
||||
@@ -820,7 +855,14 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
InputStream wordTemplate = CosBootUtil.download(templateUrl);
|
||||
// com.qcloud.cos.utils.IOUtils.copy(wordTemplate, wordOS);
|
||||
|
||||
ExcelUtil.variableReplace(wordTemplate, wordOS, params);
|
||||
// 替换占位符内容
|
||||
// docx4j方式
|
||||
InputStream excelTemplate = CosBootUtil.download(templateUrl);
|
||||
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.load(wordTemplate);
|
||||
Workbook workbook = WorkbookFactory.create(excelTemplate);
|
||||
ExcelUtil.replacePictureBatchPOI(workbook, pkg, imgListAll, params);
|
||||
ExcelUtil.variableReplace(pkg, params);
|
||||
pkg.save(wordOS);
|
||||
|
||||
}
|
||||
|
||||
@@ -851,13 +893,30 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
os.write(len2);
|
||||
}
|
||||
|
||||
// 添加导出历史
|
||||
String uploadFileName = fileOriName + ".zip";
|
||||
InputStream uploadFileio = new FileInputStream(new File(fileNowPath+".zip"));
|
||||
MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/report", "", CutEnum.CN.getValue()); // 上传导出的压缩包
|
||||
ParamsReportExportHistoryEO paramsReportExportHistoryEO = new ParamsReportExportHistoryEO();
|
||||
paramsReportExportHistoryEO.setExportType(ExportTypeEnum.CUSTOM.getValue());
|
||||
paramsReportExportHistoryEO.setExportFileId(ossFile.getId());
|
||||
paramsReportExportHistoryEO.setParamsManifestId(paramsReportDetailVO.getParamsManifestId());
|
||||
paramsReportExportHistoryEO.setExportTime(new Date());
|
||||
paramsReportExportHistoryEOService.add(paramsReportExportHistoryEO);
|
||||
|
||||
uploadFileio.close();
|
||||
os.flush();
|
||||
os.close(); // 后开先关
|
||||
fis.close(); // 先开后关
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
throw new JeroBootException("Failed to download file, please try again");
|
||||
} else {
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
}
|
||||
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
@@ -1285,7 +1344,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
if (Date.class.equals(field.getType())) {
|
||||
Date date = (Date) o;
|
||||
String pattern = "";
|
||||
if ("deadline".equals(varName)) {
|
||||
if ("syncTime".equals(varName)) {
|
||||
pattern = "yyyy-MM-dd";
|
||||
} else {
|
||||
pattern = "yyyy-MM-dd HH:mm:ss";
|
||||
@@ -1309,6 +1368,103 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean save(List<Map<String, Object>> configDataList, String paramsManifestId) {
|
||||
List<ParamsReportConfigDataEO> newConfigDataEOList = new ArrayList<>();
|
||||
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsReportConfigIdList = paramsReportConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = paramsReportConfigDataEOService.queryListByConfigIdList(paramsReportConfigIdList); // 查询所有配置数据
|
||||
|
||||
// 处理数据
|
||||
for (Map<String, Object> map : configDataList) {
|
||||
String paramsCollectManifestId = (String) map.get("id");
|
||||
|
||||
// 添加配置数据
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||
if ("id".equals(entry.getKey())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 取值
|
||||
String paramsReportConfigEOId = entry.getKey();
|
||||
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
|
||||
// 无法转ParamsConfigDataVO(遍历会出现该异常 : LinkedHashMap cannot be cast to ParamsConfigDataVO)
|
||||
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
|
||||
|
||||
// 判断是新增还是修改
|
||||
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
|
||||
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
|
||||
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
|
||||
|
||||
}
|
||||
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
|
||||
if (CollectionUtil.isNotEmpty(configDataVOList)) {
|
||||
for (Map<String, Object> paramsConfigDataVO : configDataVOList) {
|
||||
String type = (String) paramsConfigDataVO.get("type");
|
||||
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
||||
|
||||
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
||||
paramsReportConfigDataEO.setTextData(dataValue);
|
||||
|
||||
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
||||
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
||||
paramsReportConfigDataEO.setPullData(dataValue);
|
||||
|
||||
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
|
||||
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件
|
||||
// 处理文件connectId
|
||||
String[] fileIdList = dataValue.split(",");
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
List<OSSFile> updateFileList = new ArrayList<>();
|
||||
for (int i = 0; i < fileIdList.length; i++) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileIdList[i]);
|
||||
ossFile.setConnectId(connectId);
|
||||
updateFileList.add(ossFile);
|
||||
}
|
||||
ossFileService.updateBatchById(updateFileList);
|
||||
dataValue = connectId;
|
||||
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
|
||||
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
//修改文件表关联信息connect_id
|
||||
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||
for (String fileId : dataValue.split(",")) {
|
||||
OSSFile ossFile = new OSSFile();
|
||||
ossFile.setId(fileId);
|
||||
ossFile.setConnectId(connectId);
|
||||
oSSFileList.add(ossFile);
|
||||
}
|
||||
ossFileService.updateFileInfo(oSSFileList);
|
||||
dataValue = connectId;
|
||||
}
|
||||
}
|
||||
paramsReportConfigDataEO.setFileConnectId(dataValue);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
newConfigDataEOList.add(paramsReportConfigDataEO);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量更新
|
||||
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
||||
}
|
||||
|
||||
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
|
||||
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
|
||||
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()))
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(configDataEOList)) {
|
||||
return configDataEOList.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体对象转成Map
|
||||
* @param obj 实体对象
|
||||
|
||||
+6
@@ -3,6 +3,9 @@ package com.jero.modules.cert.report.vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class ParamsReportDetailVO {
|
||||
|
||||
@@ -37,6 +40,9 @@ public class ParamsReportDetailVO {
|
||||
@ApiModelProperty(value = "对应参数模板发布版本")
|
||||
private Integer paramsTemplatePublishVersion;
|
||||
|
||||
@ApiModelProperty(value = "保存专用")
|
||||
private List<Map<String, Object>> configDataList; // 保存专用
|
||||
|
||||
// 导出通用
|
||||
private String cut;
|
||||
private String exportName;
|
||||
|
||||
+12
-12
@@ -98,12 +98,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
String nioNumber = paramsInfoEO.getNioNumber();
|
||||
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格!");
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格!");
|
||||
} else {
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),left slash,spaces!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,12 +176,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
|
||||
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格!");
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格!");
|
||||
} else {
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),left slash,spaces!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1134,12 +1134,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
countError += (int)resultMap.get("countError");
|
||||
if (StringUtils.isNotEmpty(dto.getNioNumber())) {
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格;";
|
||||
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格;";
|
||||
} else {
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),left slash,spaces;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1389,12 +1389,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
countError += (int)resultMap.get("countError");
|
||||
if (StringUtils.isNotEmpty(ccDto.getNioNumber())) {
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/ ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格;";
|
||||
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-),左斜杠,空格;";
|
||||
} else {
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),left slash,spaces;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
+1
-1
@@ -534,7 +534,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
sysUser.setUsername(ppEmployee.getWorker_user_id());
|
||||
sysUser.setRealname(ppEmployee.getFormatted_name());
|
||||
sysUser.setStatus("Active".equals(ppEmployee.getEmployee_status())? CommonConstant.USER_UNFREEZE : CommonConstant.USER_FREEZE);
|
||||
sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1);
|
||||
// sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1);
|
||||
sysUser.setThirdId(ppEmployee.getWorker_user_id());
|
||||
sysUser.setWorkNo(ppEmployee.getEmployee_id());
|
||||
sysUser.setWorkerType("Employee".equals(ppEmployee.getWorker_type())? CommonConstant.WORKER_TYPE_1 : CommonConstant.WORKER_TYPE_2);
|
||||
|
||||
@@ -201,6 +201,25 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--中文分词工具包-->
|
||||
<dependency>
|
||||
<groupId>com.janeluo</groupId>
|
||||
<artifactId>ikanalyzer</artifactId>
|
||||
<version>2012_u6</version>
|
||||
</dependency>
|
||||
<!--HTML解析器-->
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.11.3</version>
|
||||
</dependency>
|
||||
<!--语言处理-->
|
||||
<dependency>
|
||||
<groupId>com.hankcs</groupId>
|
||||
<artifactId>hanlp</artifactId>
|
||||
<version>portable-1.7.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
package com.jero.modules.compare.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "文档对比信息表")
|
||||
@RestController
|
||||
@RequestMapping("/compare/sarFileCompareInfo")
|
||||
@Slf4j
|
||||
public class SarFileCompareInfoController extends JeroController<SarFileCompareInfo, ISarFileCompareInfoService> {
|
||||
@Autowired
|
||||
private ISarFileCompareInfoService sarFileCompareInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-分页列表查询")
|
||||
@ApiOperation(value = "文档对比信息表-分页列表查询", notes = "文档对比信息表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(SarFileCompareInfo sarFileCompareInfo,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<SarFileCompareInfo> queryWrapper = QueryGenerator.initQueryWrapper(sarFileCompareInfo, req.getParameterMap());
|
||||
Page<SarFileCompareInfo> page = new Page<SarFileCompareInfo>(pageNo, pageSize);
|
||||
IPage<SarFileCompareInfo> pageList = sarFileCompareInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-列表查询")
|
||||
@ApiOperation(value = "文档对比信息表-列表查询", notes = "文档对比信息表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SarFileCompareInfo>> queryList() {
|
||||
List<SarFileCompareInfo> list = sarFileCompareInfoService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-添加")
|
||||
@ApiOperation(value = "文档对比信息表-添加", notes = "文档对比信息表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody SarFileCompareInfo sarFileCompareInfo) {
|
||||
sarFileCompareInfoService.add(sarFileCompareInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-编辑")
|
||||
@ApiOperation(value = "文档对比信息表-编辑", notes = "文档对比信息表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody SarFileCompareInfo sarFileCompareInfo) {
|
||||
sarFileCompareInfoService.editById(sarFileCompareInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-通过id删除")
|
||||
@ApiOperation(value = "文档对比信息表-通过id删除", notes = "文档对比信息表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
sarFileCompareInfoService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-批量删除")
|
||||
@ApiOperation(value = "文档对比信息表-批量删除", notes = "文档对比信息表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.sarFileCompareInfoService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-通过id查询")
|
||||
@ApiOperation(value = "文档对比信息表-通过id查询", notes = "文档对比信息表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
SarFileCompareInfo sarFileCompareInfo = sarFileCompareInfoService.queryById(id);
|
||||
if (sarFileCompareInfo == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(sarFileCompareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param sarFileCompareInfo
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, SarFileCompareInfo sarFileCompareInfo) {
|
||||
return super.exportXls(request, sarFileCompareInfo, SarFileCompareInfo.class, "文档对比信息表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, SarFileCompareInfo.class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发起文档对比
|
||||
*
|
||||
* @param leftStandard
|
||||
* @param rightStandard
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发起文档对比")
|
||||
@ApiOperation(value = "发起文档对比", notes = "发起文档对比")
|
||||
@RequestMapping(value = "/fullTextComparison", method = RequestMethod.POST)
|
||||
public Result<?> fullTextComparison(@RequestBody JSONObject json) {
|
||||
try {
|
||||
String leftStandard = json.get("leftStandard").toString();
|
||||
String rightStandard = json.get("rightStandard").toString();
|
||||
String remark = "";
|
||||
if (json.get("remark") != null) {
|
||||
remark = json.get("remark").toString();
|
||||
}
|
||||
Map<String, Object> resMap = sarFileCompareInfoService.fullTextComparison(leftStandard, rightStandard, remark);
|
||||
return Result.OK(resMap);
|
||||
} catch (Exception ex) {
|
||||
log.error("发起文档对比失败:" + ex.getMessage());
|
||||
return Result.OK("发起文档对比失败!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.compare.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档对比信息条款表")
|
||||
@RestController
|
||||
@RequestMapping("/compare/sarFileCompareItem")
|
||||
@Slf4j
|
||||
public class SarFileCompareItemController extends JeroController<SarFileCompareItem, ISarFileCompareItemService> {
|
||||
@Autowired
|
||||
private ISarFileCompareItemService sarFileCompareItemService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-分页列表查询")
|
||||
@ApiOperation(value="文档对比信息条款表-分页列表查询", notes="文档对比信息条款表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(SarFileCompareItem sarFileCompareItem,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<SarFileCompareItem> queryWrapper = QueryGenerator.initQueryWrapper(sarFileCompareItem, req.getParameterMap());
|
||||
Page<SarFileCompareItem> page = new Page<SarFileCompareItem>(pageNo, pageSize);
|
||||
IPage<SarFileCompareItem> pageList = sarFileCompareItemService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-列表查询")
|
||||
@ApiOperation(value="文档对比信息条款表-列表查询", notes="文档对比信息条款表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SarFileCompareItem>> queryList() {
|
||||
List<SarFileCompareItem> list = sarFileCompareItemService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-添加")
|
||||
@ApiOperation(value="文档对比信息条款表-添加", notes="文档对比信息条款表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody SarFileCompareItem sarFileCompareItem) {
|
||||
sarFileCompareItemService.add(sarFileCompareItem);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-编辑")
|
||||
@ApiOperation(value="文档对比信息条款表-编辑", notes="文档对比信息条款表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody SarFileCompareItem sarFileCompareItem) {
|
||||
sarFileCompareItemService.editById(sarFileCompareItem);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-通过id删除")
|
||||
@ApiOperation(value="文档对比信息条款表-通过id删除", notes="文档对比信息条款表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
sarFileCompareItemService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-批量删除")
|
||||
@ApiOperation(value="文档对比信息条款表-批量删除", notes="文档对比信息条款表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.sarFileCompareItemService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-通过id查询")
|
||||
@ApiOperation(value="文档对比信息条款表-通过id查询", notes="文档对比信息条款表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
SarFileCompareItem sarFileCompareItem = sarFileCompareItemService.queryById(id);
|
||||
if(sarFileCompareItem==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(sarFileCompareItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param sarFileCompareItem
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, SarFileCompareItem sarFileCompareItem) {
|
||||
return super.exportXls(request, sarFileCompareItem, SarFileCompareItem.class, "文档对比信息条款表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, SarFileCompareItem.class);
|
||||
}
|
||||
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.jero.modules.compare.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("sar_file_compare_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="sar_file_compare_info对象", description="文档对比信息表")
|
||||
public class SarFileCompareInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文档1*/
|
||||
@Excel(name = "文档1", width = 15)
|
||||
@ApiModelProperty(value = "文档1")
|
||||
private String fileIdLeft;
|
||||
|
||||
/**编号1*/
|
||||
@Excel(name = "编号1", width = 15)
|
||||
@ApiModelProperty(value = "编号1")
|
||||
private String serialNumberLeft;
|
||||
|
||||
/**标题1*/
|
||||
@Excel(name = "标题1", width = 15)
|
||||
@ApiModelProperty(value = "标题1")
|
||||
private String titleLeft;
|
||||
|
||||
/**文本状态1*/
|
||||
@Excel(name = "文本状态1", width = 15)
|
||||
@ApiModelProperty(value = "文本状态1")
|
||||
private String fileTypeLeft;
|
||||
|
||||
/**文件名称1*/
|
||||
@Excel(name = "文件名称1", width = 15)
|
||||
@ApiModelProperty(value = "文件名称1")
|
||||
private String fileNameLeft;
|
||||
|
||||
/**文档2*/
|
||||
@Excel(name = "文档2", width = 15)
|
||||
@ApiModelProperty(value = "文档2")
|
||||
private String fileIdRight;
|
||||
|
||||
/**编号2*/
|
||||
@Excel(name = "编号2", width = 15)
|
||||
@ApiModelProperty(value = "编号2")
|
||||
private String serialNumberRight;
|
||||
|
||||
/**标题2*/
|
||||
@Excel(name = "标题2", width = 15)
|
||||
@ApiModelProperty(value = "标题2")
|
||||
private String titleRight;
|
||||
|
||||
/**文本状态2*/
|
||||
@Excel(name = "文本状态2", width = 15)
|
||||
@ApiModelProperty(value = "文本状态2")
|
||||
private String fileTypeRight;
|
||||
|
||||
/**文件名称2*/
|
||||
@Excel(name = "文件名称2", width = 15)
|
||||
@ApiModelProperty(value = "文件名称2")
|
||||
private String fileNameRight;
|
||||
|
||||
/**发布状态*/
|
||||
@Excel(name = "发布状态", width = 15)
|
||||
@ApiModelProperty(value = "发布状态")
|
||||
private String releaseState;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**评论*/
|
||||
@Excel(name = "评论", width = 15)
|
||||
@ApiModelProperty(value = "评论")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.jero.modules.compare.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("sar_file_compare_item")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="sar_file_compare_item对象", description="文档对比信息条款表")
|
||||
public class SarFileCompareItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文档对比信息id*/
|
||||
@Excel(name = "文档对比信息id", width = 15)
|
||||
@ApiModelProperty(value = "文档对比信息id")
|
||||
private String infoId;
|
||||
|
||||
/**条款id*/
|
||||
@Excel(name = "条款id", width = 15)
|
||||
@ApiModelProperty(value = "条款id")
|
||||
private String itemsId;
|
||||
|
||||
/**条款名称*/
|
||||
@Excel(name = "条款名称", width = 15)
|
||||
@ApiModelProperty(value = "条款名称")
|
||||
private String itemsName;
|
||||
|
||||
/**条款编号*/
|
||||
@Excel(name = "条款编号", width = 15)
|
||||
@ApiModelProperty(value = "条款编号")
|
||||
private String itemsNum;
|
||||
|
||||
/**条款正文*/
|
||||
@Excel(name = "条款正文", width = 15)
|
||||
@ApiModelProperty(value = "条款正文")
|
||||
private String itemsText;
|
||||
|
||||
/**条款展示编号*/
|
||||
@Excel(name = "条款展示编号", width = 15)
|
||||
@ApiModelProperty(value = "条款展示编号")
|
||||
private Integer itemsDisplayNum;
|
||||
|
||||
/**目标位置*/
|
||||
@Excel(name = "目标位置", width = 15)
|
||||
@ApiModelProperty(value = "目标位置")
|
||||
private Integer targetStand;
|
||||
|
||||
/**条款位置*/
|
||||
@Excel(name = "条款位置", width = 15)
|
||||
@ApiModelProperty(value = "条款位置")
|
||||
private String leftOrRight;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.jero.modules.compare.enums;
|
||||
|
||||
public enum ValidFlagEnum {
|
||||
VALID_TRUE(0, "有效"), VALID_FALSE(1, "无效");
|
||||
|
||||
private int value;
|
||||
private String lable;
|
||||
|
||||
private ValidFlagEnum(int value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.compare.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SarFileCompareInfoMapper extends BaseMapper<SarFileCompareInfo> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.compare.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SarFileCompareItemMapper extends BaseMapper<SarFileCompareItem> {
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?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="com.jero.modules.compare.mapper.SarFileCompareInfoMapper">
|
||||
<resultMap id="SarFileCompareInfoResultMap" type="com.jero.modules.compare.entity.SarFileCompareInfo">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="file_id_left" property="fileIdLeft" />
|
||||
<result column="serial_number_left" property="serialNumberLeft" />
|
||||
<result column="title_left" property="titleLeft" />
|
||||
<result column="file_type_left" property="fileTypeLeft" />
|
||||
<result column="file_name_left" property="fileNameLeft" />
|
||||
<result column="file_id_right" property="fileIdRight" />
|
||||
<result column="serial_number_right" property="serialNumberRight" />
|
||||
<result column="title_right" property="titleRight" />
|
||||
<result column="file_type_right" property="fileTypeRight" />
|
||||
<result column="file_name_right" property="fileNameRight" />
|
||||
<result column="release_state" property="releaseState" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="comments" property="comments" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?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="com.jero.modules.compare.mapper.SarFileCompareItemMapper">
|
||||
<resultMap id="SarFileCompareItemResultMap" type="com.jero.modules.compare.entity.SarFileCompareItem">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="info_id" property="infoId" />
|
||||
<result column="items_id" property="itemsId" />
|
||||
<result column="items_name" property="itemsName" />
|
||||
<result column="items_num" property="itemsNum" />
|
||||
<result column="items_text" property="itemsText" />
|
||||
<result column="items_display_num" property="itemsDisplayNum" />
|
||||
<result column="target_stand" property="targetStand" />
|
||||
<result column="left_or_right" property="leftOrRight" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.jero.modules.compare.service;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ISarFileCompareInfoService extends IService<SarFileCompareInfo> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
void add(SarFileCompareInfo sarFileCompareInfo);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
void editById(SarFileCompareInfo sarFileCompareInfo);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SarFileCompareInfo queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SarFileCompareInfo> queryList();
|
||||
|
||||
/**
|
||||
* 发起全文对比
|
||||
*
|
||||
* @param leftStandard
|
||||
* @param rightStandard
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> fullTextComparison(String leftStandard, String rightStandard, String remark) throws Exception;
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.compare.service;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ISarFileCompareItemService extends IService<SarFileCompareItem> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
void add(SarFileCompareItem sarFileCompareItem);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
void editById(SarFileCompareItem sarFileCompareItem);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SarFileCompareItem queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SarFileCompareItem> queryList();
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
package com.jero.modules.compare.service.impl;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.jero.modules.compare.enums.ValidFlagEnum;
|
||||
import com.jero.modules.compare.mapper.SarFileCompareInfoMapper;
|
||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
import com.jero.modules.compare.utils.CompHanLPUtils;
|
||||
import com.jero.modules.compare.utils.treeTool.Tree;
|
||||
import com.jero.modules.compare.utils.treeTool.TreeNode;
|
||||
import com.jero.modules.docTranslation.enums.ReleaseConditionEnum;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
||||
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
||||
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
||||
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInfoMapper, SarFileCompareInfo> implements ISarFileCompareInfoService {
|
||||
|
||||
@Autowired
|
||||
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private IFileSplitItemsEOService sarFileSplitItemsEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISarFileSplitInfoService sarFileSplitInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarFileCompareItemService sarFileCompareItemService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(SarFileCompareInfo sarFileCompareInfo) {
|
||||
Date now = new Date();
|
||||
sarFileCompareInfo.setCreateTime(now);
|
||||
sarFileCompareInfo.setUpdateTime(now);
|
||||
save(sarFileCompareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(SarFileCompareInfo sarFileCompareInfo) {
|
||||
Date now = new Date();
|
||||
sarFileCompareInfo.setUpdateTime(now);
|
||||
saveOrUpdate(sarFileCompareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SarFileCompareInfo queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SarFileCompareInfo> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 全文对比
|
||||
*
|
||||
* @param leftStandard
|
||||
* @param rightStandard
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, Object> fullTextComparison(String leftStandard, String rightStandard, String remark) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
List<Map<String, Object>> leftMapList = fullTextComparePackageData(leftStandard);
|
||||
List<Map<String, Object>> rightMapList = fullTextComparePackageData(rightStandard);
|
||||
List<Map<String, Object>> resLeftMapList = null;
|
||||
List<Map<String, Object>> resRightMapList = null;
|
||||
if (leftMapList != null && !leftMapList.isEmpty() && rightMapList != null && !rightMapList.isEmpty()) {
|
||||
//双重循环找到相似度最高的条款做关联
|
||||
for (int i = 0; i < leftMapList.size(); i++) {
|
||||
String leftTxt = leftMapList.get(i).get("itemsText").toString();
|
||||
//定义初始化的相似度
|
||||
double compareSimilarity = 0.0;
|
||||
if (!leftTxt.isEmpty()) {
|
||||
for (int j = 0; j < rightMapList.size(); j++) {
|
||||
String rightTxt = rightMapList.get(j).get("itemsText").toString();
|
||||
double similarity = CompHanLPUtils.findSimilarity(leftTxt.trim(), rightTxt.trim());
|
||||
//如果相似度超过0.6 并且该相似度比之前的相似度还高,那么该条款目前相似度最高
|
||||
if (similarity >= 0.6 && compareSimilarity < similarity) {
|
||||
compareSimilarity = similarity;
|
||||
leftMapList.get(i).put("targetStand", j);
|
||||
if (rightMapList.get(j).get("targetStand") == null) {
|
||||
rightMapList.get(j).put("targetStand", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//循环对比结束,开始填充html代码
|
||||
resLeftMapList = writeResultHtml(leftMapList);
|
||||
resultMap.put("resLeftMapList", resLeftMapList);
|
||||
resRightMapList = writeResultHtml(rightMapList);
|
||||
resultMap.put("resRightMapList", resRightMapList);
|
||||
}
|
||||
//往全文比对历史表中添加数据
|
||||
addStandCompareHis(leftStandard, rightStandard, remark, resLeftMapList, resRightMapList);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装条款数据
|
||||
*
|
||||
* @param standardId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Map<String, Object>> fullTextComparePackageData(String standardId) throws Exception {
|
||||
List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
|
||||
//调用查询条款接口
|
||||
SarFileSplitItemsEOPage sarFileSplitItemsEOPage = new SarFileSplitItemsEOPage();
|
||||
sarFileSplitItemsEOPage.setInfoId(standardId);
|
||||
sarFileSplitItemsEOPage.setValidFlag(String.valueOf(ValidFlagEnum.VALID_TRUE.getValue()));
|
||||
sarFileSplitItemsEOPage.setOrderBy("SAR_FILE_SPLIT_MENU.display_seq asc");
|
||||
|
||||
if (StringUtils.isNotEmpty(sarFileSplitItemsEOPage.getMenuId())) {
|
||||
List<SarFileSplitMenuEO> sarFileSplitMenuEOList = sarFileSplitMenuEOService.queryByList(new SarFileSplitMenuEOPage());
|
||||
Tree tree = new Tree<>(sarFileSplitMenuEOList);
|
||||
TreeNode treeNode = tree.getTreeNode(sarFileSplitItemsEOPage.getMenuId());
|
||||
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
menuIds.add(treeNode.getNodeId());
|
||||
for (TreeNode node : treeNode.getAllChildren()) {
|
||||
menuIds.add(node.getNodeId());
|
||||
}
|
||||
sarFileSplitItemsEOPage.setMenuIdList(menuIds);
|
||||
}
|
||||
|
||||
|
||||
List<SarFileSplitItemsEO> itemList = sarFileSplitItemsEOService.queryByList(sarFileSplitItemsEOPage);
|
||||
if (itemList != null && !itemList.isEmpty()) {
|
||||
for (SarFileSplitItemsEO sarFileSplitItemsEO : itemList) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("itemsNum", sarFileSplitItemsEO.getItemsNum());
|
||||
map.put("itemsName", sarFileSplitItemsEO.getItemsName());
|
||||
map.put("itemsId", sarFileSplitItemsEO.getId());
|
||||
//(内容1\n内容2\n格式)
|
||||
String txt = "";
|
||||
//调用条款内容详情表查询条款内容
|
||||
SarFileSplitItemsValEOPage sarFileSplitItemsValEOPage = new SarFileSplitItemsValEOPage();
|
||||
sarFileSplitItemsValEOPage.setItemId(sarFileSplitItemsEO.getId());
|
||||
sarFileSplitItemsValEOPage.setValidFlag(String.valueOf(ValidFlagEnum.VALID_TRUE.getValue()));
|
||||
sarFileSplitItemsValEOPage.setType("TEXT");
|
||||
List<SarFileSplitItemsValEO> leftValList = sarFileSplitItemsValEOService.queryByList(sarFileSplitItemsValEOPage);
|
||||
if (leftValList != null && !leftValList.isEmpty()) {
|
||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : leftValList) {
|
||||
txt += "<p>" + sarFileSplitItemsValEO.getItemContent() + "</p>";
|
||||
}
|
||||
}
|
||||
map.put("itemsText", txt);
|
||||
map.put("targetStand", null);
|
||||
map.put("menuId", sarFileSplitItemsEO.getMenuId());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充html代码,返回结果
|
||||
*
|
||||
* @param resMapList
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> writeResultHtml(List<Map<String, Object>> resMapList) throws Exception {
|
||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||
for (Map resMap : resMapList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Object itemsNum = resMap.get("itemsNum");
|
||||
if (null != itemsNum) {
|
||||
stringBuilder.append(itemsNum.toString());
|
||||
} else {
|
||||
stringBuilder.append("undefined");
|
||||
}
|
||||
stringBuilder.append(" ");
|
||||
Object itemsName = resMap.get("itemsName");
|
||||
if (null != itemsName) {
|
||||
stringBuilder.append(itemsName.toString());
|
||||
} else {
|
||||
stringBuilder.append("undefined");
|
||||
}
|
||||
stringBuilder.append("<div>");
|
||||
|
||||
Object itemsTxt = resMap.get("itemsTxt");
|
||||
if (null != itemsTxt) {
|
||||
stringBuilder.append(itemsTxt.toString());
|
||||
}
|
||||
stringBuilder.append("</div>");
|
||||
map.put("resultHtml", stringBuilder.toString());
|
||||
Object targetStand = resMap.get("targetStand");
|
||||
int targetStandInt = 0;
|
||||
if (null != targetStand) {
|
||||
targetStand = (Integer) targetStand;
|
||||
}
|
||||
map.put("targetStand", targetStand);
|
||||
Object itemsId = resMap.get("itemsId");
|
||||
String itemsIdStr = "undefined";
|
||||
if (null != itemsId) {
|
||||
itemsIdStr = itemsId.toString();
|
||||
}
|
||||
map.put("itemsId", itemsIdStr);
|
||||
resultMapList.add(map);
|
||||
}
|
||||
return resMapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存比对历史
|
||||
*
|
||||
* @param leftStandId
|
||||
* @param rightStandId
|
||||
* @param remark
|
||||
* @param resLeftMapList
|
||||
* @param resRightMapList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void addStandCompareHis(String leftStandId, String rightStandId, String remark, List<Map<String, Object>> resLeftMapList, List<Map<String, Object>> resRightMapList) throws Exception {
|
||||
SarFileSplitInfoEO leftInfo = sarFileSplitInfoEOService.queryById(leftStandId);
|
||||
SarFileSplitInfoEO rightInfo = sarFileSplitInfoEOService.queryById(rightStandId);
|
||||
//保存标准比对历史表数据
|
||||
SarFileCompareInfo sarFileCompareInfo = new SarFileCompareInfo();
|
||||
sarFileCompareInfo.setId(UUID.randomUUID().toString());
|
||||
sarFileCompareInfo.setFileIdLeft(leftInfo.getFileId());
|
||||
sarFileCompareInfo.setFileNameLeft(leftInfo.getFileName());
|
||||
sarFileCompareInfo.setFileTypeLeft(leftInfo.getFileType());
|
||||
sarFileCompareInfo.setSerialNumberLeft(leftInfo.getSerialNumber());
|
||||
|
||||
sarFileCompareInfo.setFileIdRight(rightInfo.getFileId());
|
||||
sarFileCompareInfo.setFileNameRight(rightInfo.getFileName());
|
||||
sarFileCompareInfo.setFileTypeRight(rightInfo.getFileType());
|
||||
sarFileCompareInfo.setSerialNumberRight(rightInfo.getSerialNumber());
|
||||
|
||||
sarFileCompareInfo.setReleaseState(ReleaseConditionEnum.DRAFT.getValue());
|
||||
sarFileCompareInfo.setRemark(remark);
|
||||
this.add(sarFileCompareInfo);
|
||||
//保存标准的所有条款比对的历史数据
|
||||
if (resLeftMapList != null && !resLeftMapList.isEmpty()) {
|
||||
setStandCompareHisEO(resLeftMapList, sarFileCompareInfo.getId(), "LEFT");
|
||||
}
|
||||
if (resRightMapList != null && !resRightMapList.isEmpty()) {
|
||||
setStandCompareHisEO(resRightMapList, sarFileCompareInfo.getId(), "RIGHT");
|
||||
}
|
||||
}
|
||||
|
||||
public void setStandCompareHisEO(List<Map<String, Object>> mapList, String id, String leftOrRight) throws Exception {
|
||||
for (int i = 0; i < mapList.size(); i++) {
|
||||
SarFileCompareItem sarFileCompareItem = new SarFileCompareItem();
|
||||
sarFileCompareItem.setItemsId(id);
|
||||
sarFileCompareItem.setItemsDisplayNum(i);
|
||||
sarFileCompareItem.setLeftOrRight(leftOrRight);
|
||||
Object itemsId = mapList.get(i).get("itemsId");
|
||||
if (null != itemsId) {
|
||||
sarFileCompareItem.setItemsId(itemsId.toString());
|
||||
}
|
||||
Object itemsName = mapList.get(i).get("itemsName");
|
||||
if (null != itemsName) {
|
||||
sarFileCompareItem.setItemsName(itemsName.toString());
|
||||
}
|
||||
Object itemsNum = mapList.get(i).get("itemsNum");
|
||||
if (null != itemsNum) {
|
||||
sarFileCompareItem.setItemsNum(itemsNum.toString());
|
||||
}
|
||||
Object itemsText = mapList.get(i).get("itemsText");
|
||||
if (null != itemsText) {
|
||||
sarFileCompareItem.setItemsText(itemsText.toString());
|
||||
}
|
||||
Object targetStand = mapList.get(i).get("targetStand");
|
||||
if (targetStand != null) {
|
||||
sarFileCompareItem.setTargetStand((int) targetStand);
|
||||
}
|
||||
sarFileCompareItemService.add(sarFileCompareItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.compare.service.impl;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.jero.modules.compare.mapper.SarFileCompareItemMapper;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SarFileCompareItemServiceImpl extends ServiceImpl<SarFileCompareItemMapper, SarFileCompareItem> implements ISarFileCompareItemService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(SarFileCompareItem sarFileCompareItem) {
|
||||
Date now = new Date();
|
||||
sarFileCompareItem.setCreateTime(now);
|
||||
sarFileCompareItem.setUpdateTime(now);
|
||||
save(sarFileCompareItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(SarFileCompareItem sarFileCompareItem) {
|
||||
Date now = new Date();
|
||||
sarFileCompareItem.setUpdateTime(now);
|
||||
saveOrUpdate(sarFileCompareItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SarFileCompareItem queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SarFileCompareItem> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+266
@@ -0,0 +1,266 @@
|
||||
package com.jero.modules.compare.utils;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.extra.tokenizer.Result;
|
||||
import cn.hutool.extra.tokenizer.TokenizerEngine;
|
||||
import cn.hutool.extra.tokenizer.TokenizerUtil;
|
||||
import cn.hutool.extra.tokenizer.Word;
|
||||
import cn.hutool.extra.tokenizer.engine.hanlp.HanLPEngine;
|
||||
import cn.hutool.extra.tokenizer.engine.jieba.JiebaEngine;
|
||||
import com.hankcs.hanlp.HanLP;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.wltea.analyzer.core.IKSegmenter;
|
||||
import org.wltea.analyzer.core.Lexeme;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
public class CompHanLPUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 通过Ik 进行将句子分词
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static Vector<String> participleIk(String text) {
|
||||
//对输入进行分词
|
||||
Vector<String> str = new Vector<>();
|
||||
try {
|
||||
StringReader reader = new StringReader(text);
|
||||
//当为true时,分词器进行最大词长切分
|
||||
IKSegmenter ik = new IKSegmenter(reader, true);
|
||||
Lexeme lexeme = null;
|
||||
while ((lexeme = ik.next()) != null) {
|
||||
str.add(lexeme.getLexemeText());
|
||||
}
|
||||
if (str.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
//分词后
|
||||
log.info("str分词后:" + str);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 结巴分词
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static Vector<String> participleJieBa(String text) {
|
||||
JiebaEngine engine = new JiebaEngine();
|
||||
Result results = engine.parse(text);
|
||||
//输出:这 两个 方法 的 区别 在于 返回 值
|
||||
String result = CollUtil.join((Iterator<Word>) results, ",");
|
||||
return new Vector<>(Arrays.asList(result.split(",")));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 中文分词
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static Vector<String> participleChinese(String text) {
|
||||
//自动根据用户引入的分词库的jar来自动选择使用的引擎
|
||||
TokenizerEngine engine = TokenizerUtil.createEngine();
|
||||
//解析文本
|
||||
//String text = "这两个方法的区别在于返回值";
|
||||
Result results = engine.parse(text);
|
||||
//输出:这 两个 方法 的 区别 在于 返回 值
|
||||
String result = CollUtil.join((Iterator<Word>) results, ",");
|
||||
return new Vector<>(Arrays.asList(result.split(",")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 采用 HanLP 进行自定义分词
|
||||
*/
|
||||
public static Vector<String> participleHanLP(String text) {
|
||||
TokenizerEngine engine = new HanLPEngine();
|
||||
//解析文本
|
||||
//String text = "这两个方法的区别在于返回值";
|
||||
Result results = engine.parse(text);
|
||||
//输出:这 两个 方法 的 区别 在于 返回 值
|
||||
String result = CollUtil.join((Iterator<Word>) results, ",");
|
||||
return new Vector<>(Arrays.asList(result.split(",")));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Java利用hanlp完成语句相似度分析
|
||||
*
|
||||
* @param sentenceOne
|
||||
* @param sentenceTwo
|
||||
* @return
|
||||
*/
|
||||
public static double findSimilarity(String sentenceOne, String sentenceTwo) {
|
||||
List<String> sentOneWords = getSplitWords(sentenceOne);
|
||||
List<String> sentTwoWords = getSplitWords(sentenceTwo);
|
||||
List<String> allWords = mergeList(sentOneWords, sentTwoWords);
|
||||
int[] statisticOne = statistic(allWords, sentOneWords);
|
||||
int[] statisticTwo = statistic(allWords, sentTwoWords);
|
||||
double dividend = 0;
|
||||
double divisor1 = 0;
|
||||
double divisor2 = 0;
|
||||
int length = statisticOne.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
dividend += statisticOne[i] * statisticTwo[i];
|
||||
divisor1 += Math.pow(statisticOne[i], 2);
|
||||
divisor2 += Math.pow(statisticTwo[i], 2);
|
||||
}
|
||||
return dividend / (Math.sqrt(divisor1) * Math.sqrt(divisor2));
|
||||
}
|
||||
|
||||
|
||||
private static int[] statistic(List<String> allWords, List<String> sentWords) {
|
||||
int[] result = new int[allWords.size()];
|
||||
int size = allWords.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
result[i] = Collections.frequency(sentWords, allWords.get(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 去重
|
||||
*
|
||||
* @param listOne
|
||||
* @param listTwo
|
||||
* @return
|
||||
*/
|
||||
private static List<String> mergeList(List<String> listOne, List<String> listTwo) {
|
||||
List<String> result = new ArrayList<>();
|
||||
result.addAll(listOne);
|
||||
result.addAll(listTwo);
|
||||
return result.stream().distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 过滤标签
|
||||
*
|
||||
* @param sentence
|
||||
* @return
|
||||
*/
|
||||
private static List<String> getSplitWords(String sentence) {
|
||||
// 去除掉html标签
|
||||
sentence = Jsoup.parse(sentence.replace(" ", "")).body().text();
|
||||
// 标点符号会被单独分为一个Term,去除之
|
||||
return HanLP.segment(sentence).stream().map(a -> a.word).filter(s -> !"`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、? ".contains(s)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String str1 = "6转向系\n" +
|
||||
"6.1汽车(三轮汽车除外)的方向盘应设置于左侧,其他机动车的方向盘不得设置于右侧;专项作业车、教练车按需要可设置左右两个方向盘。有驾驶室的正三轮摩托车如使用方向盘转向,则方向盘中心立柱距车辆纵向中心平面的水平距离应小于等于200 mm;其他摩托车不得使用方向盘转向。\n" +
|
||||
"6.2机动车的方向盘(或方向把)应转动灵活,操纵方便,无卡滞现象。机动车应设置转向限位装置。转向系统在任何操作位置上,不得与其他部件有干涉现象。\n" +
|
||||
"6.3机动车(摩托车、三轮汽车、手扶拖拉机运输机组除外)正常行驶时,转向轮转向后应有一定的回正能力(允许有残余角),以使机动车具有稳定的直线行驶能力。\n" +
|
||||
"6.4机动车方向盘的最大自由转动量应小于或等于:\n" +
|
||||
"a) 最大设计车速大于或等于100 km/h 的机动车:15°\n" +
|
||||
"b) 三轮汽车:35°;\n" +
|
||||
"c) 其他机动车:25° 。\n" +
|
||||
"6.5汽车(三轮汽车除外)应具有适度的不足转向特性。\n" +
|
||||
"6.6三轮汽车、摩托车的转向轮向左或向右转角应小于等于:\n" +
|
||||
"a)\t三轮汽车、三轮摩托车、正三轮轻便摩托车:45°;\n" +
|
||||
"6)\t\t两轮普通摩托车、两轮轻便摩托车:48°。\n" +
|
||||
"6.6机动车在平坦、硬实、干燥和清洁的道路上行驶不应跑偏,其方向盘(或方向把)不应有摆振、路感不灵或其他异常现象。\n" +
|
||||
"6.8机动车在平坦、硬实、干燥和清洁的水泥或沥青道路上行驶,以10 km/h的速度在5 s之内沿螺旋线从直线行驶过渡到外圆直径为25 m的车辆通道圆行驶,施加于方向盘外缘的最大切向力应小于等于245 N。\n" +
|
||||
"6.9专用校车应采用转向助力装置;其他机动车转向轴最大设计轴荷大于4 000 kg时,也应采用转向助力装置。装有转向助力装置的机动车,转向时其转向助力功能不得出现时有时无的现象,且转向助力装置失效时仍应具有用方向盘控制机动车的能力。装有电动转向助力装置的汽车,在产品使用说明书规定的正常使用状态下,应保证转向助力装置的电能供应。\n" +
|
||||
"6.10汽车和汽车列车(不计具有作业功能的专用装置的突出部分)、轮式拖拉机运输机组应能在同一个车辆通道圆内通过,车辆通道圆的外圆直径认为25.00 m,车辆通道圆的内圆直径D2为10.60 m。 汽车和汽车列车、轮式拖拉机运输机组由直线行驶过渡到上述圆周运动时,任何部分超出直线行驶时的 车辆外侧面垂直面的值(外摆值)应小于等于0.80 m(对铰接客车和铰接式无轨电车外摆值应小于等于 1.20 m),其试验方法见GB 1589。\n" +
|
||||
"6.11汽车(三轮汽车除外)的车轮定位应与该车型的技术要求一致。对前轴采用非独立悬架的汽车(前轴采用双转向轴时除外),其转向轮的横向侧滑量,用侧滑台检验时侧滑量值应在±5 m/km之间。\n" +
|
||||
"6.12转向节及臂,转向横、直拉杆及球销不得有裂纹和损伤,并且转向球销不应松旷。对机动车进行改装或修理时横、直拉杆不得拼焊。\n" +
|
||||
"6.13三轮汽车、摩托车的前减振器、上下联板和方向把不应有变形和裂损。\n";
|
||||
String str2 = "6转向系\n" +
|
||||
"6.1汽车(三轮汽车除外)的方向盘应设置于左侧,其他机动车的方向盘不应设置于右侧;专项作业车、教练车按需要可设置左右两个方向盘。装有两个后轮、有驾驶室的正三轮摩托车如使用方向盘转向,则方向盘中心立柱距车辆纵向中心平面的水平距离应小于或等于200 mm ;其他摩托车不应使用方向盘转向。\n" +
|
||||
"6.2机动车的方向盘(或方向把)应转动灵活,无卡滞现象。机动车应设置转向限位装置。转向系统在任何操作位置上,不应与其他部件有干涉现象。\n" +
|
||||
"6.3机动车(摩托车、三轮汽车、手扶拖拉机运输机组除外〉正常行驶时,转向轮转向后应有一定的回正能力(允许有残余角),以使机动车具有稳定的直线行驶能力0\n" +
|
||||
"6.4机动车方向盘的最大自由转动量应小于或等于:\n" +
|
||||
"a) 最大设计车速大于或等于100 km/h 的机动车:15°\n" +
|
||||
"b) 三轮汽车:35°;\n" +
|
||||
"c) 其他机动车:25° 。\n" +
|
||||
"6.5汽车(三轮汽车除外)应具有适度的不足转向特性。\n" +
|
||||
"6.6三轮汽车、摩托车的转向轮向左或向右转角应小于或等于:\n" +
|
||||
"a) 三轮汽车、三轮摩托车、正三轮轻便摩托车:45°;\n" +
|
||||
"b)两轮普通摩托车、两轮轻便摩托车:48°0\n" +
|
||||
"6.7机动车在平坦、硬实、干燥和清洁的道路上行驶不应跑偏,其方向盘(或方向把)不应有摆振等异常现象。\n" +
|
||||
"6.8机动车在平坦、硬实、干燥和清洁的水泥或沥青道路上行驶,以10 km/h 的速度在5 s 之内沿螺旋线从直线行驶过渡到外圆直径为25m 的车辆通道圆行驶,施加于方向盘外缘的最大切向力应小于或等于245 N。\n" +
|
||||
"6.9汽车(三轮汽车除外)的车轮定位应与该车型的技术要求一致。对前轴采用非独立悬架的汽车(前轴采用双转向轴时除外),其转向轮的横向侧滑量,用侧滑台检验时侧滑量值应小于或等于5 m/km。\n" +
|
||||
"6.10 专用校车应采用转向助力装置;其他机动车转向轴最大设计轴荷大于4 000 kg 时,也应采用转向助力装置。装有转向助力装置的机动车,转向时其转向助力功能不应出现时有时无的现象,且转向助力装置失效时仍应具有用方向盘控制机动车的能力。\n" +
|
||||
"6.11转向节及臂,转向横、直拉杆及球销应连接可靠,且不应有裂纹和损伤,并且转向球销不应松旷。对机动车进行改装或修理时横、直拉杆不应拼焊。\n" +
|
||||
"6.12三轮汽车、摩托车的前减振器、上下联板和方向把不应有变形和裂损。";
|
||||
String str3 = "\n" +
|
||||
"5车辆识别代号的标示位置\n" +
|
||||
"5.1每辆车辆都应具有唯一的车辆识别代号,并永久保持地标示在车辆上,同一车辆上标示的所有的 车辆识别代号的字码构成与排列顺序应相同。除第9章规定的情况外,不得对已标示的车辆识别代号 进行变更。\n" +
|
||||
"5.2车辆应在产品标牌上标示车辆识别代号(L1、L3类车辆可除外),产品标牌的型式、标示位置、标示要求应符合GB/T 18411的规定。\n" +
|
||||
"5.3车辆应至少有一个车辆识别代号直接打刻在车架(无车架的车辆为车身主要承载且不能拆卸的部件)能防止锈烛、磨损的部位上。其中:\n" +
|
||||
"a)\tM1类车辆的车辆识别代号应打刻在发动机舱内能防止替换的车辆结构件上,或打刻在车门 立柱上,如受结构限制没有打刻空间时也可打刻在右侧除行李舱外的车辆其他结构件上;\n" +
|
||||
"b)\t最大设计总质量大于或等于12000 kg的货车及所有牵引杆挂车,车辆识别代号应打刻在右前轮纵向中心线前端纵梁外侧,如受结构限制也可打刻在右前轮纵向中心线附近纵梁外侧;\n" +
|
||||
"c)\t半挂车和中置轴挂车的车辆识别代号应打刻在右前支腿前端纵梁外侧(无纵梁车辆除外);\n" +
|
||||
"d)\t其他汽车和无纵梁挂车的车辆识别代号应打刻在车辆右侧前部的车辆结构件上,如受结构限 制也可打刻在右侧其他车辆结构件上。\n" +
|
||||
"打刻车辆识别代号的部件不应采用打磨、挖补、垫片、凿改、重新涂漆(设计和制造上为保护打刻的 车辆识别代号而采取涂漆工艺的情形除外)等方式处理,从上(前)方观察时,打刻区域周边足够大面积 的表面不应有任何覆盖物,如有覆盖物,该覆盖物的表面应明确标示“车辆识别代号”或“VIN”字样,且覆盖物在不使用任何专用工具的情况下能直接取下(或揭开)及复原,以方便地观察到足够大的包括打刻区域的表面。\n" +
|
||||
"注1:打刻区域周边足够大面积的表面(足够大的包括打刻区域的表面)是指打刻车辆识别代号的部件的全部表面,但所暴露表面能满足查看打刻车辆识别代号的部件有无挖补、重新焊接、粘贴等痕迹的需要时,也应视为满足要求。\n" +
|
||||
"注2:对摩托车,打刻的车辆识别代号在不举升车辆的情形下可观察、拓印的,视为满足要求。\n" +
|
||||
"打刻的车辆识别代号从上(前)方应易于观察、拓印,对于汽车和挂车还应能拍照。\n" +
|
||||
"5.4具有电子控制单元的汽车,其至少有一个电子控制单元应不可篡改地存储车辆识别代号。\n" +
|
||||
"5.5 M1、N1类车辆应在靠近风窗立柱的位置标示车辆识别代号,该车辆识别代号在白天不需移动任何部件从车外即能清晰识读。\n" +
|
||||
"5.6除按照5.2、5.3、5.4、5.5规定标示车辆识别代号之外,类车辆还应在行李舱的易见部位标示车辆识别代号;且若车辆制造厂选取车辆识别代号作为车辆及部件识别标记的标识信息,还应按照GB 30509的规定,标示车辆识别代号。\n" +
|
||||
"5.7除按照5.2、5.3、5.4规定标示车辆识别代号之外,最大设计总质量大于或等于12000 kg的栏板式、仓栅式、自卸式、罐式货车及最大设计总质量大于或等于10000 kg的栏板式、仓栅式、自卸式、罐式挂车还应在其货箱或常压罐体(或设计和制造上固定在货箱或常压罐体上且用于与车架连接的结构件)上打刻至少两个车辆识别代号。打刻的车辆识别代号应位于货箱(常压罐体)左、右两侧或前端面且易于拍照;且若打刻在货箱(常压罐体)左、右两侧时,打刻的车辆识别代号距货箱(常压罐体)前端面的距离应小于或等于1 000 mm,若打刻在左、右两侧连接结构件时应尽量靠近货箱(常压罐体)前端面。\n" +
|
||||
"5.8车辆制造厂应至少在一种随车文件中标示车辆识别代号。";
|
||||
|
||||
String str4 = "\n" +
|
||||
"5.3车辆的驱动\n" +
|
||||
"5.3.1车辆不应靠自身动力驱动。\n" +
|
||||
"5.3.2在碰撞瞬间,车辆应不冉承受任何附加转向或驱动装置的作用。\n" +
|
||||
"5.3.3车辆到达壁障的路线在横向任一方向偏离理论轨迹均不应超过150 mm。\n" +
|
||||
"5.4 试验速度\n" +
|
||||
"在碰撞瞬间,车辆速度应为504 km/h。如果试验在更高的碰撞速度下进行并且车辆符合要求,也认为试验合格。\n" +
|
||||
"5.5对前排座椅假人的测量\n" +
|
||||
"5.5.1为确定性能指标必需的所有测量,均应采用符合附录D要求的测量系统。\n" +
|
||||
"5.5.2不同的参数应通过具备下列CFC(通道的频率等级)的独立数据通道来记录。\n" +
|
||||
"5.5.2.1对假人头部的测量\n" +
|
||||
"重心处的加速度(a)由加速度的二维分量计算得出。加速度分量测量时,CFC为1000。\n" +
|
||||
"5.5.2.2对假人颈部的测量\n" +
|
||||
"5.5.2.2.1在头颈连接处测量的轴向张力和前后剪切力,CFC为1000。\n" +
|
||||
"5.5.2.2.2在头颈连接处测量的对Y轴的弯矩,CFC为600。\n" +
|
||||
"5.5.2.3对假人胸部的测量\n" +
|
||||
"胸部变形测量时,CFC为180。\n" +
|
||||
"5.5.2.4对假人大腿的测量\n" +
|
||||
"轴向压缩力测量时,CFC为600。";
|
||||
|
||||
|
||||
double similarity = CompHanLPUtils.findSimilarity(str1, str2);
|
||||
NumberFormat nf = NumberFormat.getPercentInstance();
|
||||
nf.setMaximumIntegerDigits(2);//小数点前保留几位
|
||||
nf.setMinimumFractionDigits(2);// 小数点后保留几位
|
||||
String similarityDegree = nf.format(similarity);
|
||||
System.out.println(similarityDegree);
|
||||
System.out.println("======================================================");
|
||||
double similarity1 = CompHanLPUtils.findSimilarity(str1, str3);
|
||||
System.out.println(similarity1);
|
||||
|
||||
System.out.println("======================================================");
|
||||
double similarity2 = CompHanLPUtils.findSimilarity(str1, str4);
|
||||
System.out.println(similarity2);
|
||||
|
||||
|
||||
System.out.println("======================================================");
|
||||
double similarity3 = CompHanLPUtils.findSimilarity(str3, str4);
|
||||
System.out.println(similarity3);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.jero.modules.compare.utils.treeTool;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* List 排序 Comparator
|
||||
* @author david
|
||||
*/
|
||||
public class OrdNamComparator implements Comparator<TreeNode> {
|
||||
|
||||
@Override
|
||||
public int compare(TreeNode t1, TreeNode t2) {
|
||||
if (t1.getOrderNum() > t2.getOrderNum()) {
|
||||
return 1;
|
||||
}
|
||||
if (t1.getOrderNum() < t2.getOrderNum()) {
|
||||
return -1;
|
||||
}
|
||||
return t1.getNodeName().compareTo(t2.getNodeName());
|
||||
}
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
package com.jero.modules.compare.utils.treeTool;
|
||||
|
||||
import com.jero.modules.compare.utils.treeTool.annotation.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 构建树形建构
|
||||
*
|
||||
* @author David
|
||||
*/
|
||||
public class Tree<T> {
|
||||
/**
|
||||
* 用于存放treeNode的Map
|
||||
*/
|
||||
private LinkedHashMap<String, TreeNode> treeNodesMap = new LinkedHashMap<>();
|
||||
/**
|
||||
* 用于存放treeNode的list
|
||||
*/
|
||||
private List<TreeNode> treeNodesList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public Tree(List<T> list) {
|
||||
initTreeNodeMap(list);
|
||||
initTreeNodeList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将List对象数据转为TreeNodeMap
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
private void initTreeNodeMap(List<T> list) {
|
||||
TreeNode treeNode;
|
||||
for (Object item : list) {
|
||||
treeNode = new TreeNode();
|
||||
treeNode.setNodeId(getFieldValue(item, "TreeNodeId"));
|
||||
treeNode.setNodeName(getFieldValue(item, "TreeNodeName"));
|
||||
treeNode.setParentNodeId(getFieldValue(item, "TreeNodeParentId"));
|
||||
if(StringUtils.isEmpty(getFieldValue(item, "TreeNodeLevel"))) {
|
||||
treeNode.setLevel(0);
|
||||
} else {
|
||||
treeNode.setLevel(Integer.parseInt(getFieldValue(item, "TreeNodeLevel")));
|
||||
}
|
||||
if(StringUtils.isEmpty(getFieldValue(item, "TreeNodeOrder"))) {
|
||||
treeNode.setOrderNum(0);
|
||||
} else {
|
||||
treeNode.setOrderNum(Integer.parseInt(getFieldValue(item, "TreeNodeOrder")));
|
||||
}
|
||||
treeNode.setLastNodeNum(1);
|
||||
treeNode.setData(item);
|
||||
treeNodesMap.put(treeNode.getNodeId(), treeNode);
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode parentTreeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (StringUtils.isEmpty(treeNode.getParentNodeId())) {
|
||||
continue;
|
||||
}
|
||||
parentTreeNode = treeNodesMap.get(treeNode.getParentNodeId());
|
||||
if (parentTreeNode != null) {
|
||||
treeNode.setParent(parentTreeNode);
|
||||
parentTreeNode.addChild(treeNode);
|
||||
// 按照orderNum排序
|
||||
Collections.sort(parentTreeNode.getChildren(), new OrdNamComparator());
|
||||
// 判断这个节点是否是最子节点
|
||||
if (treeNode.getChildren().size() == 0) {
|
||||
treeNode.setLastNode(true);
|
||||
}
|
||||
// 计算每一个节点的最子节点的数量
|
||||
List<TreeNode> children = parentTreeNode.getChildren();
|
||||
if (children.size() > 0) {
|
||||
int sum = 0;
|
||||
for (TreeNode treeNode2 : children) {
|
||||
sum += treeNode2.getLastNodeNum();
|
||||
}
|
||||
parentTreeNode.setLastNodeNum(sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getFieldValue(Object obj, String type) {
|
||||
Class clz = obj.getClass();
|
||||
Field[] fields = clz.getDeclaredFields();
|
||||
String value = null;
|
||||
try {
|
||||
for(Field field : fields){
|
||||
field.setAccessible(true);
|
||||
switch (type){
|
||||
case "TreeNodeId":
|
||||
if(field.isAnnotationPresent(TreeNodeId.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeParentId":
|
||||
if(field.isAnnotationPresent(TreeNodeParentId.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeName":
|
||||
if(field.isAnnotationPresent(TreeNodeName.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeOrder":
|
||||
if(field.isAnnotationPresent(TreeNodeOrder.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeLevel":
|
||||
if(field.isAnnotationPresent(TreeNodeLevel.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据treeNodesMap转为treeNodesList
|
||||
*/
|
||||
private void initTreeNodeList() {
|
||||
if (treeNodesList.size() > 0) {
|
||||
return;
|
||||
}
|
||||
if (treeNodesMap.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode treeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (treeNode.getParent() == null) {
|
||||
this.treeNodesList.add(treeNode);
|
||||
this.treeNodesList.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<TreeNode> getTree() {
|
||||
return this.treeNodesList;
|
||||
}
|
||||
|
||||
public List<TreeNode> getRoot() {
|
||||
List<TreeNode> rootList = new ArrayList<>();
|
||||
if (this.treeNodesList.size() > 0) {
|
||||
for (TreeNode node : treeNodesList) {
|
||||
if (node.getParent() == null) {
|
||||
rootList.add(node);
|
||||
Collections.sort(rootList, new OrdNamComparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
return rootList;
|
||||
}
|
||||
|
||||
public TreeNode getTreeNode(String nodeId) {
|
||||
return this.treeNodesMap.get(nodeId);
|
||||
}
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
package com.jero.modules.compare.utils.treeTool;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author David
|
||||
*/
|
||||
public class TreeNode {
|
||||
|
||||
/**
|
||||
* 树节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 1)
|
||||
private String nodeId;
|
||||
/**
|
||||
* 树节点名称
|
||||
*/
|
||||
@JSONField(ordinal = 2)
|
||||
private String nodeName;
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 3)
|
||||
private String parentNodeId;
|
||||
/**
|
||||
* 节点在树中的排序号
|
||||
*/
|
||||
@JSONField(ordinal = 4)
|
||||
private int orderNum;
|
||||
/**
|
||||
* 节点所在的层级
|
||||
*/
|
||||
@JSONField(ordinal = 5)
|
||||
private int level;
|
||||
/**
|
||||
* 最子节点的数量
|
||||
*/
|
||||
@JSONField(ordinal = 6)
|
||||
private int lastNodeNum;
|
||||
|
||||
/**
|
||||
* 是否是最子节点
|
||||
*/
|
||||
@JSONField(ordinal = 7)
|
||||
private boolean lastNode;
|
||||
|
||||
private Object data;
|
||||
|
||||
/**
|
||||
* 当前节点的儿子节点
|
||||
*/
|
||||
@JSONField(ordinal = 8)
|
||||
private List<TreeNode> children = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 当前节点的完整路径
|
||||
*/
|
||||
@JSONField(ordinal = 9)
|
||||
private String completeName;
|
||||
|
||||
/**
|
||||
* 当前节点的父级节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private TreeNode parent;
|
||||
|
||||
/**
|
||||
* 当前节点的子孙节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private List<TreeNode> allChildren = new ArrayList<>();
|
||||
|
||||
private int standFlag;
|
||||
|
||||
public TreeNode(TreeNode obj) {
|
||||
this.orderNum = obj.getOrderNum();
|
||||
this.level = obj.getLevel();
|
||||
this.lastNodeNum = obj.getLastNodeNum();
|
||||
}
|
||||
|
||||
public TreeNode() {
|
||||
}
|
||||
|
||||
public void addChild(TreeNode treeNode) {
|
||||
this.children.add(treeNode);
|
||||
}
|
||||
|
||||
public void removeChild(TreeNode treeNode) {
|
||||
this.children.remove(treeNode);
|
||||
}
|
||||
|
||||
public String getNodeId() {
|
||||
return nodeId;
|
||||
}
|
||||
|
||||
public void setNodeId(String nodeId) {
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName) {
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getParentNodeId() {
|
||||
return parentNodeId;
|
||||
}
|
||||
|
||||
public void setParentNodeId(String parentNodeId) {
|
||||
this.parentNodeId = parentNodeId;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public TreeNode getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(TreeNode parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<TreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeNode> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(int orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public int getLastNodeNum() {
|
||||
return lastNodeNum;
|
||||
}
|
||||
|
||||
public void setLastNodeNum(int lastNodeNum) {
|
||||
this.lastNodeNum = lastNodeNum;
|
||||
}
|
||||
|
||||
public boolean isLastNode() {
|
||||
return lastNode;
|
||||
}
|
||||
|
||||
public void setLastNode(boolean lastNode) {
|
||||
this.lastNode = lastNode;
|
||||
}
|
||||
|
||||
public List<TreeNode> getAllChildren() {
|
||||
if (this.allChildren.isEmpty()) {
|
||||
for (TreeNode treeNode : this.children) {
|
||||
this.allChildren.add(treeNode);
|
||||
this.allChildren.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
return this.allChildren;
|
||||
}
|
||||
|
||||
public String getCompleteName() {
|
||||
return completeName;
|
||||
}
|
||||
|
||||
public void setCompleteName(String completeName) {
|
||||
this.completeName = completeName;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStandFlag() {
|
||||
return standFlag;
|
||||
}
|
||||
|
||||
public void setStandFlag(int standFlag) {
|
||||
this.standFlag = standFlag;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeId {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeLevel {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeName {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeOrder {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeParentId {
|
||||
}
|
||||
+26
-7
@@ -4,13 +4,12 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -21,7 +20,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
@@ -53,9 +51,7 @@ public class DocTranslationEOController extends JeroController<DocTranslationEO,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DocTranslationEO> queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap());
|
||||
Page<DocTranslationEO> page = new Page<DocTranslationEO>(pageNo, pageSize);
|
||||
IPage<DocTranslationEO> pageList = docTranslationEOService.page(page, queryWrapper);
|
||||
IPage<DocTranslationEO> pageList = docTranslationEOService.queryPageList(docTranslationEO,pageNo,pageSize,cut,req);
|
||||
return Result.OK(cut,pageList);
|
||||
}
|
||||
|
||||
@@ -168,4 +164,27 @@ public class DocTranslationEOController extends JeroController<DocTranslationEO,
|
||||
return super.importExcel(request, response, DocTranslationEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新文档翻译表发布情况
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-批量更新发布情况")
|
||||
@ApiOperation(value="文档翻译表-批量更新发布情况", notes="文档翻译表-批量更新发布情况")
|
||||
@PostMapping(value = "/updateRleaseConditionBatch")
|
||||
public Result<?> updateRleaseConditionBatch(@RequestBody JSONObject json) {
|
||||
return this.docTranslationEOService.updateRleaseConditionBatch(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新文档翻译表状态
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-查询文本状态下拉选项")
|
||||
@ApiOperation(value="文档翻译表-查询文本状态下拉选项", notes="文档翻译表-查询文本状态下拉选项")
|
||||
@GetMapping(value = "/queryTextStatusVal")
|
||||
public Result<?> queryTextStatusVal() {
|
||||
return this.docTranslationEOService.queryTextStatusVal();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -2,6 +2,7 @@ package com.jero.modules.docTranslation.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -73,10 +74,12 @@ public class DocTranslationEO implements Serializable {
|
||||
private String title;
|
||||
|
||||
/**文本状态*/
|
||||
@Dict(dicCode = "state")
|
||||
//@Dict(dicCode = "state")
|
||||
@Excel(name = "文本状态", width = 15)
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private java.lang.String textStatus;
|
||||
@TableField(exist = false)
|
||||
private String textStatus_dictText;
|
||||
|
||||
/**文件名称*/
|
||||
@Excel(name = "文件名称", width = 15)
|
||||
|
||||
+29
@@ -1,7 +1,12 @@
|
||||
package com.jero.modules.docTranslation.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,4 +63,28 @@ public interface IDocTranslationEOService extends IService<DocTranslationEO> {
|
||||
* @return
|
||||
*/
|
||||
List<DocTranslationEO> queryList();
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param docTranslationEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param cut
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<DocTranslationEO> queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 批量更新发布情况
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> updateRleaseConditionBatch(JSONObject json);
|
||||
|
||||
/**
|
||||
* 查询文本状态下拉选项(文档库中,文件类型字段)
|
||||
* @return
|
||||
*/
|
||||
Result<?> queryTextStatusVal();
|
||||
}
|
||||
|
||||
+99
@@ -1,20 +1,40 @@
|
||||
package com.jero.modules.docTranslation.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.enums.ReleaseConditionEnum;
|
||||
import com.jero.modules.docTranslation.enums.TranslationResultEnum;
|
||||
import com.jero.modules.docTranslation.mapper.DocTranslationEOMapper;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.jero.modules.docTranslation.utils.TranslationDocumentUtils;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
@@ -25,6 +45,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMapper, DocTranslationEO> implements IDocTranslationEOService {
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -103,4 +125,81 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
public List<DocTranslationEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<DocTranslationEO> queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req) {
|
||||
Page<DocTranslationEO> page = new Page<DocTranslationEO>(pageNo, pageSize);
|
||||
|
||||
QueryWrapper<DocTranslationEO> queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap());
|
||||
// 获取当前登录人
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
/**
|
||||
* 数据权限:自己创建的、或发布情况为“已发布”的数据
|
||||
*/
|
||||
queryWrapper.lambda().and(query -> {
|
||||
query.eq(DocTranslationEO::getCreateBy,currentUser.getUsername());
|
||||
query.or(o -> {
|
||||
o.eq(DocTranslationEO::getReleaseCondition,ReleaseConditionEnum.PUBLISHED.getValue());
|
||||
});
|
||||
});
|
||||
queryWrapper.lambda().orderByDesc(DocTranslationEO::getCreateTime);
|
||||
IPage<DocTranslationEO> result = this.page(page, queryWrapper);
|
||||
disposeData(result.getRecords(),cut);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
public void disposeData(List<DocTranslationEO> datas,String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (DocTranslationEO data : datas) {
|
||||
String textStatus_dictText = "";
|
||||
OnlCgformField fileTypeField = this.onlCgformFieldService.queryById(data.getTextStatus());
|
||||
if (ObjectUtil.isNotEmpty(fileTypeField)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
textStatus_dictText = fileTypeField.getDbFieldTxt();
|
||||
} else {
|
||||
textStatus_dictText = fileTypeField.getDbFieldEnName();
|
||||
}
|
||||
}
|
||||
data.setTextStatus_dictText(textStatus_dictText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> updateRleaseConditionBatch(JSONObject json) {
|
||||
String ids = json.getString("ids");
|
||||
// 值对应枚举类 ReleaseConditionEnum 发布published 或撤回draft
|
||||
String releaseCondition = json.getString("releaseCondition");
|
||||
if (StringUtils.isNotEmpty(ids)) {
|
||||
List<DocTranslationEO> docTranslationEOList = new ArrayList<>();
|
||||
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
idList.forEach(id -> {
|
||||
DocTranslationEO docTranslationEO = new DocTranslationEO();
|
||||
docTranslationEO.setId(id);
|
||||
docTranslationEO.setReleaseCondition(releaseCondition);
|
||||
docTranslationEOList.add(docTranslationEO);
|
||||
});
|
||||
this.updateBatchById(docTranslationEOList);
|
||||
}
|
||||
return new Result<>().success("操作成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> queryTextStatusVal() {
|
||||
List<OnlCgformField> fieldList = this.onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
List<OnlCgformField> result = fieldList.stream().filter(field -> {
|
||||
boolean flag = false;
|
||||
if(org.apache.commons.lang3.StringUtils.equals(field.getFieldShowType(), FieldTypeEnum.FILE.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
return Result.OK(result);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -140,11 +140,11 @@ public class TranslationDocumentUtils {
|
||||
}
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(newFile);
|
||||
out.write(translateAfter.getBytes("UTF-8"));
|
||||
out.close();
|
||||
|
||||
MultipartFile multipartFile = createMfileByPath(translateAfterFilePath);
|
||||
ossFile = iossFileService.uploadLocalOfCos(multipartFile, "", null, null);
|
||||
out.write(translateAfter.getBytes("UTF-8"));
|
||||
out.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
+2
-2
@@ -3189,7 +3189,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//您订阅的XXX已被修改
|
||||
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
||||
String contentInfo = "In the "+category + " " + href+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
String msgTitle = serialNumber + " you subsribed to has been updated";
|
||||
String msgTitle = serialNumber + " you subscribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
@@ -3411,7 +3411,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
String fieldStr = fieldSb.substring(0, fieldSb.length() - 1);
|
||||
|
||||
String field = " osf.id,bdl.serial_number,bdl.title,bdl.title_en,bdl.state,osf.file_name,osf.connect_id," + fieldStr
|
||||
String field = " osf.id,bdl.id as \"buss_document_library_id\",bdl.serial_number,bdl.title,bdl.title_en,bdl.state,osf.file_name,osf.connect_id," + fieldStr
|
||||
+ " from oss_file osf join buss_document_library bdl" + join.toString();
|
||||
|
||||
//查询条件
|
||||
|
||||
+294
@@ -0,0 +1,294 @@
|
||||
package com.jero.modules.extRepo.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.generater.modules.online.auth.entity.OnlAuthData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoDataPage;
|
||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "对外报告数据表")
|
||||
@RestController
|
||||
@RequestMapping("/com.jero.modules.extRepo/extRepoData")
|
||||
@Slf4j
|
||||
public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoDataService> {
|
||||
@Autowired
|
||||
private IExtRepoDataService extRepoDataService;
|
||||
|
||||
@Autowired
|
||||
private IExtRepoFolderService extRepoFolderService;
|
||||
|
||||
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param extRepoData
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-分页列表查询")
|
||||
@ApiOperation(value = "对外报告数据表-分页列表查询", notes = "对外报告数据表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ExtRepoData extRepoData,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LambdaQueryWrapper<ExtRepoData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<ExtRepoData> page = new Page<>(pageNo, pageSize);
|
||||
// 文件名称模糊查询
|
||||
String fileName = req.getParameter("fileName");
|
||||
if (StringUtils.isNotBlank(fileName)) {
|
||||
queryWrapper.like(ExtRepoData::getFileName, fileName);
|
||||
}
|
||||
// 上传人模糊查询
|
||||
String createBy = req.getParameter("createBy");
|
||||
if (StringUtils.isNotBlank(createBy)) {
|
||||
queryWrapper.like(ExtRepoData::getCreateBy, createBy);
|
||||
}
|
||||
// 更新时间查询
|
||||
String createTime = req.getParameter("time");
|
||||
if (StringUtils.isNotBlank(createTime)) {
|
||||
String[] createTimeArr = createTime.split(",");
|
||||
if (createTimeArr.length >= 2) {
|
||||
queryWrapper.between(ExtRepoData::getCreateTime, createTimeArr[0], createTimeArr[1]);
|
||||
}
|
||||
}
|
||||
queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder());
|
||||
queryWrapper.orderBy(true, false, ExtRepoData::getCreateTime);
|
||||
IPage<ExtRepoData> pageList = extRepoDataService.page(page, queryWrapper);
|
||||
ExtRepoDataPage res = new ExtRepoDataPage(extRepoFolderService.haveManageAuth(extRepoData.getSupFolder()), pageList);
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-列表查询")
|
||||
@ApiOperation(value = "对外报告数据表-列表查询", notes = "对外报告数据表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ExtRepoData>> queryList() {
|
||||
List<ExtRepoData> list = extRepoDataService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-添加")
|
||||
@ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) {
|
||||
log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
|
||||
int res = extRepoDataService.add(extRepoData);
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.success("添加成功:" + res + "条数据!");
|
||||
} else {
|
||||
result.success(res + " pieces of data are added successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-编辑")
|
||||
@ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||
extRepoData.setSupFolder(erd.getSupFolder());
|
||||
extRepoDataService.editById(extRepoData);
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.success("编辑成功!");
|
||||
} else {
|
||||
result.success("Data update successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-通过id删除")
|
||||
@ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam("id") String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||
if (null != erd) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||
extRepoDataService.deleteById(id);
|
||||
CosBootUtil.delete(erd.getFileKey());
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("Data deletion successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("删除失败!");
|
||||
} else {
|
||||
result.error500("Delete failed!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-批量删除")
|
||||
@ApiOperation(value = "对外报告数据表-批量删除", notes = "对外报告数据表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> idsList = Arrays.asList(ids.split(","));
|
||||
for (String id : idsList) {
|
||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||
if (null != erd && !extRepoFolderService.isManager() && !sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission!");
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String id : idsList) {
|
||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||
if (null != erd) {
|
||||
CosBootUtil.delete(erd.getFileKey());
|
||||
this.extRepoDataService.deleteById(id);
|
||||
}
|
||||
}
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("Data deletion successfully!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-通过id查询")
|
||||
@ApiOperation(value = "对外报告数据表-通过id查询", notes = "对外报告数据表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
ExtRepoData extRepoData = extRepoDataService.queryById(id);
|
||||
if (extRepoData == null) {
|
||||
result.success("未找到对应数据!");
|
||||
return result;
|
||||
}
|
||||
return result.OK(extRepoData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param extRepoData
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ExtRepoData extRepoData) {
|
||||
return super.exportXls(request, extRepoData, ExtRepoData.class, "对外报告数据表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ExtRepoData.class);
|
||||
}
|
||||
|
||||
}
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
package com.jero.modules.extRepo.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "对外报告文件夹表")
|
||||
@RestController
|
||||
@RequestMapping("/extRepo/extRepoFolder")
|
||||
@Slf4j
|
||||
public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtRepoFolderService> {
|
||||
@Autowired
|
||||
private IExtRepoFolderService extRepoFolderService;
|
||||
|
||||
@Autowired
|
||||
private IExtRepoDataService extRepoDataService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-列表查询")
|
||||
@ApiOperation(value = "对外报告文件夹表-列表查询", notes = "对外报告文件夹表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ERFTreeData>> queryList() {
|
||||
List<ERFTreeData> list = extRepoFolderService.queryTreeList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-添加")
|
||||
@ApiOperation(value = "对外报告文件夹表-添加", notes = "对外报告文件夹表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
||||
extRepoFolderService.add(extRepoFolder);
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.success("添加成功!");
|
||||
} else {
|
||||
result.success("Data added successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-编辑")
|
||||
@ApiOperation(value = "对外报告文件夹表-编辑", notes = "对外报告文件夹表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
||||
extRepoFolderService.editById(extRepoFolder);
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.success("编辑成功!");
|
||||
} else {
|
||||
result.success("Data update successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-通过id删除")
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id删除", notes = "对外报告文件夹表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(id)) {
|
||||
List<ExtRepoFolder> resList = extRepoFolderService.getListBySupFolder(id);
|
||||
if (resList.isEmpty()) {
|
||||
List<ExtRepoData> erdList = extRepoDataService.queryByFolder(id);
|
||||
for (ExtRepoData erd : erdList) {
|
||||
extRepoDataService.deleteById(erd.getId());
|
||||
}
|
||||
extRepoFolderService.deleteById(id);
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("Data deletion successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("请先删除子文件夹!");
|
||||
} else {
|
||||
result.error500("Please delete the subfolder first!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-通过id查询")
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id查询", notes = "对外报告文件夹表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
ExtRepoFolder extRepoFolder = extRepoFolderService.queryById(id);
|
||||
if (extRepoFolder == null) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("未找到对应数据!");
|
||||
} else {
|
||||
result.error500("No Data!");
|
||||
}
|
||||
}
|
||||
return result.OK(extRepoFolder);
|
||||
}
|
||||
}
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对外报告文件夹 树结构实体类
|
||||
*/
|
||||
public class ERFTreeData implements Comparable<ERFTreeData> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 页面显示的名称 对应 folder_name
|
||||
*/
|
||||
private String title;
|
||||
|
||||
private String folderName;
|
||||
|
||||
/**
|
||||
* 文件夹ID 对应 id
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 层级,设定最多4级
|
||||
*/
|
||||
private int level;
|
||||
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private int orderId;
|
||||
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
private boolean display = false;
|
||||
|
||||
|
||||
/**
|
||||
* 查看权限人员
|
||||
*/
|
||||
private String authViewIdsName = "";
|
||||
|
||||
/**
|
||||
* 管理权限人员
|
||||
*/
|
||||
private String authManageIdsName = "";
|
||||
|
||||
/**
|
||||
* 查看权限人员id
|
||||
*/
|
||||
private String authViewIds = "";
|
||||
|
||||
/**
|
||||
* 管理权限人员id
|
||||
*/
|
||||
private String authManageIds = "";
|
||||
|
||||
/**
|
||||
* 子文件夹
|
||||
*/
|
||||
private List<ERFTreeData> children = new ArrayList<ERFTreeData>();
|
||||
|
||||
public ERFTreeData() {
|
||||
}
|
||||
|
||||
public ERFTreeData(String title, String key, int level, int orderId) {
|
||||
this.title = title;
|
||||
this.folderName = title;
|
||||
this.key = key;
|
||||
this.level = level;
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public List<ERFTreeData> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<ERFTreeData> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(int orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public boolean isDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(boolean display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getFolderName() {
|
||||
return folderName;
|
||||
}
|
||||
|
||||
public void setFolderName(String folderName) {
|
||||
this.folderName = folderName;
|
||||
}
|
||||
|
||||
public String getAuthViewIdsName() {
|
||||
return authViewIdsName;
|
||||
}
|
||||
|
||||
public void setAuthViewIdsName(String authViewIdsName) {
|
||||
this.authViewIdsName = authViewIdsName;
|
||||
}
|
||||
|
||||
public String getAuthManageIdsName() {
|
||||
return authManageIdsName;
|
||||
}
|
||||
|
||||
public void setAuthManageIdsName(String authManageIdsName) {
|
||||
this.authManageIdsName = authManageIdsName;
|
||||
}
|
||||
|
||||
public String getAuthViewIds() {
|
||||
return authViewIds;
|
||||
}
|
||||
|
||||
public void setAuthViewIds(String authViewIds) {
|
||||
this.authViewIds = authViewIds;
|
||||
}
|
||||
|
||||
public String getAuthManageIds() {
|
||||
return authManageIds;
|
||||
}
|
||||
|
||||
public void setAuthManageIds(String authManageIds) {
|
||||
this.authManageIds = authManageIds;
|
||||
}
|
||||
|
||||
public void sortChildren() {
|
||||
Collections.sort(children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull ERFTreeData o) {
|
||||
return this.orderId - o.orderId;
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("ext_repo_data")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ext_repo_data对象", description="对外报告数据表")
|
||||
public class ExtRepoData implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**文件标识*/
|
||||
@Excel(name = "文件标识", width = 15)
|
||||
@ApiModelProperty(value = "文件标识")
|
||||
private java.lang.String fileKey;
|
||||
|
||||
/**文件名称*/
|
||||
@Excel(name = "文件名称", width = 15)
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private java.lang.String fileName;
|
||||
|
||||
/**文件说明*/
|
||||
@Excel(name = "文件说明", width = 15)
|
||||
@ApiModelProperty(value = "文件说明")
|
||||
private java.lang.String fileDescription;
|
||||
|
||||
/**所属文件夹*/
|
||||
@Excel(name = "所属文件夹", width = 15)
|
||||
@ApiModelProperty(value = "所属文件夹")
|
||||
private java.lang.String supFolder;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
public class ExtRepoDataPage {
|
||||
|
||||
/**
|
||||
* 此页面是否有管理权限
|
||||
*/
|
||||
private boolean auth_manage;
|
||||
|
||||
/**
|
||||
* 数据列表
|
||||
*/
|
||||
private IPage<ExtRepoData> pageList;
|
||||
|
||||
public ExtRepoDataPage() {
|
||||
}
|
||||
|
||||
public ExtRepoDataPage(boolean auth_manage, IPage<ExtRepoData> pageList) {
|
||||
this.auth_manage = auth_manage;
|
||||
this.pageList = pageList;
|
||||
}
|
||||
|
||||
public boolean isAuth_manage() {
|
||||
return auth_manage;
|
||||
}
|
||||
|
||||
public void setAuth_manage(boolean auth_manage) {
|
||||
this.auth_manage = auth_manage;
|
||||
}
|
||||
|
||||
public IPage<ExtRepoData> getPageList() {
|
||||
return pageList;
|
||||
}
|
||||
|
||||
public void setPageList(IPage<ExtRepoData> pageList) {
|
||||
this.pageList = pageList;
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-27
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("ext_repo_folder")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ext_repo_folder对象", description="对外报告文件夹表")
|
||||
public class ExtRepoFolder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文件夹名称*/
|
||||
@Excel(name = "文件夹名称", width = 15)
|
||||
@ApiModelProperty(value = "文件夹名称")
|
||||
private String folderName;
|
||||
|
||||
/**文件夹排序*/
|
||||
@Excel(name = "文件夹排序", width = 15)
|
||||
@ApiModelProperty(value = "文件夹排序")
|
||||
private Integer orderId;
|
||||
|
||||
/**所属文件夹*/
|
||||
@Excel(name = "所属文件夹", width = 15)
|
||||
@ApiModelProperty(value = "所属文件夹")
|
||||
private String supFolder;
|
||||
|
||||
/**查看权限人员*/
|
||||
@Excel(name = "查看权限人员", width = 15)
|
||||
@ApiModelProperty(value = "查看权限人员")
|
||||
private String authViewIdsName;
|
||||
|
||||
/**管理权限人员*/
|
||||
@Excel(name = "管理权限人员", width = 15)
|
||||
@ApiModelProperty(value = "管理权限人员")
|
||||
private String authManageIdsName;
|
||||
|
||||
/**查看权限人员id*/
|
||||
@Excel(name = "查看权限人员id", width = 15)
|
||||
@ApiModelProperty(value = "查看权限人员id")
|
||||
private String authViewIds;
|
||||
|
||||
/**管理权限人员id*/
|
||||
@Excel(name = "管理权限人员id", width = 15)
|
||||
@ApiModelProperty(value = "管理权限人员id")
|
||||
private String authManageIds;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.jero.modules.extRepo.enums;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum ExtRepoMamagerRoleIdEnum {
|
||||
MANAGER_ID("系统管理员", "Administrator", "admin", "f6817f48af4fb3af11b9e8bf182f618b", 1),
|
||||
ERMANAGER_ID("对外报告管理员", "ExternalReportsManager", "ExternalReportsManager", "1552536424587862017", 2);
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
String value;
|
||||
String id;
|
||||
Integer order;
|
||||
|
||||
ExtRepoMamagerRoleIdEnum(String name, String enName, String value, String id, Integer order) {
|
||||
this.name = name;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
this.id = id;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(Integer order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public static List<String> getIdList() {
|
||||
List<String> idList = new ArrayList<>();
|
||||
ExtRepoMamagerRoleIdEnum[] values = values();
|
||||
for (ExtRepoMamagerRoleIdEnum ermriEnum : values) {
|
||||
idList.add(ermriEnum.getId());
|
||||
}
|
||||
return idList;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.extRepo.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ExtRepoDataMapper extends BaseMapper<ExtRepoData> {
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.extRepo.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ExtRepoFolderMapper extends BaseMapper<ExtRepoFolder> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?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="com.jero.modules.extRepo.mapper.ExtRepoDataMapper">
|
||||
<resultMap id="ExtRepoDataResultMap" type="com.jero.modules.extRepo.entity.ExtRepoData">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="file_key" property="fileKey" />
|
||||
<result column="file_name" property="fileName" />
|
||||
<result column="file_description" property="fileDescription" />
|
||||
<result column="sup_folder" property="supFolder" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?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="com.jero.modules.extRepo.mapper.ExtRepoFolderMapper">
|
||||
<resultMap id="ExtRepoFolderResultMap" type="com.jero.modules.extRepo.entity.ExtRepoFolder">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="folder_name" property="folderName" />
|
||||
<result column="order_id" property="orderId" />
|
||||
<result column="sup_folder" property="supFolder" />
|
||||
<result column="auth_view_ids_name" property="authViewIdsName" />
|
||||
<result column="auth_manage_ids_name" property="authManageIdsName" />
|
||||
<result column="auth_view_ids" property="authViewIdsName" />
|
||||
<result column="auth_manage_ids" property="authManageIdsName" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.jero.modules.extRepo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IExtRepoDataService extends IService<ExtRepoData> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
int add(ExtRepoData extRepoData);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
void editById(ExtRepoData extRepoData);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ExtRepoData queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoData> queryList();
|
||||
|
||||
/**
|
||||
* 根据文件夹查询
|
||||
*
|
||||
* @param folserId
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoData> queryByFolder(String folserId);
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.jero.modules.extRepo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IExtRepoFolderService extends IService<ExtRepoFolder> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
void add(ExtRepoFolder extRepoFolder);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
void editById(ExtRepoFolder extRepoFolder);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ExtRepoFolder queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoFolder> queryList();
|
||||
|
||||
/**
|
||||
* 查询返回树结构
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ERFTreeData> queryTreeList();
|
||||
|
||||
|
||||
/**
|
||||
* 是否有管理权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
boolean haveManageAuth(String folderId);
|
||||
|
||||
/**
|
||||
* 是否有查看权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
boolean haveViewAuth(String folderId);
|
||||
|
||||
/**
|
||||
* 是否管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isManager();
|
||||
|
||||
/**
|
||||
* 查找子文件夹
|
||||
*
|
||||
* @param supFolder
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoFolder> getListBySupFolder(String supFolder);
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package com.jero.modules.extRepo.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import com.jero.modules.extRepo.mapper.ExtRepoDataMapper;
|
||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ExtRepoDataServiceImpl extends ServiceImpl<ExtRepoDataMapper, ExtRepoData> implements IExtRepoDataService {
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int add(ExtRepoData extRepoData) {
|
||||
//返回成功数量
|
||||
int res = 0;
|
||||
Date now = new Date();
|
||||
// 根据fileKey查找文件
|
||||
String fileIds = extRepoData.getFileKey();
|
||||
if (StringUtils.isNotBlank(fileIds)) {
|
||||
String[] fileIdsArr = fileIds.split(",");
|
||||
for (String fid : fileIdsArr) {
|
||||
OSSFile ossFile = ossFileService.getById(fid);
|
||||
if (ObjectUtil.isNotEmpty(ossFile)) {
|
||||
String fileName = ossFile.getFileName();
|
||||
extRepoData.setFileName(fileName);
|
||||
ExtRepoData erd = extRepoDataCopy(extRepoData, fid, now);
|
||||
save(erd);
|
||||
res++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private ExtRepoData extRepoDataCopy(ExtRepoData extRepoData, String key, Date now) {
|
||||
ExtRepoData res = new ExtRepoData();
|
||||
res.setId(extRepoData.getId());
|
||||
res.setCreateBy(extRepoData.getCreateBy());
|
||||
res.setCreateTime(now);
|
||||
res.setUpdateBy(extRepoData.getUpdateBy());
|
||||
res.setUpdateTime(now);
|
||||
res.setSysOrgCode(extRepoData.getSysOrgCode());
|
||||
res.setFileKey(key);
|
||||
res.setFileName(extRepoData.getFileName());
|
||||
res.setFileDescription(extRepoData.getFileDescription());
|
||||
res.setSupFolder(extRepoData.getSupFolder());
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ExtRepoData extRepoData) {
|
||||
Date now = new Date();
|
||||
extRepoData.setUpdateTime(now);
|
||||
saveOrUpdate(extRepoData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ExtRepoData queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ExtRepoData> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param folserId
|
||||
* @return
|
||||
*/
|
||||
public List<ExtRepoData> queryByFolder(String folserId) {
|
||||
LambdaQueryWrapper<ExtRepoData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExtRepoData::getSupFolder, folserId);
|
||||
List<ExtRepoData> list = this.list(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
package com.jero.modules.extRepo.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
import com.jero.modules.extRepo.enums.ExtRepoMamagerRoleIdEnum;
|
||||
import com.jero.modules.extRepo.mapper.ExtRepoFolderMapper;
|
||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import com.jero.modules.system.entity.SysUserRole;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, ExtRepoFolder> implements IExtRepoFolderService {
|
||||
@Autowired
|
||||
private ISysUserRoleService sysUserRoleService;
|
||||
/**
|
||||
* 一级文件夹的supFolder统一存root
|
||||
*/
|
||||
private static final String superFolder = "root";
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ExtRepoFolder extRepoFolder) {
|
||||
try {
|
||||
if (StringUtils.isEmpty(extRepoFolder.getSupFolder())) {
|
||||
//一级文件夹的supFolder统一存root,方便以后查找
|
||||
extRepoFolder.setSupFolder(superFolder);
|
||||
}
|
||||
Date now = new Date();
|
||||
extRepoFolder.setCreateTime(now);
|
||||
extRepoFolder.setUpdateTime(now);
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// extRepoFolder.setAuthManageName(extRepoFolder.getAuthManageName() + "," + sysUser.getUsername());
|
||||
// extRepoFolder.setAuthManageIds(extRepoFolder.getAuthManageIds() + "," + sysUser.getId());
|
||||
extRepoFolder.setAuthManageIdsName(extRepoFolder.getAuthManageIdsName());
|
||||
extRepoFolder.setAuthManageIds(extRepoFolder.getAuthManageIds());
|
||||
save(extRepoFolder);
|
||||
editOrderId(extRepoFolder);
|
||||
} catch (Exception ex) {
|
||||
log.error("添加对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("添加文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 同级文件夹,修改顺序号
|
||||
*
|
||||
* @param extRepoFolder
|
||||
*/
|
||||
private void editOrderId(ExtRepoFolder extRepoFolder) throws Exception {
|
||||
List<ExtRepoFolder> list = getListBySupFolder(extRepoFolder.getSupFolder());
|
||||
for (ExtRepoFolder erf : list) {
|
||||
if (erf.getOrderId() >= extRepoFolder.getOrderId() && !erf.getId().equals(extRepoFolder.getId())) {
|
||||
erf.setOrderId(erf.getOrderId() + 1);
|
||||
updateById(erf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExtRepoFolder> getListBySupFolder(String supFolder) {
|
||||
ExtRepoFolder erf = new ExtRepoFolder();
|
||||
erf.setSupFolder(supFolder);
|
||||
QueryWrapper<ExtRepoFolder> queryWrapper = QueryGenerator.initQueryWrapper(erf, new HashMap<>());
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ExtRepoFolder extRepoFolder) {
|
||||
try {
|
||||
//原有的记录
|
||||
ExtRepoFolder erf_orig = queryById(extRepoFolder.getId());
|
||||
Date now = new Date();
|
||||
extRepoFolder.setUpdateTime(now);
|
||||
saveOrUpdate(extRepoFolder);
|
||||
editOrderId(extRepoFolder);
|
||||
editAuth(erf_orig, extRepoFolder);
|
||||
} catch (Exception ex) {
|
||||
log.error("修改对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("修改文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改所有关联文件夹的权限
|
||||
*/
|
||||
private void editAuth(ExtRepoFolder erf_orig, ExtRepoFolder erf_new) throws Exception {
|
||||
//管理权限
|
||||
Map<String, String> authManage_orig = getAuthMap(erf_orig.getAuthManageIdsName(), erf_orig.getAuthManageIds());
|
||||
Map<String, String> authManage_new = getAuthMap(erf_new.getAuthManageIdsName(), erf_new.getAuthManageIds());
|
||||
//增加管理权限的人
|
||||
Map<String, String> addManageRole = getDefMap(authManage_new, authManage_orig);
|
||||
//删除管理权限的人
|
||||
Map<String, String> delManageRole = getDefMap(authManage_orig, authManage_new);
|
||||
|
||||
//查看权限
|
||||
Map<String, String> authView_orig = getAuthMap(erf_orig.getAuthViewIdsName(), erf_orig.getAuthViewIds());
|
||||
Map<String, String> authView_new = getAuthMap(erf_new.getAuthViewIdsName(), erf_new.getAuthViewIds());
|
||||
//增加查看权限的人
|
||||
Map<String, String> addViewRole = getDefMap(authView_new, authView_orig);
|
||||
//删除查看权限的人
|
||||
Map<String, String> delViewRole = getDefMap(authView_orig, authView_new);
|
||||
|
||||
List<ExtRepoFolder> allSubFolder = getAllSubFolder(erf_orig.getId());
|
||||
//存储变化的对象
|
||||
List<ExtRepoFolder> updateFolder = new ArrayList<ExtRepoFolder>();
|
||||
for (ExtRepoFolder erf : allSubFolder) {
|
||||
boolean isChange = false;
|
||||
Map<String, String> authManage_erf = getAuthMap(erf.getAuthManageIdsName(), erf.getAuthManageIds());
|
||||
Map<String, String> authView_erf = getAuthMap(erf.getAuthViewIdsName(), erf.getAuthViewIds());
|
||||
for (String add : addManageRole.keySet()) {
|
||||
if (!authManage_erf.keySet().contains(add)) {
|
||||
authManage_erf.put(add, addManageRole.get(add));
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
for (String del : delManageRole.keySet()) {
|
||||
//如果是创建人 不能删除管理权限
|
||||
if (authManage_erf.keySet().contains(del)) {
|
||||
if (!del.equals(erf_orig.getCreateBy())) {
|
||||
authManage_erf.remove(del);
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String add : addViewRole.keySet()) {
|
||||
if (!authView_erf.keySet().contains(add)) {
|
||||
authView_erf.put(add, addViewRole.get(add));
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
for (String del : delViewRole.keySet()) {
|
||||
if (authView_erf.keySet().contains(del)) {
|
||||
authView_erf.remove(del);
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
erf.setAuthManageIdsName(StringUtils.join(authManage_erf.keySet(), ","));
|
||||
erf.setAuthManageIds(StringUtils.join(authManage_erf.values(), ","));
|
||||
erf.setAuthViewIdsName(StringUtils.join(authView_erf.keySet(), ","));
|
||||
erf.setAuthViewIds(StringUtils.join(authView_erf.values(), ","));
|
||||
if (isChange) {
|
||||
updateFolder.add(erf);
|
||||
}
|
||||
}
|
||||
if (updateFolder.size() > 0) {
|
||||
updateBatchById(updateFolder);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到列表新增元素集合
|
||||
*
|
||||
* @param mapA
|
||||
* @param mapB
|
||||
* @return
|
||||
*/
|
||||
private Map<String, String> getDefMap(Map<String, String> mapA, Map<String, String> mapB) {
|
||||
Map<String, String> res = new HashMap<String, String>();
|
||||
for (String s : mapA.keySet()) {
|
||||
if (StringUtils.isNotBlank(s) && !mapB.keySet().contains(s)) {
|
||||
res.put(s, mapA.get(s));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private List<ExtRepoFolder> getAllSubFolder(String folderId) {
|
||||
List<ExtRepoFolder> resList = getListBySupFolder(folderId);
|
||||
List<ExtRepoFolder> subList = new ArrayList<ExtRepoFolder>();
|
||||
for (ExtRepoFolder erf : resList) {
|
||||
subList.addAll(getAllSubFolder(erf.getId()));
|
||||
}
|
||||
resList.addAll(subList);
|
||||
return resList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
try {
|
||||
removeById(id);
|
||||
} catch (Exception ex) {
|
||||
log.error("删除对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("删除文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ExtRepoFolder queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ExtRepoFolder> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ERFTreeData> queryTreeList() {
|
||||
try {
|
||||
List<ExtRepoFolder> list = queryList();
|
||||
List<ERFTreeData> res = getSubFolder(superFolder, list, 1);
|
||||
Collections.sort(res);
|
||||
return res;
|
||||
} catch (Exception ex) {
|
||||
log.error("查询对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("查询文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查找子文件夹,生成树结构
|
||||
*
|
||||
* @param supId
|
||||
* @param list
|
||||
* @param level 前端需要知道当前文件夹在哪一层
|
||||
* @return
|
||||
*/
|
||||
private List<ERFTreeData> getSubFolder(String supId, List<ExtRepoFolder> list, int level) throws Exception {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<ERFTreeData> resList = new ArrayList<ERFTreeData>();
|
||||
for (ExtRepoFolder erf : list) {
|
||||
if (supId.equals(erf.getSupFolder())) {
|
||||
ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId());
|
||||
//检查有没有权限查看
|
||||
date.setDisplay(haveViewAuth(erf.getSupFolder()));
|
||||
int childLevel = date.getLevel() + 1;
|
||||
date.setAuthManageIdsName(erf.getAuthManageIdsName());
|
||||
date.setAuthManageIds(erf.getAuthManageIds());
|
||||
date.setAuthViewIdsName(erf.getAuthViewIdsName());
|
||||
date.setAuthViewIds(erf.getAuthViewIds());
|
||||
date.setChildren(getSubFolder(erf.getId(), list, childLevel));
|
||||
date.sortChildren();
|
||||
resList.add(date);
|
||||
}
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
private List<String> getStringList(String listStr) {
|
||||
List<String> res = new ArrayList<String>();
|
||||
if (null != listStr) {
|
||||
res = Arrays.asList(listStr.split(","));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private Map<String, String> getAuthMap(String strKey, String strValue) {
|
||||
Map<String, String> resMap = new HashMap<String, String>();
|
||||
List<String> keyList = getStringList(strKey);
|
||||
List<String> valueList = getStringList(strValue);
|
||||
for (int i = 0; i < keyList.size(); i++) {
|
||||
resMap.put(keyList.get(i), valueList.get(i));
|
||||
}
|
||||
return resMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是文件夹管理员角色
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isManager() {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||
// 查询当前登录用户角色
|
||||
List<SysUserRole> userRoles = sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, loginUser.getId())); // 查询用户所有角色
|
||||
List<String> userRoleIds = new ArrayList<>(); // 用户管理员/对外报告管理员
|
||||
if (CollectionUtil.isNotEmpty(userRoles)) {
|
||||
List<String> roleIdList = ExtRepoMamagerRoleIdEnum.getIdList();
|
||||
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
userRoleIds = roleIdList.stream().filter(e -> userRoleIdList.contains(e)).collect(Collectors.toList());
|
||||
return !CollectionUtil.isEmpty(userRoleIds);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有管理权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean haveManageAuth(String folderId) {
|
||||
boolean res = false;
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
res = isManager();
|
||||
ExtRepoFolder erf = queryById(folderId);
|
||||
if (null != erf) {
|
||||
res = res || getStringList(erf.getAuthManageIds()).contains(sysUser.getId());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有查看权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
public boolean haveViewAuth(String folderId) {
|
||||
boolean res = false;
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
res = isManager();
|
||||
ExtRepoFolder erf = queryById(folderId);
|
||||
if (null != erf) {
|
||||
res = res || getStringList(erf.getAuthManageIds()).contains(sysUser.getId())
|
||||
|| getStringList(erf.getAuthViewIds()).contains(sysUser.getId());
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="Country Card模板维护表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/countryCardTempEO")
|
||||
@Slf4j
|
||||
public class CountryCardTempEOController extends JeroController<CountryCardTempEO, ICountryCardTempEOService> {
|
||||
@Autowired
|
||||
private ICountryCardTempEOService countryCardTempEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-分页列表查询")
|
||||
@ApiOperation(value="Country Card模板维护表-分页列表查询", notes="Country Card模板维护表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(CountryCardTempEO countryCardTempEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardTempEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardTempEO, req.getParameterMap());
|
||||
Page<CountryCardTempEO> page = new Page<CountryCardTempEO>(pageNo, pageSize);
|
||||
IPage<CountryCardTempEO> pageList = countryCardTempEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-列表查询")
|
||||
@ApiOperation(value="Country Card模板维护表-列表查询", notes="Country Card模板维护表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryCardTempEO>> queryList() {
|
||||
List<CountryCardTempEO> list = countryCardTempEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-添加")
|
||||
@ApiOperation(value="Country Card模板维护表-添加", notes="Country Card模板维护表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody CountryCardTempEO countryCardTempEO) {
|
||||
countryCardTempEOService.add(countryCardTempEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-编辑")
|
||||
@ApiOperation(value="Country Card模板维护表-编辑", notes="Country Card模板维护表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody CountryCardTempEO countryCardTempEO) {
|
||||
countryCardTempEOService.editById(countryCardTempEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-通过id删除")
|
||||
@ApiOperation(value="Country Card模板维护表-通过id删除", notes="Country Card模板维护表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
countryCardTempEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-批量删除")
|
||||
@ApiOperation(value="Country Card模板维护表-批量删除", notes="Country Card模板维护表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.countryCardTempEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-通过id查询")
|
||||
@ApiOperation(value="Country Card模板维护表-通过id查询", notes="Country Card模板维护表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CountryCardTempEO countryCardTempEO = countryCardTempEOService.queryById(id);
|
||||
if(countryCardTempEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(countryCardTempEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param countryCardTempEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, CountryCardTempEO countryCardTempEO) {
|
||||
return super.exportXls(request, countryCardTempEO, CountryCardTempEO.class, "Country Card模板维护表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CountryCardTempEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="Country Card模板维护-字典项表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/countryCardTempItemEO")
|
||||
@Slf4j
|
||||
public class CountryCardTempItemEOController extends JeroController<CountryCardTempItemEO, ICountryCardTempItemEOService> {
|
||||
@Autowired
|
||||
private ICountryCardTempItemEOService countryCardTempItemEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-分页列表查询")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-分页列表查询", notes="Country Card模板维护-字典项表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(CountryCardTempItemEO countryCardTempItemEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardTempItemEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardTempItemEO, req.getParameterMap());
|
||||
Page<CountryCardTempItemEO> page = new Page<CountryCardTempItemEO>(pageNo, pageSize);
|
||||
IPage<CountryCardTempItemEO> pageList = countryCardTempItemEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-列表查询")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-列表查询", notes="Country Card模板维护-字典项表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryCardTempItemEO>> queryList() {
|
||||
List<CountryCardTempItemEO> list = countryCardTempItemEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-添加")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-添加", notes="Country Card模板维护-字典项表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody CountryCardTempItemEO countryCardTempItemEO) {
|
||||
countryCardTempItemEOService.add(countryCardTempItemEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-编辑")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-编辑", notes="Country Card模板维护-字典项表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody CountryCardTempItemEO countryCardTempItemEO) {
|
||||
countryCardTempItemEOService.editById(countryCardTempItemEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-通过id删除")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-通过id删除", notes="Country Card模板维护-字典项表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
countryCardTempItemEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-批量删除")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-批量删除", notes="Country Card模板维护-字典项表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.countryCardTempItemEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-通过id查询")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-通过id查询", notes="Country Card模板维护-字典项表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CountryCardTempItemEO countryCardTempItemEO = countryCardTempItemEOService.queryById(id);
|
||||
if(countryCardTempItemEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(countryCardTempItemEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param countryCardTempItemEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, CountryCardTempItemEO countryCardTempItemEO) {
|
||||
return super.exportXls(request, countryCardTempItemEO, CountryCardTempItemEO.class, "Country Card模板维护-字典项表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CountryCardTempItemEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseBrowsingHistoryEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库浏览历史表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseBrowsingHistoryEOController extends JeroController<ProblemKnowledgeBaseBrowsingHistoryEO, IProblemKnowledgeBaseBrowsingHistoryEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseBrowsingHistoryEOService problemKnowledgeBaseBrowsingHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-分页列表查询", notes="问题知识库浏览历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseBrowsingHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseBrowsingHistoryEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseBrowsingHistoryEO> page = new Page<ProblemKnowledgeBaseBrowsingHistoryEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseBrowsingHistoryEO> pageList = problemKnowledgeBaseBrowsingHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-列表查询", notes="问题知识库浏览历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseBrowsingHistoryEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseBrowsingHistoryEO> list = problemKnowledgeBaseBrowsingHistoryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-添加")
|
||||
@ApiOperation(value="问题知识库浏览历史表-添加", notes="问题知识库浏览历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.add(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-编辑")
|
||||
@ApiOperation(value="问题知识库浏览历史表-编辑", notes="问题知识库浏览历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.editById(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id删除", notes="问题知识库浏览历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-批量删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-批量删除", notes="问题知识库浏览历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseBrowsingHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id查询", notes="问题知识库浏览历史表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO = problemKnowledgeBaseBrowsingHistoryEOService.queryById(id);
|
||||
if(problemKnowledgeBaseBrowsingHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseBrowsingHistoryEO, ProblemKnowledgeBaseBrowsingHistoryEO.class, "问题知识库浏览历史表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseBrowsingHistoryEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseClassifyEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库-分类表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseClassifyEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseClassifyEOController extends JeroController<ProblemKnowledgeBaseClassifyEO, IProblemKnowledgeBaseClassifyEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseClassifyEOService problemKnowledgeBaseClassifyEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库-分类表-分页列表查询", notes="问题知识库-分类表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseClassifyEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseClassifyEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseClassifyEO> page = new Page<ProblemKnowledgeBaseClassifyEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseClassifyEO> pageList = problemKnowledgeBaseClassifyEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-列表查询")
|
||||
@ApiOperation(value="问题知识库-分类表-列表查询", notes="问题知识库-分类表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseClassifyEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseClassifyEO> list = problemKnowledgeBaseClassifyEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-添加")
|
||||
@ApiOperation(value="问题知识库-分类表-添加", notes="问题知识库-分类表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
problemKnowledgeBaseClassifyEOService.add(problemKnowledgeBaseClassifyEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-编辑")
|
||||
@ApiOperation(value="问题知识库-分类表-编辑", notes="问题知识库-分类表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
problemKnowledgeBaseClassifyEOService.editById(problemKnowledgeBaseClassifyEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-通过id删除")
|
||||
@ApiOperation(value="问题知识库-分类表-通过id删除", notes="问题知识库-分类表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseClassifyEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-批量删除")
|
||||
@ApiOperation(value="问题知识库-分类表-批量删除", notes="问题知识库-分类表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseClassifyEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-通过id查询")
|
||||
@ApiOperation(value="问题知识库-分类表-通过id查询", notes="问题知识库-分类表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO = problemKnowledgeBaseClassifyEOService.queryById(id);
|
||||
if(problemKnowledgeBaseClassifyEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseClassifyEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseClassifyEO, ProblemKnowledgeBaseClassifyEO.class, "问题知识库-分类表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseClassifyEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库收藏表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseCollectEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseCollectEOController extends JeroController<ProblemKnowledgeBaseCollectEO, IProblemKnowledgeBaseCollectEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCollectEOService problemKnowledgeBaseCollectEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-分页列表查询", notes="问题知识库收藏表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCollectEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseCollectEO> page = new Page<ProblemKnowledgeBaseCollectEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCollectEO> pageList = problemKnowledgeBaseCollectEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-列表查询", notes="问题知识库收藏表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCollectEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseCollectEO> list = problemKnowledgeBaseCollectEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-添加")
|
||||
@ApiOperation(value="问题知识库收藏表-添加", notes="问题知识库收藏表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.add(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-编辑")
|
||||
@ApiOperation(value="问题知识库收藏表-编辑", notes="问题知识库收藏表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.editById(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id删除")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id删除", notes="问题知识库收藏表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCollectEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-批量删除")
|
||||
@ApiOperation(value="问题知识库收藏表-批量删除", notes="问题知识库收藏表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCollectEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id查询")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id查询", notes="问题知识库收藏表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO = problemKnowledgeBaseCollectEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCollectEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCollectEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCollectEO, ProblemKnowledgeBaseCollectEO.class, "问题知识库收藏表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCollectEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库评论表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseCommentEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseCommentEOController extends JeroController<ProblemKnowledgeBaseCommentEO, IProblemKnowledgeBaseCommentEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCommentEOService problemKnowledgeBaseCommentEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-分页列表查询", notes="问题知识库评论表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCommentEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseCommentEO> page = new Page<ProblemKnowledgeBaseCommentEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCommentEO> pageList = problemKnowledgeBaseCommentEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-列表查询", notes="问题知识库评论表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCommentEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseCommentEO> list = problemKnowledgeBaseCommentEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-添加")
|
||||
@ApiOperation(value="问题知识库评论表-添加", notes="问题知识库评论表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.add(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-编辑")
|
||||
@ApiOperation(value="问题知识库评论表-编辑", notes="问题知识库评论表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.editById(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id删除")
|
||||
@ApiOperation(value="问题知识库评论表-通过id删除", notes="问题知识库评论表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCommentEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-批量删除")
|
||||
@ApiOperation(value="问题知识库评论表-批量删除", notes="问题知识库评论表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCommentEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id查询")
|
||||
@ApiOperation(value="问题知识库评论表-通过id查询", notes="问题知识库评论表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO = problemKnowledgeBaseCommentEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCommentEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCommentEO, ProblemKnowledgeBaseCommentEO.class, "问题知识库评论表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCommentEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnowledgeBaseEO, IProblemKnowledgeBaseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库表-分页列表查询", notes="问题知识库表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-列表查询")
|
||||
@ApiOperation(value="问题知识库表-列表查询", notes="问题知识库表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseEO> list = problemKnowledgeBaseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-添加")
|
||||
@ApiOperation(value="问题知识库表-添加", notes="问题知识库表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.add(problemKnowledgeBaseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-编辑")
|
||||
@ApiOperation(value="问题知识库表-编辑", notes="问题知识库表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.editById(problemKnowledgeBaseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id删除")
|
||||
@ApiOperation(value="问题知识库表-通过id删除", notes="问题知识库表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-批量删除")
|
||||
@ApiOperation(value="问题知识库表-批量删除", notes="问题知识库表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id查询")
|
||||
@ApiOperation(value="问题知识库表-通过id查询", notes="问题知识库表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = problemKnowledgeBaseEOService.queryById(id);
|
||||
if(problemKnowledgeBaseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseEO, ProblemKnowledgeBaseEO.class, "问题知识库表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBasePraiseEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库点赞表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBasePraiseEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBasePraiseEOController extends JeroController<ProblemKnowledgeBasePraiseEO, IProblemKnowledgeBasePraiseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBasePraiseEOService problemKnowledgeBasePraiseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-分页列表查询", notes="问题知识库点赞表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBasePraiseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBasePraiseEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBasePraiseEO> page = new Page<ProblemKnowledgeBasePraiseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBasePraiseEO> pageList = problemKnowledgeBasePraiseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-列表查询", notes="问题知识库点赞表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBasePraiseEO>> queryList() {
|
||||
List<ProblemKnowledgeBasePraiseEO> list = problemKnowledgeBasePraiseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-添加")
|
||||
@ApiOperation(value="问题知识库点赞表-添加", notes="问题知识库点赞表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.add(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-编辑")
|
||||
@ApiOperation(value="问题知识库点赞表-编辑", notes="问题知识库点赞表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.editById(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id删除")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id删除", notes="问题知识库点赞表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBasePraiseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-批量删除")
|
||||
@ApiOperation(value="问题知识库点赞表-批量删除", notes="问题知识库点赞表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBasePraiseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id查询")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id查询", notes="问题知识库点赞表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO = problemKnowledgeBasePraiseEOService.queryById(id);
|
||||
if(problemKnowledgeBasePraiseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBasePraiseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBasePraiseEO, ProblemKnowledgeBasePraiseEO.class, "问题知识库点赞表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBasePraiseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseUserEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库展示权限表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseUserEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseUserEOController extends JeroController<ProblemKnowledgeBaseUserEO, IProblemKnowledgeBaseUserEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseUserEOService problemKnowledgeBaseUserEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库展示权限表-分页列表查询", notes="问题知识库展示权限表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseUserEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseUserEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseUserEO> page = new Page<ProblemKnowledgeBaseUserEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseUserEO> pageList = problemKnowledgeBaseUserEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-列表查询")
|
||||
@ApiOperation(value="问题知识库展示权限表-列表查询", notes="问题知识库展示权限表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseUserEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseUserEO> list = problemKnowledgeBaseUserEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-添加")
|
||||
@ApiOperation(value="问题知识库展示权限表-添加", notes="问题知识库展示权限表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
problemKnowledgeBaseUserEOService.add(problemKnowledgeBaseUserEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-编辑")
|
||||
@ApiOperation(value="问题知识库展示权限表-编辑", notes="问题知识库展示权限表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
problemKnowledgeBaseUserEOService.editById(problemKnowledgeBaseUserEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-通过id删除")
|
||||
@ApiOperation(value="问题知识库展示权限表-通过id删除", notes="问题知识库展示权限表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseUserEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-批量删除")
|
||||
@ApiOperation(value="问题知识库展示权限表-批量删除", notes="问题知识库展示权限表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseUserEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-通过id查询")
|
||||
@ApiOperation(value="问题知识库展示权限表-通过id查询", notes="问题知识库展示权限表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO = problemKnowledgeBaseUserEOService.queryById(id);
|
||||
if(problemKnowledgeBaseUserEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseUserEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseUserEO, ProblemKnowledgeBaseUserEO.class, "问题知识库展示权限表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseUserEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("country_card_temp")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="country_card_temp对象", description="Country Card模板维护表")
|
||||
public class CountryCardTempEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**标签名称*/
|
||||
@Excel(name = "标签名称", width = 15)
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private java.lang.String lableName;
|
||||
|
||||
/**标签类型*/
|
||||
@Excel(name = "标签类型", width = 15)
|
||||
@ApiModelProperty(value = "标签类型")
|
||||
private java.lang.String lableType;
|
||||
|
||||
/**展示顺序*/
|
||||
@Excel(name = "展示顺序", width = 15)
|
||||
@ApiModelProperty(value = "展示顺序")
|
||||
private java.lang.Integer orderNum;
|
||||
|
||||
/**关联网址*/
|
||||
@Excel(name = "关联网址", width = 15)
|
||||
@ApiModelProperty(value = "关联网址")
|
||||
private java.lang.String relevantUrl;
|
||||
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@ApiModelProperty(value = "描述")
|
||||
private java.lang.String description;
|
||||
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("country_card_temp_item")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="country_card_temp_item对象", description="Country Card模板维护-字典项表")
|
||||
public class CountryCardTempItemEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**模板维护表id*/
|
||||
@Excel(name = "模板维护表id", width = 15)
|
||||
@ApiModelProperty(value = "模板维护表id")
|
||||
private java.lang.String countryCardTempId;
|
||||
|
||||
/**字典项值*/
|
||||
@Excel(name = "字典项值", width = 15)
|
||||
@ApiModelProperty(value = "字典项值")
|
||||
private java.lang.String itemValue;
|
||||
|
||||
/**字典项中文名称*/
|
||||
@Excel(name = "字典项中文名称", width = 15)
|
||||
@ApiModelProperty(value = "字典项中文名称")
|
||||
private java.lang.String itemText;
|
||||
|
||||
/**字典项英文名称*/
|
||||
@Excel(name = "字典项英文名称", width = 15)
|
||||
@ApiModelProperty(value = "字典项英文名称")
|
||||
private java.lang.String enName;
|
||||
|
||||
/**逻辑删除标识*/
|
||||
@Excel(name = "逻辑删除标识", width = 15)
|
||||
@ApiModelProperty(value = "逻辑删除标识")
|
||||
private java.lang.String delFlag;
|
||||
|
||||
/**状态(1启用 0不启用)*/
|
||||
@Excel(name = "状态(1启用 0不启用)", width = 15)
|
||||
@ApiModelProperty(value = "状态(1启用 0不启用)")
|
||||
private java.lang.String status;
|
||||
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@ApiModelProperty(value = "描述")
|
||||
private java.lang.String description;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_browsing_history")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_browsing_history对象", description="问题知识库浏览历史表")
|
||||
public class ProblemKnowledgeBaseBrowsingHistoryEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**浏览人员id*/
|
||||
@Excel(name = "浏览人员id", width = 15)
|
||||
@ApiModelProperty(value = "浏览人员id")
|
||||
private java.lang.String browsingUserId;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_classify")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_classify对象", description="问题知识库-分类表")
|
||||
public class ProblemKnowledgeBaseClassifyEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题标签*/
|
||||
@Excel(name = "问题标签", width = 15)
|
||||
@ApiModelProperty(value = "问题标签")
|
||||
private java.lang.String problemLabel;
|
||||
|
||||
/**负责人id*/
|
||||
@Excel(name = "负责人id", width = 15)
|
||||
@ApiModelProperty(value = "负责人id")
|
||||
private java.lang.String chargePersonId;
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_collect")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_collect对象", description="问题知识库收藏表")
|
||||
public class ProblemKnowledgeBaseCollectEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**收藏用户id*/
|
||||
@Excel(name = "收藏用户id", width = 15)
|
||||
@ApiModelProperty(value = "收藏用户id")
|
||||
private java.lang.String collectUserId;
|
||||
|
||||
/**收藏状态*/
|
||||
@Excel(name = "收藏状态", width = 15)
|
||||
@ApiModelProperty(value = "收藏状态")
|
||||
private java.lang.String collectStatus;
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_comment")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_comment对象", description="问题知识库评论表")
|
||||
public class ProblemKnowledgeBaseCommentEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**评论内容*/
|
||||
@Excel(name = "评论内容", width = 15)
|
||||
@ApiModelProperty(value = "评论内容")
|
||||
private java.lang.String commentContent;
|
||||
|
||||
/**评论用户id*/
|
||||
@Excel(name = "评论用户id", width = 15)
|
||||
@ApiModelProperty(value = "评论用户id")
|
||||
private java.lang.String commentUserId;
|
||||
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base对象", description="问题知识库表")
|
||||
public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
|
||||
/**问题分类*/
|
||||
@Excel(name = "问题分类", width = 15)
|
||||
@ApiModelProperty(value = "问题分类")
|
||||
private java.lang.String problemType;
|
||||
|
||||
/**市场*/
|
||||
@Excel(name = "市场", width = 15)
|
||||
@ApiModelProperty(value = "市场")
|
||||
private java.lang.String targetMarket;
|
||||
|
||||
/**文档库id*/
|
||||
@Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private java.lang.String bussDocumentLibraryId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "标准编号", width = 15)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private java.lang.String standNumber;
|
||||
|
||||
/**标准标题*/
|
||||
@Excel(name = "标准标题", width = 15)
|
||||
@ApiModelProperty(value = "标准标题")
|
||||
private java.lang.String standTitle;
|
||||
|
||||
/**内容(正文)*/
|
||||
@Excel(name = "内容(正文)", width = 15)
|
||||
private transient java.lang.String contentString;
|
||||
|
||||
private byte[] content;
|
||||
|
||||
public byte[] getContent(){
|
||||
if(contentString==null){
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return contentString.getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getContentString(){
|
||||
if(content==null || content.length==0){
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
return new String(content,"UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**附件*/
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String accessoryFile;
|
||||
|
||||
/**展示权限*/
|
||||
@Excel(name = "展示权限", width = 15)
|
||||
@ApiModelProperty(value = "展示权限")
|
||||
private java.lang.String showPermissions;
|
||||
|
||||
/**发布人id*/
|
||||
@Excel(name = "展示权限", width = 15)
|
||||
@ApiModelProperty(value = "发布人id")
|
||||
private java.lang.String releaseUserId;
|
||||
|
||||
/**发布日期*/
|
||||
@Excel(name = "发布日期", width = 15)
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private java.lang.String releaseTime;
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_praise")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_praise对象", description="问题知识库点赞表")
|
||||
public class ProblemKnowledgeBasePraiseEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**点赞人员id*/
|
||||
@Excel(name = "点赞人员id", width = 15)
|
||||
@ApiModelProperty(value = "点赞人员id")
|
||||
private java.lang.String praiseUserId;
|
||||
|
||||
/**点赞状态*/
|
||||
@Excel(name = "点赞状态", width = 15)
|
||||
@ApiModelProperty(value = "点赞状态")
|
||||
private java.lang.String praiseStatus;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_user")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_user对象", description="问题知识库展示权限表")
|
||||
public class ProblemKnowledgeBaseUserEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**用户id*/
|
||||
@Excel(name = "用户id", width = 15)
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private java.lang.String userId;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CountryCardTempEOMapper extends BaseMapper<CountryCardTempEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CountryCardTempItemEOMapper extends BaseMapper<CountryCardTempItemEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseBrowsingHistoryEOMapper extends BaseMapper<ProblemKnowledgeBaseBrowsingHistoryEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseClassifyEOMapper extends BaseMapper<ProblemKnowledgeBaseClassifyEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseCollectEOMapper extends BaseMapper<ProblemKnowledgeBaseCollectEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseCommentEOMapper extends BaseMapper<ProblemKnowledgeBaseCommentEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseEOMapper extends BaseMapper<ProblemKnowledgeBaseEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBasePraiseEOMapper extends BaseMapper<ProblemKnowledgeBasePraiseEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseUserEOMapper extends BaseMapper<ProblemKnowledgeBaseUserEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempEOMapper">
|
||||
<resultMap id="CountryCardTempEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="lable_name" property="lableName" />
|
||||
<result column="lable_type" property="lableType" />
|
||||
<result column="order_num" property="orderNum" />
|
||||
<result column="relevant_url" property="relevantUrl" />
|
||||
<result column="description" property="description" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempItemEOMapper">
|
||||
<resultMap id="CountryCardTempItemEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="country_card_temp_id" property="countryCardTempId" />
|
||||
<result column="item_value" property="itemValue" />
|
||||
<result column="item_text" property="itemText" />
|
||||
<result column="en_name" property="enName" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="status" property="status" />
|
||||
<result column="description" property="description" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseBrowsingHistoryEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseBrowsingHistoryEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="browsing_user_id" property="browsingUserId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseClassifyEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseClassifyEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_label" property="problemLabel" />
|
||||
<result column="charge_person_id" property="chargePersonId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCollectEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseCollectEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="collect_user_id" property="collectUserId" />
|
||||
<result column="collect_status" property="collectStatus" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCommentEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseCommentEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="comment_content" property="commentContent" />
|
||||
<result column="comment_user_id" property="commentUserId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?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="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="title" property="title" />
|
||||
<result column="problem_type" property="problemType" />
|
||||
<result column="target_market" property="targetMarket" />
|
||||
<result column="buss_document_library_id" property="bussDocumentLibraryId" />
|
||||
<result column="stand_number" property="standNumber" />
|
||||
<result column="stand_title" property="standTitle" />
|
||||
<result column="content" property="content" />
|
||||
<result column="accessory_file" property="accessoryFile" />
|
||||
<result column="show_permissions" property="showPermissions" />
|
||||
<result column="release_user_id" property="releaseUserId" />
|
||||
<result column="release_time" property="releaseTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user