diff --git a/config/db/V7.1__sys_dict_data_col.sql b/config/db/V7.1__sys_dict_data_col.sql new file mode 100644 index 00000000..3f6ffc79 --- /dev/null +++ b/config/db/V7.1__sys_dict_data_col.sql @@ -0,0 +1,4 @@ +ALTER TABLE `sys_dict_data` +ADD COLUMN `status` int NULL DEFAULT 1 COMMENT '启用状态(0未启用 1启用)' AFTER `update_date`; +ALTER TABLE `sys_dict_type` +ADD COLUMN `status` int NULL DEFAULT 1 COMMENT '启用状态(0未启用 1启用)' AFTER `update_date`; \ No newline at end of file diff --git a/config/db/V7.2__sys_user_add_col.sql b/config/db/V7.2__sys_user_add_col.sql new file mode 100644 index 00000000..299510e8 --- /dev/null +++ b/config/db/V7.2__sys_user_add_col.sql @@ -0,0 +1 @@ +ALTER TABLE `sys_user` ADD COLUMN `frequency` int NULL DEFAULT 0 COMMENT '登录失败次数'; \ No newline at end of file diff --git a/config/db/V7.3__add_sys_data.sql b/config/db/V7.3__add_sys_data.sql new file mode 100644 index 00000000..bf6ffb18 --- /dev/null +++ b/config/db/V7.3__add_sys_data.sql @@ -0,0 +1,11 @@ +INSERT INTO `sys_dict_type`(`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357067014803457, ' encryptedRoute', '加密路由', '', 0, 1067246875800000001, '2022-11-15 11:21:24', 1067246875800000001, '2022-11-15 11:21:24', 1); + +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357815098281986, 1592357067014803457, '个人中心', '/personalCenter', '', 0, 1067246875800000001, '2022-11-15 11:24:22', 1067246875800000001, '2022-11-15 11:24:22', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357749759414274, 1592357067014803457, '消息通知', '/mynoticeView', '', 0, 1067246875800000001, '2022-11-15 11:24:07', 1067246875800000001, '2022-11-15 11:24:07', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357668599631874, 1592357067014803457, '融合服务详情', '/integrationServicesDetails', '', 0, 1067246875800000001, '2022-11-15 11:23:47', 1067246875800000001, '2022-11-15 11:23:47', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357561145757698, 1592357067014803457, '融合服务', '/integrationServices', '', 0, 1067246875800000001, '2022-11-15 11:23:22', 1067246875800000001, '2022-11-15 11:23:22', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357495567814658, 1592357067014803457, '能力统计', '/abilityStatistics', '', 0, 1067246875800000001, '2022-11-15 11:23:06', 1067246875800000001, '2022-11-15 11:23:06', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357417113358338, 1592357067014803457, '能力详情', '/details', '', 0, 1067246875800000001, '2022-11-15 11:22:47', 1067246875800000001, '2022-11-15 11:22:47', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357337807458305, 1592357067014803457, '能力集市', '/DetailsPageconetent', '', 0, 1067246875800000001, '2022-11-15 11:22:29', 1067246875800000001, '2022-11-15 11:22:29', 1); + + diff --git a/config/db/V7.4__create_policy_cloud_service.sql b/config/db/V7.4__create_policy_cloud_service.sql new file mode 100644 index 00000000..9f40fe5a --- /dev/null +++ b/config/db/V7.4__create_policy_cloud_service.sql @@ -0,0 +1,78 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for policy_cloud_service +-- ---------------------------- +DROP TABLE IF EXISTS `policy_cloud_service`; +CREATE TABLE `policy_cloud_service` ( + `service_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `service_item_tier1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `service_item_tier2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `service_description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `specification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `year` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of policy_cloud_service +-- ---------------------------- +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置1H4G', '1H4G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置1H4G', '1H4G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置2H4G', '2H4G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置2H8G', '2H8G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置2H16G', '2H16G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置4H8G', '4H8G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置4H16G', '4H16G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置4H32G', '4H32G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置8H16G', '8H16G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置8H32G', '8H32G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置8H64G', '8H64G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置16H32G', '16H32G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置16H64G', '16H64G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置32H64G', '32H64G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置32H128G', '32H128G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机系统盘', '云主机系统盘', '40G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机数据盘', '云主机数据盘', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '非结构化数据对象存储服务', '非结构化数据对象存储服务', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '数据异地容灾服务', '数据异地容灾服务', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '数据本地备份及快速恢复服务', '数据本地备份及快速恢复服务', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '机柜服务', '机柜租赁服务', '机柜租赁服务', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '1200MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '2400MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '6000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '12000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '1000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '12000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '4000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '6000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '12000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库数据盘', '云数据库数据盘', '100MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '负载均衡', '负载均衡服务', '负载均衡服务', '实例', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('安全服务', '主机数据库应用安全服务', '等保三级标准服务', '云主机安全服务-等保三级服务', '云主机', '必选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('安全服务', '主机数据库应用安全服务', '数据安全服务', '数据安全服务', '数据库实例', '必选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('安全服务', '主机数据库应用安全服务', '应用安全服务', '应用安全服务', '云主机', '必选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('运营服务', '增值服务', '同城应用容灾服务', '同城应用容灾服务', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据分析服务', '数据分析服务', '数据分析服务数据离线计算', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据分析服务', '数据分析服务', '数据分析服务数据实时计算', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据分析服务', '数据分析服务', '数据分析服务数据同步服务', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据脱敏服务', '数据脱敏服务', '数据脱敏服务隐私数据发现', '套', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据脱敏服务', '数据脱敏服务', '数据脱敏服务隐私数据漂泊', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '大数据存储', '非结构化数据存储', '大数据存储服务非结构化数据存储', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '大数据存储', '结构化数据存储', '大数据存储服务结构化数据存储', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '商用操作系统套餐', 'Windows server 2008 、2012、2016数据中心版等安装、授权激活、维护', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '商用操作系统套餐', 'Redhat 6.6以上不同版本系统安装和维护', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '商用操作系统套餐', 'CentOS 6.5以上不同版本系统安装和维护', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云基础套餐', '双核(1.6Ghz)/3G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口或1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云基础套餐', '双核(1.6Ghz)/3G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口或1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云标准套餐', '双核(2.0Ghz)/5G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口或1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云高级套餐', '四核2.4GHz、8G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口和1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云数据盘', '以100GB为单位', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '信息系统二级等级保护测评服务', '按照国家公安部门等级保护制度要求提供物理安全、网络安全、主机安全、数据安全、应用安全等测评服务(二级)。本服务目录价格为省公安厅最低价。', '信息系统', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '信息系统三级等级保护测评服务', '按照国家公安部门等级保护制度要求提供物理安全、网络安全、主机安全、数据安全、应用安全等测评服务(三级)。本服务目录价格为省公安厅最低价。', '信息系统', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '网页防篡改服务', '增强版网页防篡改服务。', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '商用密码安全评估', '按照国家《密码安全法》对云平台或云主机做商用密码安全全量评估。最终出具业内标准的商密评估报告。', '系统', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '蜜罐服务', '融合网络欺骗和主动防御威胁检测防御系统,通过暗设陷阱,主动诱导攻击,能够动态感知内网攻击行为,及时精准的定位攻击源,并隐匿真实资产,保障业务系统的安全运行。', '套', '可选', '2022'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/config/db/V7.5__new_table.sql b/config/db/V7.5__new_table.sql new file mode 100644 index 00000000..9d05cda2 --- /dev/null +++ b/config/db/V7.5__new_table.sql @@ -0,0 +1,31 @@ +-- ---------------------------- +-- Table structure for t_will_apply_camera +-- ---------------------------- +DROP TABLE IF EXISTS `t_will_apply_camera`; +CREATE TABLE `t_will_apply_camera` ( + `id` bigint(0) NOT NULL COMMENT '主键ID', + `user_id` bigint(0) NULL DEFAULT NULL COMMENT '用户', + `del_flag` int(0) NULL DEFAULT NULL COMMENT '删除标志:0正常,1删除,', + `camera_point_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `channel_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `channel_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `channel_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `check_status` int(0) NULL DEFAULT NULL, + `gpsX` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `gpsY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `idt_camera_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `management_unit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `node_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `status` int(0) NULL DEFAULT NULL, + `creator` bigint(0) NULL DEFAULT NULL, + `create_date` datetime(0) NULL DEFAULT NULL, + `updater` bigint(0) NULL DEFAULT NULL, + `update_date` datetime(0) NULL DEFAULT NULL, +PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + + diff --git a/config/db/V7.6__resource_add_col.sql b/config/db/V7.6__resource_add_col.sql new file mode 100644 index 00000000..9d044101 --- /dev/null +++ b/config/db/V7.6__resource_add_col.sql @@ -0,0 +1 @@ +ALTER TABLE tb_data_resource ADD COLUMN `undercarriage_instance_id` bigint NULL COMMENT '下架流程实例ID'; \ No newline at end of file diff --git a/config/db/V7.7__resource_add_price.sql b/config/db/V7.7__resource_add_price.sql new file mode 100644 index 00000000..08b70e42 --- /dev/null +++ b/config/db/V7.7__resource_add_price.sql @@ -0,0 +1,11 @@ +-- 2022-11-22 资源增加价格字段,申请表增加申请价格 + +ALTER TABLE t_ability_application ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + +ALTER TABLE tb_data_resource ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom_book ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + + diff --git a/config/db/V7.8__role_user_add_col.sql b/config/db/V7.8__role_user_add_col.sql new file mode 100644 index 00000000..628b0b3c --- /dev/null +++ b/config/db/V7.8__role_user_add_col.sql @@ -0,0 +1,5 @@ +ALTER TABLE sys_role_user + ADD COLUMN `del_flag` INT NOT NULL DEFAULT 0 COMMENT '删除标志:0正常,1删除', + ADD COLUMN `updater` BIGINT NULL COMMENT '修改人', + ADD COLUMN `update_date` datetime(0) NULL COMMENT '修改时间'; + diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java index 6ecd64cd..607b2e1d 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java @@ -7,6 +7,7 @@ import io.renren.common.constant.Constant; import io.renren.common.dto.AuditingBaseDTO; import io.renren.common.page.PageData; import io.renren.common.utils.CodeGenerationUtils; +import io.renren.common.utils.DateUtils; import io.renren.common.utils.Result; import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.group.AddGroup; @@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.CompletableFuture; @@ -148,7 +150,8 @@ public class AbilityCenterControllerV2 { } break; default: { - executor.execute(() -> deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user)); + //executor.execute(() -> deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user)); + deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user); } } return new Result().ok(LocalDateTime.now().toString()); @@ -156,10 +159,26 @@ public class AbilityCenterControllerV2 { private void deal(TAbilityBatchApplicationDTO abilityBatchApplicationDTO, Optional deptDTO, String applyFlag, UserDetail user) { List tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> { - if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 - logger.error("重复发起申请"); - return null; + + //if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + // logger.error("重复发起申请"); + // return null; + //} + + //2022-11-22 资源重复申请判断更新 + if (index.containsKey("channelId")) { + String today = DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN); + if (tAbilityApplicationService.countUserCameraApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId")), today) > 0) { + logger.error("重复发起申请"); + return null; + } + } else { + if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + logger.error("重复发起申请"); + return null; + } } + TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO(); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); @@ -176,6 +195,11 @@ public class AbilityCenterControllerV2 { tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId()); tAbilityApplicationDTO.setApproveStatus("审核中"); tAbilityApplicationDTO.setDelFlag(0); + if (StringUtils.isNotBlank(index.get("price"))) { + tAbilityApplicationDTO.setApplyPrice(BigDecimal.valueOf(Long.valueOf(index.get("price")))); + } else { + tAbilityApplicationDTO.setApplyPrice(BigDecimal.ZERO); + } // v2 新增字段 tAbilityApplicationDTO.setCameraList(index.get("channelId") == null ? null : JSON.toJSONString(index)); tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle()); diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java index cec16f03..89810e65 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java @@ -1,6 +1,5 @@ package io.renren.common.controller; - import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import io.renren.common.annotation.LogOperation; @@ -8,6 +7,7 @@ import io.renren.common.constant.Constant; import io.renren.common.dto.AuditingBaseDTO; import io.renren.common.page.PageData; import io.renren.common.utils.CodeGenerationUtils; +import io.renren.common.utils.DateUtils; import io.renren.common.utils.Result; import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.group.AddGroup; @@ -45,6 +45,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.CompletableFuture; @@ -218,10 +219,27 @@ public class AbilityCenterControllerV3 { } logger.info("开始申请流程!"); List tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> { - if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 - logger.error("重复发起申请"); - return null; + + //if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + // logger.error("重复发起申请"); + // return null; + //} + + //2022-11-22 资源重复申请判断更新 + if (index.containsKey("channelId")) { + String today = DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN); + if (tAbilityApplicationService.countUserCameraApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId")), today) > 0) { + logger.error("重复发起申请"); + return null; + } + } else { + if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + logger.error("重复发起申请"); + return null; + } } + + TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO(); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); @@ -238,7 +256,11 @@ public class AbilityCenterControllerV3 { tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId()); tAbilityApplicationDTO.setApproveStatus("审核中"); tAbilityApplicationDTO.setDelFlag(0); - // v2 新增字段 + if (StringUtils.isNotBlank(index.get("price"))) { + tAbilityApplicationDTO.setApplyPrice(BigDecimal.valueOf(Long.valueOf(index.get("price")))); + } else { + tAbilityApplicationDTO.setApplyPrice(BigDecimal.ZERO); + } // v2 新增字段 tAbilityApplicationDTO.setCameraList(index.get("channelId") == null ? null : JSON.toJSONString(index)); tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle()); tAbilityApplicationDTO.setApplicationBackground(abilityBatchApplicationDTO.getApplicationBackground()); @@ -332,7 +354,6 @@ public class AbilityCenterControllerV3 { Boolean crossRegion = Boolean.FALSE; // 是否跨区 Boolean cityApplyCity = Boolean.FALSE; // 是否为市区申请市区 - // TODO if (sysUserDTO.getDeptId() != null) { SysDeptDTO applyUserDeptDTO = sysDeptService.get(sysUserDTO.getDeptId()); // 发起人的部门 Integer applyUserDeptType = applyUserDeptDTO.getType(); // 发起人 diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index cdec54b8..f11f0943 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -19,6 +19,7 @@ import io.renren.modules.resourceBrowse.service.ResourceBrowseService; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; import io.renren.modules.sys.dto.SysDeptDTO; +import io.renren.modules.sys.enums.SuperAdminEnum; import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysUserService; import io.swagger.annotations.Api; @@ -75,6 +76,8 @@ public class CensusController { @Value("${census.applyType}") private String[] censusApplyTypes; // 需要进行申请统计的资源类型 + @Value("${big_date.name}") + private String bigDataDeptName; /** * 获取各类资源数目 @@ -119,7 +122,9 @@ public class CensusController { CompletableFuture resourceAmount = CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量 Map map = (Map) resourceService.selectTotal(); List> dbAmount = (List>) map.get("total"); - return dbAmount.stream().mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); + return dbAmount.stream() + .filter(index -> !"知识库".equals(index.get("type").toString())) //2022-11-24 资源总量去除知识库统计 + .mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); }, executor).thenAccept(sum -> result.add(new HashMap() { { put("amount", sum); @@ -479,19 +484,18 @@ public class CensusController { }) public Result selectCensusResourceTable(@RequestParam Map params) { UserDetail user = SecurityUser.getUser(); - if (user.getDeptId() != null) { - SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + //2022-11-21 修改为只有大数据局部门和admin账号能查看所有 + if (SuperAdminEnum.YES.value() != user.getSuperAdmin() && !bigDataDeptName.equals(sysDeptDTO.getName())) { + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 } -// else if (SuperAdminEnum.YES.value() == user.getSuperAdmin()) { // 超级管理员 -// -// } return new Result().ok(resourceService.selectCensusResourceTable(params)); } @GetMapping("/exportSelectCensusResourceTable") - @ApiOperation("查询部门上架资源及审批结果详细信息") - @LogOperation("查询部门上架资源及审批结果详细信息") + @ApiOperation("导出部门上架资源及审批结果详细信息") + @LogOperation("导出部门上架资源及审批结果详细信息") @ApiImplicitParams({ @ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @@ -501,8 +505,10 @@ public class CensusController { }) public void exportSelectCensusResourceTable(@RequestParam Map params, HttpServletResponse response) throws IOException { UserDetail user = SecurityUser.getUser(); - if (user.getDeptId() != null) { - SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + //2022-11-21 修改为只有大数据局部门和admin账号能查看所有 + if (SuperAdminEnum.YES.value() != user.getSuperAdmin() && !bigDataDeptName.equals(sysDeptDTO.getName())) { + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 } ArrayList resultList = (ArrayList) resourceDao.selectCensusResourceTable(params); @@ -555,18 +561,18 @@ public class CensusController { @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "provideDept", value = "提供部门", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), }) public Result selectCensusApplyTable(@RequestParam Map params) { UserDetail user = SecurityUser.getUser(); - if (user.getDeptId() != null) { - SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + //2022-11-21 修改为只有大数据局部门和admin账号能查看所有 + if (SuperAdminEnum.YES.value() != user.getSuperAdmin() && !bigDataDeptName.equals(sysDeptDTO.getName())) { + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 } -// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员 -// -// } return new Result().ok(resourceService.selectCensusApplyTable(params)); } @@ -582,20 +588,19 @@ public class CensusController { }) public void exportSelectCensusApplyTable(@RequestParam Map params, HttpServletResponse response) throws IOException { UserDetail user = SecurityUser.getUser(); - if (user.getDeptId() != null) { - SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + //2022-11-21 修改为只有大数据局部门和admin账号能查看所有 + if (SuperAdminEnum.YES.value() != user.getSuperAdmin() && !bigDataDeptName.equals(sysDeptDTO.getName())) { params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 } -// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员 -// -// } + ArrayList resultList = (ArrayList) resourceDao.selectCensusApplyTable(params); List> date = resultList.stream().map(index -> { List data = new ArrayList<>(); - data.add(index.getOrDefault("resourceDeptName", "") == null ? "" : index.getOrDefault("resourceDeptName", "").toString()); + data.add(index.getOrDefault("deptName", "") == null ? "" : index.getOrDefault("deptName", "").toString()); data.add(index.getOrDefault("resourceName", "") == null ? "" : index.getOrDefault("resourceName", "").toString()); data.add(index.getOrDefault("type", "") == null ? "" : index.getOrDefault("type", "").toString()); - data.add(index.getOrDefault("deptName", "") == null ? "" : index.getOrDefault("deptName", "").toString()); + data.add(index.getOrDefault("resourceDeptName", "") == null ? "" : index.getOrDefault("resourceDeptName", "").toString()); data.add(index.getOrDefault("createDate", "") == null ? "" : index.getOrDefault("createDate", "").toString()); data.add(index.getOrDefault("approveStatus", "") == null ? "" : index.getOrDefault("approveStatus", "").toString()); return data; @@ -613,13 +618,13 @@ public class CensusController { private List> exportSelectCensusApplyTableHead() { List> list = new ArrayList<>(); List head0 = new ArrayList<>(); - head0.add("提供部门"); + head0.add("申请部门"); List head1 = new ArrayList<>(); head1.add("资源名称"); List head2 = new ArrayList<>(); head2.add("类型"); List head3 = new ArrayList<>(); - head3.add("申请部门"); + head3.add("提供部门"); List head4 = new ArrayList<>(); head4.add("日期"); List head5 = new ArrayList<>(); diff --git a/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java index b19829de..67e7542b 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java @@ -236,6 +236,11 @@ public class ResourceMountController { ProcessInstanceDTO index_ = actRunningService.startOfBusinessKey(processStartDTO); logger.info("-------------------2.启动流程成功--------------------------"); logger.info("ProcessInstanceDTO.getBusinessKey:{}", index_.getBusinessKey()); + + //11-18 新增下架流程实例id + dto.setUndercarriageInstanceId(Long.parseLong(index_.getProcessInstanceId())); + resourceService.update(dto); + dtoList.add(index_); }); return dtoList.stream().findAny().orElse(null); diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java index 4f22e87f..07453a75 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; @@ -41,7 +42,7 @@ public class TMeetingroomBookDTO implements Serializable { private Date createDate; @ApiModelProperty(value = "创建者") private Long creator; - @ApiModelProperty(value = "审核状态,审核时传,2-通过,3-不通过") + @ApiModelProperty(value = "审核状态,审核时传,默认0为待审核,2-通过,3-不通过") private Integer state; @ApiModelProperty(value = "审核意见") private String auditViem; @@ -51,4 +52,7 @@ public class TMeetingroomBookDTO implements Serializable { private Date auditTime; private String roomName; + + @ApiModelProperty(value = "申请价格") + private BigDecimal applyPrice; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java index e3dcf8fd..30d1e48c 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; /** @@ -39,5 +40,8 @@ public class TMeetingroomDTO implements Serializable { private Long modifier; @ApiModelProperty(value = "是否删除,0-未删除,1-删除") private Integer delFlag; + @ApiModelProperty(value = "价格") + private BigDecimal price; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java index 74b52e8b..65f706fa 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java @@ -5,6 +5,7 @@ import io.renren.common.entity.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** @@ -47,4 +48,9 @@ public class TMeetingroom extends BaseEntity { private Integer delFlag; private Long modifier; + /** + * 价格 + */ + private BigDecimal price; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java index af09e629..9ae99a62 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java @@ -5,6 +5,7 @@ import io.renren.common.entity.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** @@ -65,4 +66,10 @@ public class TMeetingroomBook extends BaseEntity { * 审核时间 */ private Date auditTime; + + /** + * 申请价格 + */ + private BigDecimal applyPrice; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java index cc017413..4a96feda 100644 --- a/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java @@ -271,12 +271,17 @@ public class SysNoticeServiceImpl extends CrudServiceImpl applicationDTOS = tAbilityApplicationService.list(params); Map> result = applicationDTOS.stream().collect(Collectors.groupingBy(t -> { SysDeptDTO sysDeptDTO = t.getResourceOwnerDept(); @@ -443,4 +454,104 @@ public class TAbilityApplicationController { return new Result(); } + @GetMapping("getApplyDeptList") + @ApiOperation("/获取申请部门列表") + @LogOperation("/获取申请部门列表") + public Result getApplyDeptList() { + return new Result().ok(tAbilityApplicationService.getApplyDeptList()); + } + + @GetMapping("/getApplyCameraList") + @ApiOperation("西海岸-根据用户获取已申请摄像头列表") + @LogOperation("西海岸-根据用户获取已申请摄像头列表") + public Result getApplyCameraList() { + return new Result().ok(tAbilityApplicationService.getApplyCameraList()); + } + + @PostMapping("/delApplyCamera") + @ApiOperation("西海岸-用户删除已申请摄像头") + @LogOperation("西海岸-用户删除已申请摄像头") + public Result delApplyCamera(@RequestBody List ids) { + tAbilityApplicationService.delApplyCamera(ids); + return new Result().ok("删除成功。"); + } + + @GetMapping("/getFundStatement") + @ApiOperation("获取资金报表") + @LogOperation("获取资金报表") + @ApiImplicitParams({@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "provideDept", value = "提供部门", paramType = "query", dataType = "Long"), + @ApiImplicitParam(name = "applyDept", value = "申请部门", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceType", value = "资源类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "applyResult", value = "审核状态", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query", dataType = "INTEGER"), + @ApiImplicitParam(name = "pageSize", value = "页数大小", paramType = "query", dataType = "INTEGER") + }) + public Result getFundStatement (@ApiIgnore @RequestParam Map params) { + return new Result().ok(tAbilityApplicationService.getFundStatement(params)); + } + + @GetMapping("/exportFundStatementTable") + @ApiOperation("导出资金报表") + @LogOperation("导出资金报表") + @ApiImplicitParams({@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "provideDept", value = "提供部门", paramType = "query", dataType = "Long"), + @ApiImplicitParam(name = "applyDept", value = "申请部门", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceType", value = "资源类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "applyResult", value = "审核状态", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String") + }) + public void exportFundStatementTable(@RequestParam Map params, HttpServletResponse response) throws IOException { + + List resultList = (List) tAbilityApplicationService.exportFundStatementTable(params); + BigDecimal decimal = new BigDecimal(tAbilityApplicationDao.getFundStatementSum(params)); + BigDecimal divide = decimal.divide(new BigDecimal("10000")); + divide = divide.setScale(1, RoundingMode.HALF_UP); + List> date = resultList.stream().map(index -> { + List data = new ArrayList<>(); + data.add(index.getOrDefault("resourceName", "") == null ? "" : index.getOrDefault("resourceName", "").toString()); + data.add(index.getOrDefault("resourceType", "") == null ? "" : index.getOrDefault("resourceType", "").toString()); + data.add(index.getOrDefault("applyResult", "") == null ? "" : index.getOrDefault("applyResult", "").toString()); + data.add(index.getOrDefault("provideDept", "") == null ? "" : index.getOrDefault("provideDept", "").toString()); + data.add(index.getOrDefault("applyDept", "") == null ? "" : index.getOrDefault("applyDept", "").toString()); + data.add(index.getOrDefault("applyDate", "") == null ? "" : index.getOrDefault("applyDate", "").toString()); + data.add(index.getOrDefault("applyPrice", "") == null ? "" : index.getOrDefault("applyPrice", "").toString()); + return data; + }).collect(Collectors.toList()); + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + String fileName = URLEncoder.encode("UCS节约资金报表" + DateUtils.format(new Date(), "yyyyMMdd"), "UTF-8"); + response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream()).head(exportSelectCensusApplyTableHead(divide)) + .registerWriteHandler(new CustomCellWriteWeightConfig()) + .registerWriteHandler(new CustomCellWriteHeightConfig()) + .sheet("资金报表").doWrite(date); + } + + + private List> exportSelectCensusApplyTableHead(BigDecimal priceTotal) { + + String total = "累计节省财政资金约" + priceTotal + "万元"; + List> list = new ArrayList<>(); + List head0 = new ArrayList<>(Arrays.asList(total, "资源名称")); + List head1 = new ArrayList<>(Arrays.asList(total, "资源类型")); + List head2 = new ArrayList<>(Arrays.asList(total, "审核状态")); + List head3 = new ArrayList<>(Arrays.asList(total, "提供部门")); + List head4 = new ArrayList<>(Arrays.asList(total, "申请部门")); + List head5 = new ArrayList<>(Arrays.asList(total, "申请时间")); + List head6 = new ArrayList<>(Arrays.asList(total, "参考价格(元)")); + list.add(head0); + list.add(head1); + list.add(head2); + list.add(head3); + list.add(head4); + list.add(head5); + list.add(head6); + return list; + } + + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/WillApplyCameraController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/WillApplyCameraController.java new file mode 100644 index 00000000..d8657ea7 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/WillApplyCameraController.java @@ -0,0 +1,59 @@ +package io.renren.modules.processForm.controller; + +import io.renren.common.annotation.LogOperation; +import io.renren.common.utils.Result; +import io.renren.modules.processForm.dto.WillApplyCameraDTO; +import io.renren.modules.processForm.entity.WillApplyCameraEntity; +import io.renren.modules.processForm.service.WillApplyCameraService; +import io.renren.modules.security.user.SecurityUser; +import io.renren.modules.security.user.UserDetail; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +@RestController +@RequestMapping("/willApplyCamera") +@Api(tags = "西海岸待申请摄像头") +public class WillApplyCameraController { + + @Autowired + private WillApplyCameraService willApplyCameraService; + + @GetMapping("/select") + @LogOperation("/查询") + @ApiOperation("/查询") + public Result select() { + UserDetail user = SecurityUser.getUser(); + return new Result().ok(willApplyCameraService.selectByUserId(user.getId())); + } + + @PostMapping("/batchInsert") + @ApiOperation("/保存") + @LogOperation("/保存") + public Result batchInsert(@RequestBody List willApplyCameraDTOList) { + ArrayList list = new ArrayList<>(); + willApplyCameraDTOList.forEach(index -> { + WillApplyCameraEntity cameraEntity = new WillApplyCameraEntity(); + BeanUtils.copyProperties(index, cameraEntity); + cameraEntity.setUserId(SecurityUser.getUserId()); + cameraEntity.setDelFlag(0); + list.add(cameraEntity); + }); + willApplyCameraService.insertBatch(list); + return new Result().ok("数据保存成功。"); + } + + @PostMapping("/batchDelete") + @ApiOperation("/删除") + @LogOperation("/删除") + public Result batchDelete(@RequestBody List ids) { + willApplyCameraService.deleteBatchIds(ids); + return new Result().ok("数据删除成功。"); + } + +} diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java b/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java index 37f4e35d..1048f710 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java @@ -3,6 +3,7 @@ package io.renren.modules.processForm.dao; import io.renren.common.dao.BaseDao; import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; @@ -47,4 +48,20 @@ public interface TAbilityApplicationDao extends BaseDao getInstanceIdByResId(Long id); + + List getApplyDeptList(); + + List getApplyCameraList(@Param("userId") Long userId, @Param("date") String date); + + Integer delApplyCamera(@Param("ids") List ids); + + Integer countUserCameraApply(@Param("userId") Long userId, @Param("resourceId") Long resourceId, @Param("today") String today); + + List getFundStatement(@Param("params") Map params); + + Long getFundStatementSum(@Param("params") Map params); + + List exportFundStatementTable(@Param("params") Map params); + + Long getFundStatementCount(@Param("params") Map params); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dao/WillApplyCameraDao.java b/renren-admin/src/main/java/io/renren/modules/processForm/dao/WillApplyCameraDao.java new file mode 100644 index 00000000..087bc513 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dao/WillApplyCameraDao.java @@ -0,0 +1,15 @@ +package io.renren.modules.processForm.dao; + +import io.renren.common.dao.BaseDao; +import io.renren.modules.processForm.entity.WillApplyCameraEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface WillApplyCameraDao extends BaseDao { + + List select(@Param("userId") Long userId); +} diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java index 682436e4..6ae34e8f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -93,4 +94,7 @@ public class TAbilityApplicationDTO extends AuditingBaseDTO implements Serializa @ApiModelProperty(value = "过期时间") private Date expireDate; + + @ApiModelProperty(value = "申请价格") + private BigDecimal applyPrice; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/WillApplyCameraDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/WillApplyCameraDTO.java new file mode 100644 index 00000000..9eef2d63 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/WillApplyCameraDTO.java @@ -0,0 +1,62 @@ +package io.renren.modules.processForm.dto; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +@ApiModel(value = "西海岸待申请摄像头") +public class WillApplyCameraDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + private Long id; + + private Long userId; + + private Integer delFlag; + + private String cameraPointTypeName; + + private String channelCode; + + private String channelId; + + private String channelName; + + private Integer checkStatus; + + private String gpsX; + + private String gpsY; + + private String idtCameraChannel; + + private String managementUnitName; + + private String nodeName; + + private String parentId; + + private Integer status; + + /** + * 创建者 + */ + private Long creator; + /** + * 创建时间 + */ + private Date createDate; + /** + * 创建者 + */ + private Long updater; + /** + * 创建时间 + */ + private Date updateDate; + +} diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java index 2868b2ee..8792dc0a 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -136,4 +137,10 @@ public class TAbilityApplicationEntity extends BaseEntity implements Serializabl * 过期时间 */ private Date expireDate; + + /** + * 申请价格 + */ + private BigDecimal applyPrice; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/entity/WillApplyCameraEntity.java b/renren-admin/src/main/java/io/renren/modules/processForm/entity/WillApplyCameraEntity.java new file mode 100644 index 00000000..dcb25402 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/processForm/entity/WillApplyCameraEntity.java @@ -0,0 +1,73 @@ +package io.renren.modules.processForm.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "t_will_apply_camera", autoResultMap = true) +public class WillApplyCameraEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId + private Long id; + + private Long userId; + + private Integer delFlag; + + private String cameraPointTypeName; + + private String channelCode; + + private String channelId; + + private String channelName; + + private Integer checkStatus; + + @TableField("gpsX") + private String gpsX; + + @TableField("gpsY") + private String gpsY; + + private String idtCameraChannel; + + private String managementUnitName; + + private String nodeName; + + private String parentId; + + private Integer status; + + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private Long creator; + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private Date createDate; + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updater; + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateDate; +} diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java index 7eeadb89..1d38c71d 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java @@ -1,6 +1,7 @@ package io.renren.modules.processForm.service; import io.renren.common.service.CrudService; +import io.renren.common.utils.Result; import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.entity.TAbilityApplicationEntity; @@ -51,4 +52,20 @@ public interface TAbilityApplicationService extends CrudService ids); + + Integer countUserCameraApply(Long userId, Long resourceId, String today); + + Object getFundStatement(Map params); + + Object exportFundStatementTable(Map params); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/WillApplyCameraService.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/WillApplyCameraService.java new file mode 100644 index 00000000..fb56fe5d --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/WillApplyCameraService.java @@ -0,0 +1,10 @@ +package io.renren.modules.processForm.service; + +import io.renren.common.service.CrudService; +import io.renren.modules.processForm.dto.WillApplyCameraDTO; +import io.renren.modules.processForm.entity.WillApplyCameraEntity; + +public interface WillApplyCameraService extends CrudService { + + Object selectByUserId(Long id); +} diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/JuApiGateway.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/JuApiGateway.java index 411fb3b4..19264860 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/JuApiGateway.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/JuApiGateway.java @@ -73,7 +73,7 @@ public class JuApiGateway implements ApiGateway { HashSet supportMethod = Sets.newHashSet("POST", "GET"); if (StringUtils.isBlank(apiUrl) || deptId == null || deptId == 0 || StringUtils.isBlank(methods) || !supportMethod.contains(methods)) { - String msg = String.format("注册api参数为空,跳过 apiUrl:%s, deptId:%ld methods:%s, resourceId:%s", apiUrl, deptId, methods, resourceId); + String msg = String.format("注册api参数为空,跳过 apiUrl:%s, deptId:%d methods:%s, resourceId:%s", apiUrl, deptId, methods, resourceId); //重要参数没有当成不需要注册 log.info(msg); diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index e034e2a2..8f67f666 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -1,19 +1,24 @@ package io.renren.modules.processForm.service.impl; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.utils.ConvertUtils; +import io.renren.common.utils.DateUtils; import io.renren.modules.processForm.dao.TAbilityApplicationDao; import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.service.TAbilityApplicationService; +import io.renren.modules.security.user.SecurityUser; +import io.renren.modules.security.user.UserDetail; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.List; -import java.util.Map; +import java.math.BigDecimal; +import java.util.*; import java.util.stream.Collectors; /** @@ -26,6 +31,9 @@ import java.util.stream.Collectors; public class TAbilityApplicationServiceImpl extends CrudServiceImpl implements TAbilityApplicationService { private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationServiceImpl.class); + @Autowired + private TAbilityApplicationDao abilityApplicationDao; + @Override public QueryWrapper getWrapper(Map params) { QueryWrapper wrapper = new QueryWrapper<>(); @@ -131,5 +139,45 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl cameraList = abilityApplicationDao.getApplyCameraList(userDetail.getId(), currentTime); + return cameraList.isEmpty() ? new ArrayList<>() : cameraList; + } + + @Override + public void delApplyCamera(List ids) { + abilityApplicationDao.delApplyCamera(ids); + } + + @Override + public Integer countUserCameraApply(Long userId, Long resourceId, String today) { + return abilityApplicationDao.countUserCameraApply(userId, resourceId, today); + } + + @Override + public Object getFundStatement(Map params) { + Map resultMap = new HashMap<>(); + int pageNum = Integer.parseInt(params.get("pageNum").toString()); + int pageSize = Integer.parseInt(params.get("pageSize").toString()); + params.replace("pageNum", (pageNum - 1) * pageSize); + resultMap.put("list", abilityApplicationDao.getFundStatement(params)); + resultMap.put("totalPrice", abilityApplicationDao.getFundStatementSum(params)); + resultMap.put("total", abilityApplicationDao.getFundStatementCount(params)); + return resultMap; + } + + @Override + public Object exportFundStatementTable(Map params) { + return abilityApplicationDao.exportFundStatementTable(params); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java new file mode 100644 index 00000000..60864b3c --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java @@ -0,0 +1,33 @@ +package io.renren.modules.processForm.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.renren.common.service.impl.CrudServiceImpl; +import io.renren.modules.processForm.dao.WillApplyCameraDao; +import io.renren.modules.processForm.dto.WillApplyCameraDTO; +import io.renren.modules.processForm.entity.WillApplyCameraEntity; +import io.renren.modules.processForm.service.WillApplyCameraService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Map; + +@Service +public class WillApplyCameraServiceImpl extends CrudServiceImpl implements WillApplyCameraService { + + @Autowired + private WillApplyCameraDao willApplyCameraDao; + + @Override + public QueryWrapper getWrapper(Map params) { + return null; + } + + @Override + public Object selectByUserId(Long id) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("user_id", id) + .orderByDesc("create_date"); + return willApplyCameraDao.selectList(wrapper) == null ? new ArrayList<>() : willApplyCameraDao.selectList(wrapper); + } +} diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 836306fe..a7faaf6d 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -82,33 +82,6 @@ public class ResourceController { @Value("${qdyjj.ipAndPort}") private String ipAndPort; - @Value("${zsk.appid}") - private String appId; - - @Value("${zsk.appkey}") - private String appKey; - - @Value("${zsk.url.sign}") - private String sign; - - @Value("${zsk.url.gateway}") - private String gateway; - - @Value("${zsk.methodId}") - private String methodId; - - @Value("${zsk.param.charset}") - private String charset; - - @Value("${zsk.param.origin}") - private String origin; - - @Value("${zsk.param.version}") - private String version; - - @Value("${zsk.catalogIds}") - private String[] catalogIds; - @Value("${resource.path}") private String uploadPath; @@ -939,4 +912,38 @@ public class ResourceController { } } + @PostMapping("/getPolicyCloudService") + @ApiOperation("/获取政务云服务资源") + @LogOperation("/获取政务云服务资源") + public Result>> getPolicyCloudService(@RequestBody Map params) { + int page = 1; + int pageSize = 10; + if (params.containsKey("limit") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("limit").toString())) { + pageSize = Integer.parseInt(params.get("limit").toString()); + } + if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) { + page = Integer.parseInt(params.get("page").toString()); + } + String sql; + String sqlRoot = "SELECT * FROM policy_cloud_service "; + String where = " WHERE 1=1 "; + String limit = String.format(" LIMIT %d,%d", (page - 1) * pageSize, pageSize); + + long count = 0; + + if (params.containsKey("name") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("name").toString())) { + where = where + String.format(" AND service_description LIKE '%s'", "%" + params.get("name").toString() + "%"); + } + if (params.containsKey("type") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("type").toString())) { + where = where + String.format(" AND service_type = '%s'", params.get("type").toString()); + } + + sql = sqlRoot + where + limit; + logger.info("sql:" + sql); + String sqlCount = "SELECT COUNT(*) FROM policy_cloud_service " + where; + count = jdbcTemplate.queryForObject(sqlCount, Long.class); + List> result = jdbcTemplate.queryForList(sql); + return new Result>>().ok(new PageData<>(result, count)); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java index d56c9f5c..4b0b7533 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Optional; @@ -129,6 +130,12 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable { @ApiModelProperty(value = "置顶时间") private Date pinTopTime; + @ApiModelProperty(value = "下架流程实例ID") + private Long undercarriageInstanceId; + + @ApiModelProperty(value = "价格") + private BigDecimal price; + public String getDelFlagTip() { if (this.delFlag != null) { Optional resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag)); diff --git a/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java b/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java index 15bbaf5d..644f258a 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java @@ -8,6 +8,7 @@ import io.renren.common.entity.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -173,4 +174,14 @@ public class ResourceEntity extends BaseEntity { * 申请单号 */ private String applyNumber; + + /** + * 下架流程实例ID + */ + private Long undercarriageInstanceId; + + /** + * 价格 + */ + private BigDecimal price; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index c472dd83..f1631dc0 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -83,6 +83,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import javax.annotation.Resource; @@ -158,6 +159,9 @@ public class ResourceServiceImpl extends CrudServiceImpl delRes = CompletableFuture.runAsync(() -> { + resourceDao.deleteById(id); Map map = new HashMap<>(); map.put("data_resource_id", id); @@ -2638,6 +2643,12 @@ public class ResourceServiceImpl extends CrudServiceImpl delUnderData = CompletableFuture.runAsync(() -> { + Long instanceId = resourceDao.selectById(id).getUndercarriageInstanceId(); + this.delProcinstBySuAd(instanceId, "能力下架", null); + }, executor); + //会客厅 CompletableFuture delRoom = CompletableFuture.runAsync(() -> { meetingroomMapper.deleteById(id); @@ -2657,7 +2668,7 @@ public class ResourceServiceImpl extends CrudServiceImpl all = CompletableFuture.allOf(delRes, delResOthers, delMountData, delAbilityData, delRoom, delFormData); + CompletableFuture all = CompletableFuture.allOf(delRes, delResOthers, delMountData, delUnderData, delAbilityData, delRoom, delFormData); all.join(); } @@ -2716,7 +2727,9 @@ public class ResourceServiceImpl extends CrudServiceImpl requestEntity = new HttpEntity(param, new HttpHeaders()); - return restTemplate.postForEntity("http://15.72.183.88:8760/yzy/main/cloudresource/getResourceBusinessList", requestEntity, String.class).getBody(); + String body; + try { + body = restTemplate.postForEntity("http://15.72.183.88:8760/yzy/main/cloudresource/getResourceBusinessList", requestEntity, String.class).getBody(); + } catch (RestClientException e) { + throw new RuntimeException("云资源数据查询失败!"); + } + return body; } @Override @@ -2752,7 +2771,13 @@ public class ResourceServiceImpl extends CrudServiceImpl requestEntity = new HttpEntity(param, new HttpHeaders()); - return restTemplate.postForEntity("http://15.72.183.88:8760/yzy/main/cloudresource/getVideoBusinessList", requestEntity, String.class).getBody(); + String body; + try { + body = restTemplate.postForEntity("http://15.72.183.88:8760/yzy/main/cloudresource/getVideoBusinessList", requestEntity, String.class).getBody(); + } catch (RestClientException e) { + throw new RuntimeException("云视频查询失败!"); + } + return body; } } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Realm.java b/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Realm.java index 4e1a7d41..88f2405e 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Realm.java +++ b/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Realm.java @@ -13,6 +13,7 @@ import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.util.List; @@ -26,6 +27,9 @@ public class Oauth2Realm extends AuthorizingRealm { @Autowired private ShiroService shiroService; + @Value("${system.allowSimultaneousLogin}") + private int allowSimultaneousLogin; + @Override public boolean supports(AuthenticationToken token) { return token instanceof Oauth2Token; @@ -55,8 +59,15 @@ public class Oauth2Realm extends AuthorizingRealm { //根据accessToken,查询用户信息 SysUserTokenEntity tokenEntity = shiroService.getByToken(accessToken); + + //判断是否允许同时登录,0:不允许,1:允许 + //允许同时在线时不校验过期时间 + if (allowSimultaneousLogin != 1 && tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()) { + throw new IncorrectCredentialsException(MessageUtils.getMessage(ErrorCode.TOKEN_INVALID)); + } + //token失效 - if (tokenEntity == null || tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()) { + if (tokenEntity == null) { throw new IncorrectCredentialsException(MessageUtils.getMessage(ErrorCode.TOKEN_INVALID)); } @@ -66,11 +77,15 @@ public class Oauth2Realm extends AuthorizingRealm { //转换成UserDetail对象 UserDetail userDetail = ConvertUtils.sourceToTarget(userEntity, UserDetail.class); - //账号锁定 + //账号停用 if (userDetail.getStatus() == 0) { throw new LockedAccountException(MessageUtils.getMessage(ErrorCode.ACCOUNT_LOCK)); } + if (userDetail.getStatus() == 2) { + throw new LockedAccountException(MessageUtils.getMessage(500 ,"账号已锁定!")); + } + //获取用户对应的部门数据权限 List deptIdList = shiroService.getDataScopeList(userDetail.getId()); userDetail.setDeptIdList(deptIdList); diff --git a/renren-admin/src/main/java/io/renren/modules/security/service/impl/SysUserTokenServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/security/service/impl/SysUserTokenServiceImpl.java index afc3307b..b30400d4 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/service/impl/SysUserTokenServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/security/service/impl/SysUserTokenServiceImpl.java @@ -12,6 +12,7 @@ import io.renren.modules.security.entity.SysUserTokenEntity; import io.renren.modules.security.oauth2.TokenGenerator; import io.renren.modules.security.service.SysUserTokenService; import io.renren.modules.sys.entity.SysOnlineEntity; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.Date; @@ -21,10 +22,15 @@ import java.util.Map; @Service public class SysUserTokenServiceImpl extends BaseServiceImpl implements SysUserTokenService { + /** * 12小时后过期 */ - private final static int EXPIRE = 3600 * 12; + @Value("${system.tokenExpireTime}") + private int EXPIRE; + + @Value("${system.allowSimultaneousLogin}") + private int allowSimultaneousLogin; @Override public Result createToken(Long userId) { @@ -34,47 +40,38 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl map = new HashMap<>(2); map.put(Constant.TOKEN_HEADER, token); @@ -82,6 +79,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl> list(Integer type) { - List list = sysMenuService.getAllMenuList(type); + public Result> list(Integer type, String name) { + List list = sysMenuService.getAllMenuList(type, name); return new Result>().ok(list); } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java index dfaa4fb5..b104d5fd 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java @@ -196,4 +196,27 @@ public class SysUserController { } } + + + @GetMapping("/getApproverUnconfiguredDepartment") + @ApiOperation("查询未配置部门审核人部门列表") + @LogOperation("查询未配置部门审核人部门列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "当前页码,从1开始", paramType = "query", dataType = "int"), + @ApiImplicitParam(name = "pageSize", value = "每页显示记录数", paramType = "query", dataType = "int") + }) + public Result getApproverUnconfiguredDepartment(@ApiIgnore @RequestParam Map params) { + return new Result().ok(sysUserService.getApproverUnconfiguredDepartment(params)); + } + + @GetMapping("/getApproverUnconfiguredRegion") + @ApiOperation("查询未配置区市审核人区市列表") + @LogOperation("查询未配置区市审核人区市列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "当前页码,从1开始", paramType = "query", dataType = "int"), + @ApiImplicitParam(name = "pageSize", value = "每页显示记录数", paramType = "query", dataType = "int") + }) + public Result getApproverUnconfiguredRegion(@ApiIgnore @RequestParam Map params) { + return new Result().ok(sysUserService.getApproverUnconfiguredRegion(params)); + } } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysMenuDao.java b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysMenuDao.java index e9470d12..4a1467a2 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysMenuDao.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysMenuDao.java @@ -21,7 +21,7 @@ public interface SysMenuDao extends BaseDao { * @param type 菜单类型 * @param language 语言 */ - List getMenuList(@Param("type") Integer type, @Param("language") String language); + List getMenuList(@Param("type") Integer type, @Param("language") String language, @Param("name") String name); /** * 查询用户菜单列表 diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysRoleUserDao.java b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysRoleUserDao.java index 98884ca7..4e7ee94f 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysRoleUserDao.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysRoleUserDao.java @@ -3,6 +3,7 @@ package io.renren.modules.sys.dao; import io.renren.common.dao.BaseDao; import io.renren.modules.sys.entity.SysRoleUserEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -26,7 +27,7 @@ public interface SysRoleUserDao extends BaseDao { * * @param userIds 用户ids */ - void deleteByUserIds(Long[] userIds); + void deleteByUserIds(@Param("userIds") Long[] userIds, @Param("updater") Long updater); /** * 角色ID列表 diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java index d6ce1e18..5d084954 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java @@ -5,6 +5,7 @@ import io.renren.modules.sys.entity.SysUserEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.Collection; import java.util.List; import java.util.Map; @@ -48,4 +49,8 @@ public interface SysUserDao extends BaseDao { SysUserEntity getUserByName(@Param("username") String username); String getDeptNameByUserId(@Param("id") String id); + + List getApproverUnconfiguredDepartment(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize); + + List getApproverUnconfiguredRegion(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dto/SysRoleDTO.java b/renren-admin/src/main/java/io/renren/modules/sys/dto/SysRoleDTO.java index 82e9e91d..ab6a2901 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dto/SysRoleDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dto/SysRoleDTO.java @@ -47,4 +47,13 @@ public class SysRoleDTO implements Serializable { @ApiModelProperty(value = "部门ID列表") private List deptIdList; + @ApiModelProperty(value = "删除标志") + private Integer delFlag; + + @ApiModelProperty(value = "修改时间") + private Date updateDate; + + @ApiModelProperty(value = "修改人") + private Long updater; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/entity/SysRoleUserEntity.java b/renren-admin/src/main/java/io/renren/modules/sys/entity/SysRoleUserEntity.java index 2626bbe7..75a77710 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/entity/SysRoleUserEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/entity/SysRoleUserEntity.java @@ -1,10 +1,15 @@ package io.renren.modules.sys.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.renren.common.entity.BaseEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 角色用户关系 * @@ -25,4 +30,12 @@ public class SysRoleUserEntity extends BaseEntity { */ private Long userId; + private Integer delFlag; + + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateDate; + + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updater; + } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/SysMenuService.java b/renren-admin/src/main/java/io/renren/modules/sys/service/SysMenuService.java index 28c007f4..57a8a328 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/SysMenuService.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/SysMenuService.java @@ -26,7 +26,7 @@ public interface SysMenuService extends BaseService { * * @param type 菜单类型 */ - List getAllMenuList(Integer type); + List getAllMenuList(Integer type, String name); /** * 用户菜单列表 diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java b/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java index 5e0b3357..e155b9fb 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java @@ -62,4 +62,7 @@ public interface SysUserService extends BaseService { int backSysUser(); + Object getApproverUnconfiguredDepartment(Map params); + + Object getApproverUnconfiguredRegion(Map params); } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysMenuServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysMenuServiceImpl.java index a505fa67..f97029c7 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysMenuServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysMenuServiceImpl.java @@ -76,8 +76,8 @@ public class SysMenuServiceImpl extends BaseServiceImpl getAllMenuList(Integer type) { - List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); + public List getAllMenuList(Integer type, String name) { + List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage(), name); List dtoList = ConvertUtils.sourceToTarget(menuList, SysMenuDTO.class); @@ -90,7 +90,7 @@ public class SysMenuServiceImpl extends BaseServiceImpl implements SysRoleUserService { @Override + @Transactional public void saveOrUpdate(Long userId, List roleIdList) { //先删除角色用户关系 deleteByUserIds(new Long[]{userId}); @@ -45,7 +48,9 @@ public class SysRoleUserServiceImpl extends BaseServiceImpl params) { + int pageNum = 1; + int pageSize = 10; + if (params.get("pageNum") != null && StringUtils.isNumber(params.get("pageNum").toString())) { + pageNum = Integer.parseInt(params.get("pageNum").toString()); + } + if (params.get("pageSize") != null && StringUtils.isNumber(params.get("pageSize").toString())) { + pageSize = Integer.parseInt(params.get("pageSize").toString()); + } + ArrayList resultList = new ArrayList<>(); + resultList.addAll(sysUserDao.getApproverUnconfiguredDepartment(pageNum, pageSize)); + return resultList; + } + + @Override + public Object getApproverUnconfiguredRegion(Map params) { + int pageNum = 1; + int pageSize = 10; + if (params.get("pageNum") != null && StringUtils.isNumber(params.get("pageNum").toString())) { + pageNum = Integer.parseInt(params.get("pageNum").toString()); + } + if (params.get("pageSize") != null && StringUtils.isNumber(params.get("pageSize").toString())) { + pageSize = Integer.parseInt(params.get("pageSize").toString()); + } + ArrayList resultList = new ArrayList<>(); + resultList.addAll(sysUserDao.getApproverUnconfiguredRegion(pageNum, pageSize)); + return resultList; + } } diff --git a/renren-admin/src/main/resources/application.yml b/renren-admin/src/main/resources/application.yml index 622f6540..b0b26859 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -125,6 +125,8 @@ system: resumeLogonTime: 2 #允许账号多地同时登录: 0(不允许), 1(允许) allowSimultaneousLogin: 1 + #token过期时间,单位小时 + tokenExpireTime: 12 yawei: enable: true diff --git a/renren-admin/src/main/resources/db/V7.3__add_sys_data.sql b/renren-admin/src/main/resources/db/V7.3__add_sys_data.sql new file mode 100644 index 00000000..bf6ffb18 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.3__add_sys_data.sql @@ -0,0 +1,11 @@ +INSERT INTO `sys_dict_type`(`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357067014803457, ' encryptedRoute', '加密路由', '', 0, 1067246875800000001, '2022-11-15 11:21:24', 1067246875800000001, '2022-11-15 11:21:24', 1); + +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357815098281986, 1592357067014803457, '个人中心', '/personalCenter', '', 0, 1067246875800000001, '2022-11-15 11:24:22', 1067246875800000001, '2022-11-15 11:24:22', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357749759414274, 1592357067014803457, '消息通知', '/mynoticeView', '', 0, 1067246875800000001, '2022-11-15 11:24:07', 1067246875800000001, '2022-11-15 11:24:07', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357668599631874, 1592357067014803457, '融合服务详情', '/integrationServicesDetails', '', 0, 1067246875800000001, '2022-11-15 11:23:47', 1067246875800000001, '2022-11-15 11:23:47', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357561145757698, 1592357067014803457, '融合服务', '/integrationServices', '', 0, 1067246875800000001, '2022-11-15 11:23:22', 1067246875800000001, '2022-11-15 11:23:22', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357495567814658, 1592357067014803457, '能力统计', '/abilityStatistics', '', 0, 1067246875800000001, '2022-11-15 11:23:06', 1067246875800000001, '2022-11-15 11:23:06', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357417113358338, 1592357067014803457, '能力详情', '/details', '', 0, 1067246875800000001, '2022-11-15 11:22:47', 1067246875800000001, '2022-11-15 11:22:47', 1); +INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357337807458305, 1592357067014803457, '能力集市', '/DetailsPageconetent', '', 0, 1067246875800000001, '2022-11-15 11:22:29', 1067246875800000001, '2022-11-15 11:22:29', 1); + + diff --git a/renren-admin/src/main/resources/db/V7.4__create_policy_cloud_service.sql b/renren-admin/src/main/resources/db/V7.4__create_policy_cloud_service.sql new file mode 100644 index 00000000..9f40fe5a --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.4__create_policy_cloud_service.sql @@ -0,0 +1,78 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for policy_cloud_service +-- ---------------------------- +DROP TABLE IF EXISTS `policy_cloud_service`; +CREATE TABLE `policy_cloud_service` ( + `service_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `service_item_tier1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `service_item_tier2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `service_description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `specification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `year` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of policy_cloud_service +-- ---------------------------- +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置1H4G', '1H4G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置1H4G', '1H4G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置2H4G', '2H4G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置2H8G', '2H8G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置2H16G', '2H16G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置4H8G', '4H8G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置4H16G', '4H16G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置4H32G', '4H32G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置8H16G', '8H16G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置8H32G', '8H32G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置8H64G', '8H64G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置16H32G', '16H32G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置16H64G', '16H64G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置32H64G', '32H64G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机', '云主机配置32H128G', '32H128G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机系统盘', '云主机系统盘', '40G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '云主机数据盘', '云主机数据盘', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '非结构化数据对象存储服务', '非结构化数据对象存储服务', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '数据异地容灾服务', '数据异地容灾服务', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '主机服务', '数据本地备份及快速恢复服务', '数据本地备份及快速恢复服务', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('基础服务', '机柜服务', '机柜租赁服务', '机柜租赁服务', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '1200MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '2400MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '6000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MySQL', '云数据库RDS for MySQL', '12000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '1000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '12000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '4000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '6000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库RDS for MSSQL Server', '云数据库RDS for MS SQL Server', '12000MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '数据库', '云数据库数据盘', '云数据库数据盘', '100MB内存', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('PaaS服务', '负载均衡', '负载均衡服务', '负载均衡服务', '实例', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('安全服务', '主机数据库应用安全服务', '等保三级标准服务', '云主机安全服务-等保三级服务', '云主机', '必选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('安全服务', '主机数据库应用安全服务', '数据安全服务', '数据安全服务', '数据库实例', '必选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('安全服务', '主机数据库应用安全服务', '应用安全服务', '应用安全服务', '云主机', '必选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('运营服务', '增值服务', '同城应用容灾服务', '同城应用容灾服务', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据分析服务', '数据分析服务', '数据分析服务数据离线计算', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据分析服务', '数据分析服务', '数据分析服务数据实时计算', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据分析服务', '数据分析服务', '数据分析服务数据同步服务', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据脱敏服务', '数据脱敏服务', '数据脱敏服务隐私数据发现', '套', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '数据脱敏服务', '数据脱敏服务', '数据脱敏服务隐私数据漂泊', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '大数据存储', '非结构化数据存储', '大数据存储服务非结构化数据存储', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('大数据服务', '大数据存储', '结构化数据存储', '大数据存储服务结构化数据存储', '1', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '商用操作系统套餐', 'Windows server 2008 、2012、2016数据中心版等安装、授权激活、维护', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '商用操作系统套餐', 'Redhat 6.6以上不同版本系统安装和维护', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '商用操作系统套餐', 'CentOS 6.5以上不同版本系统安装和维护', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云基础套餐', '双核(1.6Ghz)/3G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口或1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云基础套餐', '双核(1.6Ghz)/3G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口或1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云标准套餐', '双核(2.0Ghz)/5G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口或1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云高级套餐', '四核2.4GHz、8G内存/40G系统盘/100G数据盘;6个USB口、1个VGA接口和1个HDMI接口,音频输入输出接口。支持1920*1200桌面分辨率。含瘦终端、分屏器、软件升级费用,不包含鼠标、键盘等外设费用', '个', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '操作系统和其他中间件', '桌面云数据盘', '以100GB为单位', '100G', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '信息系统二级等级保护测评服务', '按照国家公安部门等级保护制度要求提供物理安全、网络安全、主机安全、数据安全、应用安全等测评服务(二级)。本服务目录价格为省公安厅最低价。', '信息系统', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '信息系统三级等级保护测评服务', '按照国家公安部门等级保护制度要求提供物理安全、网络安全、主机安全、数据安全、应用安全等测评服务(三级)。本服务目录价格为省公安厅最低价。', '信息系统', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '网页防篡改服务', '增强版网页防篡改服务。', '云主机', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '商用密码安全评估', '按照国家《密码安全法》对云平台或云主机做商用密码安全全量评估。最终出具业内标准的商密评估报告。', '系统', '可选', '2022'); +INSERT INTO `policy_cloud_service` VALUES ('附加增值服务', '云安全保障增值服务', '蜜罐服务', '融合网络欺骗和主动防御威胁检测防御系统,通过暗设陷阱,主动诱导攻击,能够动态感知内网攻击行为,及时精准的定位攻击源,并隐匿真实资产,保障业务系统的安全运行。', '套', '可选', '2022'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/renren-admin/src/main/resources/db/V7.5__new_table.sql b/renren-admin/src/main/resources/db/V7.5__new_table.sql new file mode 100644 index 00000000..9d05cda2 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.5__new_table.sql @@ -0,0 +1,31 @@ +-- ---------------------------- +-- Table structure for t_will_apply_camera +-- ---------------------------- +DROP TABLE IF EXISTS `t_will_apply_camera`; +CREATE TABLE `t_will_apply_camera` ( + `id` bigint(0) NOT NULL COMMENT '主键ID', + `user_id` bigint(0) NULL DEFAULT NULL COMMENT '用户', + `del_flag` int(0) NULL DEFAULT NULL COMMENT '删除标志:0正常,1删除,', + `camera_point_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `channel_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `channel_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `channel_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `check_status` int(0) NULL DEFAULT NULL, + `gpsX` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `gpsY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `idt_camera_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `management_unit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `node_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `status` int(0) NULL DEFAULT NULL, + `creator` bigint(0) NULL DEFAULT NULL, + `create_date` datetime(0) NULL DEFAULT NULL, + `updater` bigint(0) NULL DEFAULT NULL, + `update_date` datetime(0) NULL DEFAULT NULL, +PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + + diff --git a/renren-admin/src/main/resources/db/V7.6__resource_add_col.sql b/renren-admin/src/main/resources/db/V7.6__resource_add_col.sql new file mode 100644 index 00000000..9d044101 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.6__resource_add_col.sql @@ -0,0 +1 @@ +ALTER TABLE tb_data_resource ADD COLUMN `undercarriage_instance_id` bigint NULL COMMENT '下架流程实例ID'; \ No newline at end of file diff --git a/renren-admin/src/main/resources/db/V7.7__resource_add_price.sql b/renren-admin/src/main/resources/db/V7.7__resource_add_price.sql new file mode 100644 index 00000000..08b70e42 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.7__resource_add_price.sql @@ -0,0 +1,11 @@ +-- 2022-11-22 资源增加价格字段,申请表增加申请价格 + +ALTER TABLE t_ability_application ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + +ALTER TABLE tb_data_resource ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom_book ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + + diff --git a/renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql b/renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql new file mode 100644 index 00000000..628b0b3c --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql @@ -0,0 +1,5 @@ +ALTER TABLE sys_role_user + ADD COLUMN `del_flag` INT NOT NULL DEFAULT 0 COMMENT '删除标志:0正常,1删除', + ADD COLUMN `updater` BIGINT NULL COMMENT '修改人', + ADD COLUMN `update_date` datetime(0) NULL COMMENT '修改时间'; + diff --git a/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml b/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml index 4548698d..95c7b5b1 100644 --- a/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml +++ b/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml @@ -18,6 +18,7 @@ + @@ -37,6 +38,7 @@ + @@ -57,6 +59,7 @@ , t.audit_viem , t.auditor , t.audit_time + , t.apply_price diff --git a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml index 69a2a35a..3a910ffc 100644 --- a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml +++ b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml @@ -29,7 +29,9 @@ typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> + + @@ -55,12 +57,22 @@ typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> + update t_ability_application set instance_id = #{instanceId} where id = #{id} + + UPDATE t_ability_application taa + SET expire_date = now() + WHERE id IN + + #{item} + + + SELECT instance_id FROM t_ability_application WHERE resource_id = #{id} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/processForm/WillApplyCameraDao.xml b/renren-admin/src/main/resources/mapper/processForm/WillApplyCameraDao.xml new file mode 100644 index 00000000..6b11273c --- /dev/null +++ b/renren-admin/src/main/resources/mapper/processForm/WillApplyCameraDao.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index fe8b2de6..52085787 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -42,6 +42,7 @@ + @@ -91,6 +92,7 @@ + @@ -2016,6 +2018,9 @@ AND tdr.name LIKE CONCAT( '%', #{resourceName}, '%' ) + + AND dept.`name` LIKE CONCAT( '%', #{provideDept}, '%' ) + AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate} @@ -2051,6 +2056,9 @@ AND tmb.dept = #{deptId} + + AND '青岛市大数据发展管理局' LIKE CONCAT( '%', #{provideDept}, '%' ) + AND tm.name LIKE CONCAT( '%', #{resourceName}, '%' ) @@ -2322,6 +2330,7 @@ 1 = 1 AND tdr.del_flag = 0 AND tdr.dept_id = #{deptId} + AND tdr.type = '应用资源' AND tdr.name like CONCAT('%', #{key}, '%') diff --git a/renren-admin/src/main/resources/mapper/sys/AbilityApplicationService.xml b/renren-admin/src/main/resources/mapper/sys/AbilityApplicationService.xml deleted file mode 100644 index a740f630..00000000 --- a/renren-admin/src/main/resources/mapper/sys/AbilityApplicationService.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - update sys_user_token set expire_date = #{expireDate} where user_id = #{userId} - - - - \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml b/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml index bae830e0..d46e66fb 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysMenuDao.xml @@ -14,14 +14,20 @@ @@ -33,6 +39,7 @@ left join sys_role_menu t2 on t1.role_id = t2.role_id left join sys_menu t3 on t2.menu_id = t3.id where t1.user_id = #{userId} + AND t1.del_flag = 0 and t3.type = #{type} @@ -42,7 +49,7 @@ select t2.dept_id from sys_role_user t1, sys_role_data_scope t2 - where t1.user_id = #{value} and t1.role_id = t2.role_id + where t1.user_id = #{value} and t1.role_id = t2.role_id AND t1.del_flag = 0 diff --git a/renren-admin/src/main/resources/mapper/sys/SysRoleUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysRoleUserDao.xml index de36800f..42bea077 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysRoleUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysRoleUserDao.xml @@ -9,6 +9,7 @@ #{roleId} + + + UPDATE sys_role_user SET del_flag = 0, update_date = NOW(), updater = #{updater} + where user_id in + + #{userId} + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml index ebdeb622..6d85b91e 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml @@ -33,7 +33,7 @@ AND EXISTS(SELECT 1 FROM sys_role_user WHERE sys_role_user.user_id = t1.id AND sys_role_user.role_id = - #{role_id}) + #{role_id}) AND sys_role_user.del_flag = 0 @@ -71,6 +71,7 @@ AND t1.role_id = #{roleId} AND t2.dept_id = #{deptId} AND t2.status = 1 + AND t1.del_flag = 0 ORDER BY update_date DESC LIMIT 1 @@ -102,4 +103,73 @@ SELECT name FROM sys_dept LEFT JOIN sys_user ON sys_user.dept_id = sys_dept.id WHERE sys_user.id = #{id} + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserTokenDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserTokenDao.xml index a740f630..29328e61 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserTokenDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserTokenDao.xml @@ -8,7 +8,7 @@