* 'dev' of http://192.168.124.50/wangliwen/share-platform: (22 commits)
  1.新增查询部门及区市未配置审核人员列表接口 2.角色用户关联表新增修改时间,修改人及删除标志字段 3.修改用户数据变更时角色信息修改逻辑,关联数据由物理删除变为逻辑删除 4.调整其他设计用户角色关联表查询sql,增加删除标志条件
  能力使用导出表头调整
  统计删除知识库数据
  统计小数位数保留错误问题
  1.资金报表增加申请状态
  .
  1.资金报表新增按审核状态查询条件 2.能力统计-能力使用统计明细增加按提供部门查询
  。。。
  统计错误修复
  npe
  申请时增加价格字段
  1.资源重复申请判断逻辑修改 2.新增资金报表需求 3.西海岸已申请列表需求
  1.sql文件命名错误修改
  1.西海岸-已申请列表查询 2.token过期时间改为可配置 3.亚伟通知消息bug修复
  西海岸基础设施新需求-待申请列表增删改查接口 已申请查询,删除接口 超级管理员删除能力数据未删除下架流程相关数据bug修复
  金宏版本不支持,想其他办法
  政务云增加 类型 查询
  ...
  政务云服务资源 本地数据接口
  后台管理能力统计-能力使用统计查询申请部门列表接口修改-只查询有申请记录的部门
  ...
This commit is contained in:
huangweixiong 2022-11-25 16:23:32 +08:00
commit efaba0980d
66 changed files with 1667 additions and 164 deletions

View File

@ -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`;

View File

@ -0,0 +1 @@
ALTER TABLE `sys_user` ADD COLUMN `frequency` int NULL DEFAULT 0 COMMENT '登录失败次数';

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -0,0 +1 @@
ALTER TABLE tb_data_resource ADD COLUMN `undercarriage_instance_id` bigint NULL COMMENT '下架流程实例ID';

View File

@ -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 '申请价格';

View File

@ -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 '修改时间';

View File

@ -7,6 +7,7 @@ import io.renren.common.constant.Constant;
import io.renren.common.dto.AuditingBaseDTO; import io.renren.common.dto.AuditingBaseDTO;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.utils.CodeGenerationUtils; import io.renren.common.utils.CodeGenerationUtils;
import io.renren.common.utils.DateUtils;
import io.renren.common.utils.Result; import io.renren.common.utils.Result;
import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@ -148,7 +150,8 @@ public class AbilityCenterControllerV2 {
} }
break; break;
default: { 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()); return new Result().ok(LocalDateTime.now().toString());
@ -156,10 +159,26 @@ public class AbilityCenterControllerV2 {
private void deal(TAbilityBatchApplicationDTO abilityBatchApplicationDTO, Optional<SysDeptDTO> deptDTO, String applyFlag, UserDetail user) { private void deal(TAbilityBatchApplicationDTO abilityBatchApplicationDTO, Optional<SysDeptDTO> deptDTO, String applyFlag, UserDetail user) {
List<TAbilityApplicationDTO> tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> { List<TAbilityApplicationDTO> tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> {
if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
logger.error("重复发起申请"); //if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
return null; // 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 tAbilityApplicationDTO = new TAbilityApplicationDTO();
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
@ -176,6 +195,11 @@ public class AbilityCenterControllerV2 {
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId()); tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
tAbilityApplicationDTO.setApproveStatus("审核中"); tAbilityApplicationDTO.setApproveStatus("审核中");
tAbilityApplicationDTO.setDelFlag(0); tAbilityApplicationDTO.setDelFlag(0);
if (StringUtils.isNotBlank(index.get("price"))) {
tAbilityApplicationDTO.setApplyPrice(BigDecimal.valueOf(Long.valueOf(index.get("price"))));
} else {
tAbilityApplicationDTO.setApplyPrice(BigDecimal.ZERO);
}
// v2 新增字段 // v2 新增字段
tAbilityApplicationDTO.setCameraList(index.get("channelId") == null ? null : JSON.toJSONString(index)); tAbilityApplicationDTO.setCameraList(index.get("channelId") == null ? null : JSON.toJSONString(index));
tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle()); tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle());

View File

@ -1,6 +1,5 @@
package io.renren.common.controller; package io.renren.common.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import io.renren.common.annotation.LogOperation; 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.dto.AuditingBaseDTO;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.utils.CodeGenerationUtils; import io.renren.common.utils.CodeGenerationUtils;
import io.renren.common.utils.DateUtils;
import io.renren.common.utils.Result; import io.renren.common.utils.Result;
import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@ -218,10 +219,27 @@ public class AbilityCenterControllerV3 {
} }
logger.info("开始申请流程!"); logger.info("开始申请流程!");
List<TAbilityApplicationDTO> tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> { List<TAbilityApplicationDTO> tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> {
if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
logger.error("重复发起申请"); //if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
return null; // 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 tAbilityApplicationDTO = new TAbilityApplicationDTO();
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
@ -238,7 +256,11 @@ public class AbilityCenterControllerV3 {
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId()); tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
tAbilityApplicationDTO.setApproveStatus("审核中"); tAbilityApplicationDTO.setApproveStatus("审核中");
tAbilityApplicationDTO.setDelFlag(0); 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.setCameraList(index.get("channelId") == null ? null : JSON.toJSONString(index));
tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle()); tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle());
tAbilityApplicationDTO.setApplicationBackground(abilityBatchApplicationDTO.getApplicationBackground()); tAbilityApplicationDTO.setApplicationBackground(abilityBatchApplicationDTO.getApplicationBackground());
@ -332,7 +354,6 @@ public class AbilityCenterControllerV3 {
Boolean crossRegion = Boolean.FALSE; // 是否跨区 Boolean crossRegion = Boolean.FALSE; // 是否跨区
Boolean cityApplyCity = Boolean.FALSE; // 是否为市区申请市区 Boolean cityApplyCity = Boolean.FALSE; // 是否为市区申请市区
// TODO
if (sysUserDTO.getDeptId() != null) { if (sysUserDTO.getDeptId() != null) {
SysDeptDTO applyUserDeptDTO = sysDeptService.get(sysUserDTO.getDeptId()); // 发起人的部门 SysDeptDTO applyUserDeptDTO = sysDeptService.get(sysUserDTO.getDeptId()); // 发起人的部门
Integer applyUserDeptType = applyUserDeptDTO.getType(); // 发起人 Integer applyUserDeptType = applyUserDeptDTO.getType(); // 发起人

View File

@ -19,6 +19,7 @@ import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.security.user.UserDetail; import io.renren.modules.security.user.UserDetail;
import io.renren.modules.sys.dto.SysDeptDTO; 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.SysDeptService;
import io.renren.modules.sys.service.SysUserService; import io.renren.modules.sys.service.SysUserService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -75,6 +76,8 @@ public class CensusController {
@Value("${census.applyType}") @Value("${census.applyType}")
private String[] censusApplyTypes; // 需要进行申请统计的资源类型 private String[] censusApplyTypes; // 需要进行申请统计的资源类型
@Value("${big_date.name}")
private String bigDataDeptName;
/** /**
* 获取各类资源数目 * 获取各类资源数目
@ -119,7 +122,9 @@ public class CensusController {
CompletableFuture<Void> resourceAmount = CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量 CompletableFuture<Void> resourceAmount = CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量
Map map = (Map) resourceService.selectTotal(); Map map = (Map) resourceService.selectTotal();
List<Map<String, Object>> dbAmount = (List<Map<String, Object>>) map.get("total"); List<Map<String, Object>> dbAmount = (List<Map<String, Object>>) 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<String, Object>() { }, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
@ -479,19 +484,18 @@ public class CensusController {
}) })
public Result selectCensusResourceTable(@RequestParam Map<String, Object> params) { public Result selectCensusResourceTable(@RequestParam Map<String, Object> params) {
UserDetail user = SecurityUser.getUser(); 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()); // 管理员只出本部门区域 params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
} }
// else if (SuperAdminEnum.YES.value() == user.getSuperAdmin()) { // 超级管理员
//
// }
return new Result().ok(resourceService.selectCensusResourceTable(params)); return new Result().ok(resourceService.selectCensusResourceTable(params));
} }
@GetMapping("/exportSelectCensusResourceTable") @GetMapping("/exportSelectCensusResourceTable")
@ApiOperation("查询部门上架资源及审批结果详细信息") @ApiOperation("导出部门上架资源及审批结果详细信息")
@LogOperation("查询部门上架资源及审批结果详细信息") @LogOperation("导出部门上架资源及审批结果详细信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", 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<String, Object> params, HttpServletResponse response) throws IOException { public void exportSelectCensusResourceTable(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException {
UserDetail user = SecurityUser.getUser(); 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()); // 管理员只出本部门区域 params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
} }
ArrayList<Map> resultList = (ArrayList<Map>) resourceDao.selectCensusResourceTable(params); ArrayList<Map> resultList = (ArrayList<Map>) resourceDao.selectCensusResourceTable(params);
@ -555,18 +561,18 @@ public class CensusController {
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), @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 = "resourceName", value = "资源名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
}) })
public Result selectCensusApplyTable(@RequestParam Map<String, Object> params) { public Result selectCensusApplyTable(@RequestParam Map<String, Object> params) {
UserDetail user = SecurityUser.getUser(); 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()); // 管理员只出本部门区域 params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
} }
// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员
//
// }
return new Result().ok(resourceService.selectCensusApplyTable(params)); return new Result().ok(resourceService.selectCensusApplyTable(params));
} }
@ -582,20 +588,19 @@ public class CensusController {
}) })
public void exportSelectCensusApplyTable(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException { public void exportSelectCensusApplyTable(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException {
UserDetail user = SecurityUser.getUser(); 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()); // 管理员只出本部门区域 params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
} }
// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员
//
// }
ArrayList<Map> resultList = (ArrayList<Map>) resourceDao.selectCensusApplyTable(params); ArrayList<Map> resultList = (ArrayList<Map>) resourceDao.selectCensusApplyTable(params);
List<List<Object>> date = resultList.stream().map(index -> { List<List<Object>> date = resultList.stream().map(index -> {
List<Object> data = new ArrayList<>(); List<Object> 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("resourceName", "") == null ? "" : index.getOrDefault("resourceName", "").toString());
data.add(index.getOrDefault("type", "") == null ? "" : index.getOrDefault("type", "").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("createDate", "") == null ? "" : index.getOrDefault("createDate", "").toString());
data.add(index.getOrDefault("approveStatus", "") == null ? "" : index.getOrDefault("approveStatus", "").toString()); data.add(index.getOrDefault("approveStatus", "") == null ? "" : index.getOrDefault("approveStatus", "").toString());
return data; return data;
@ -613,13 +618,13 @@ public class CensusController {
private List<List<String>> exportSelectCensusApplyTableHead() { private List<List<String>> exportSelectCensusApplyTableHead() {
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
List<String> head0 = new ArrayList<>(); List<String> head0 = new ArrayList<>();
head0.add("提供部门"); head0.add("申请部门");
List<String> head1 = new ArrayList<>(); List<String> head1 = new ArrayList<>();
head1.add("资源名称"); head1.add("资源名称");
List<String> head2 = new ArrayList<>(); List<String> head2 = new ArrayList<>();
head2.add("类型"); head2.add("类型");
List<String> head3 = new ArrayList<>(); List<String> head3 = new ArrayList<>();
head3.add("申请部门"); head3.add("提供部门");
List<String> head4 = new ArrayList<>(); List<String> head4 = new ArrayList<>();
head4.add("日期"); head4.add("日期");
List<String> head5 = new ArrayList<>(); List<String> head5 = new ArrayList<>();

View File

@ -236,6 +236,11 @@ public class ResourceMountController {
ProcessInstanceDTO index_ = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO index_ = actRunningService.startOfBusinessKey(processStartDTO);
logger.info("-------------------2.启动流程成功--------------------------"); logger.info("-------------------2.启动流程成功--------------------------");
logger.info("ProcessInstanceDTO.getBusinessKey:{}", index_.getBusinessKey()); logger.info("ProcessInstanceDTO.getBusinessKey:{}", index_.getBusinessKey());
//11-18 新增下架流程实例id
dto.setUndercarriageInstanceId(Long.parseLong(index_.getProcessInstanceId()));
resourceService.update(dto);
dtoList.add(index_); dtoList.add(index_);
}); });
return dtoList.stream().findAny().orElse(null); return dtoList.stream().findAny().orElse(null);

View File

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -41,7 +42,7 @@ public class TMeetingroomBookDTO implements Serializable {
private Date createDate; private Date createDate;
@ApiModelProperty(value = "创建者") @ApiModelProperty(value = "创建者")
private Long creator; private Long creator;
@ApiModelProperty(value = "审核状态,审核时传,2-通过3-不通过") @ApiModelProperty(value = "审核状态,审核时传,默认0为待审核2-通过3-不通过")
private Integer state; private Integer state;
@ApiModelProperty(value = "审核意见") @ApiModelProperty(value = "审核意见")
private String auditViem; private String auditViem;
@ -51,4 +52,7 @@ public class TMeetingroomBookDTO implements Serializable {
private Date auditTime; private Date auditTime;
private String roomName; private String roomName;
@ApiModelProperty(value = "申请价格")
private BigDecimal applyPrice;
} }

View File

@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -39,5 +40,8 @@ public class TMeetingroomDTO implements Serializable {
private Long modifier; private Long modifier;
@ApiModelProperty(value = "是否删除0-未删除1-删除") @ApiModelProperty(value = "是否删除0-未删除1-删除")
private Integer delFlag; private Integer delFlag;
@ApiModelProperty(value = "价格")
private BigDecimal price;
} }

View File

@ -5,6 +5,7 @@ import io.renren.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -47,4 +48,9 @@ public class TMeetingroom extends BaseEntity {
private Integer delFlag; private Integer delFlag;
private Long modifier; private Long modifier;
/**
* 价格
*/
private BigDecimal price;
} }

View File

@ -5,6 +5,7 @@ import io.renren.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -65,4 +66,10 @@ public class TMeetingroomBook extends BaseEntity {
* 审核时间 * 审核时间
*/ */
private Date auditTime; private Date auditTime;
/**
* 申请价格
*/
private BigDecimal applyPrice;
} }

View File

@ -271,12 +271,17 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
exchangeCodes.append(ywMobile + ";"); exchangeCodes.append(ywMobile + ";");
} }
} }
if (userNames.charAt(userNames.length() - 1) == ';') { if (userGuids.length() <= 0 || userNames.length() <= 0) {
userNames.deleteCharAt(userNames.length() - 1); logger.info("未找到亚伟用户guid用户为{}", userNames);
return;
} }
if (userGuids.charAt(userGuids.length() - 1) == ';') { if (userGuids.charAt(userGuids.length() - 1) == ';') {
userGuids.deleteCharAt(userGuids.length() - 1); userGuids.deleteCharAt(userGuids.length() - 1);
} }
if (userNames.charAt(userNames.length() - 1) == ';') {
userNames.deleteCharAt(userNames.length() - 1);
}
if (exchangeCodes.charAt(exchangeCodes.length() - 1) == ';') { if (exchangeCodes.charAt(exchangeCodes.length() - 1) == ';') {
exchangeCodes.deleteCharAt(exchangeCodes.length() - 1); exchangeCodes.deleteCharAt(exchangeCodes.length() - 1);
} }

View File

@ -1,11 +1,13 @@
package io.renren.modules.processForm.controller; package io.renren.modules.processForm.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.annotation.LogOperation; import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant; import io.renren.common.constant.Constant;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.DateUtils;
import io.renren.common.utils.ExcelUtils; import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result; import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils; import io.renren.common.validator.AssertUtils;
@ -23,6 +25,8 @@ import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import io.renren.modules.processForm.excel.TAbilityApplicationExcel; import io.renren.modules.processForm.excel.TAbilityApplicationExcel;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.excel.census.config.CustomCellWriteHeightConfig;
import io.renren.modules.resource.excel.census.config.CustomCellWriteWeightConfig;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.security.user.UserDetail; import io.renren.modules.security.user.UserDetail;
@ -50,6 +54,10 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -213,10 +221,13 @@ public class TAbilityApplicationController {
put("apply_flag", applyFlag); // 限定 put("apply_flag", applyFlag); // 限定
} }
}; };
/* 2022-11-16 去除对用户角色的判断在后台能力统计处都可以看到申请详情
// 非超级管理员只出本人 // 非超级管理员只出本人
if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) { if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) {
params.put("user_id", user == null ? null : user.getId()); params.put("user_id", user == null ? null : user.getId());
} }
*/
List<TAbilityApplicationDTO> applicationDTOS = tAbilityApplicationService.list(params); List<TAbilityApplicationDTO> applicationDTOS = tAbilityApplicationService.list(params);
Map<String, List<TAbilityApplicationDTO>> result = applicationDTOS.stream().collect(Collectors.groupingBy(t -> { Map<String, List<TAbilityApplicationDTO>> result = applicationDTOS.stream().collect(Collectors.groupingBy(t -> {
SysDeptDTO sysDeptDTO = t.getResourceOwnerDept(); SysDeptDTO sysDeptDTO = t.getResourceOwnerDept();
@ -443,4 +454,104 @@ public class TAbilityApplicationController {
return new Result(); 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<Long> 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<String, Object> 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<String, Object> params, HttpServletResponse response) throws IOException {
List<Map> resultList = (List<Map>) 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<List<Object>> date = resultList.stream().map(index -> {
List<Object> 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<List<String>> exportSelectCensusApplyTableHead(BigDecimal priceTotal) {
String total = "累计节省财政资金约" + priceTotal + "万元";
List<List<String>> list = new ArrayList<>();
List<String> head0 = new ArrayList<>(Arrays.asList(total, "资源名称"));
List<String> head1 = new ArrayList<>(Arrays.asList(total, "资源类型"));
List<String> head2 = new ArrayList<>(Arrays.asList(total, "审核状态"));
List<String> head3 = new ArrayList<>(Arrays.asList(total, "提供部门"));
List<String> head4 = new ArrayList<>(Arrays.asList(total, "申请部门"));
List<String> head5 = new ArrayList<>(Arrays.asList(total, "申请时间"));
List<String> 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;
}
} }

View File

@ -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<WillApplyCameraDTO> willApplyCameraDTOList) {
ArrayList<WillApplyCameraEntity> 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<Long> ids) {
willApplyCameraService.deleteBatchIds(ids);
return new Result().ok("数据删除成功。");
}
}

View File

@ -3,6 +3,7 @@ package io.renren.modules.processForm.dao;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -47,4 +48,20 @@ public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntit
Integer getDeptInfrastructureApply(Long deptId); Integer getDeptInfrastructureApply(Long deptId);
List<Long> getInstanceIdByResId(Long id); List<Long> getInstanceIdByResId(Long id);
List<Map> getApplyDeptList();
List<Map> getApplyCameraList(@Param("userId") Long userId, @Param("date") String date);
Integer delApplyCamera(@Param("ids") List<Long> ids);
Integer countUserCameraApply(@Param("userId") Long userId, @Param("resourceId") Long resourceId, @Param("today") String today);
List<Map> getFundStatement(@Param("params") Map<String, Object> params);
Long getFundStatementSum(@Param("params") Map<String, Object> params);
List<Map> exportFundStatementTable(@Param("params") Map<String, Object> params);
Long getFundStatementCount(@Param("params") Map<String, Object> params);
} }

View File

@ -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<WillApplyCameraEntity> {
List<Map> select(@Param("userId") Long userId);
}

View File

@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -93,4 +94,7 @@ public class TAbilityApplicationDTO extends AuditingBaseDTO implements Serializa
@ApiModelProperty(value = "过期时间") @ApiModelProperty(value = "过期时间")
private Date expireDate; private Date expireDate;
@ApiModelProperty(value = "申请价格")
private BigDecimal applyPrice;
} }

View File

@ -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;
}

View File

@ -9,6 +9,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -136,4 +137,10 @@ public class TAbilityApplicationEntity extends BaseEntity implements Serializabl
* 过期时间 * 过期时间
*/ */
private Date expireDate; private Date expireDate;
/**
* 申请价格
*/
private BigDecimal applyPrice;
} }

View File

@ -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;
}

View File

@ -1,6 +1,7 @@
package io.renren.modules.processForm.service; package io.renren.modules.processForm.service;
import io.renren.common.service.CrudService; import io.renren.common.service.CrudService;
import io.renren.common.utils.Result;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
@ -51,4 +52,20 @@ public interface TAbilityApplicationService extends CrudService<TAbilityApplicat
* @return * @return
*/ */
Integer getDeptInfrastructureApply(Long deptId); Integer getDeptInfrastructureApply(Long deptId);
/**
* 获取申请能力部门列表
* @return
*/
Object getApplyDeptList();
Object getApplyCameraList();
void delApplyCamera(List<Long> ids);
Integer countUserCameraApply(Long userId, Long resourceId, String today);
Object getFundStatement(Map<String, Object> params);
Object exportFundStatementTable(Map<String, Object> params);
} }

View File

@ -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<WillApplyCameraEntity, WillApplyCameraDTO> {
Object selectByUserId(Long id);
}

View File

@ -73,7 +73,7 @@ public class JuApiGateway implements ApiGateway {
HashSet supportMethod = Sets.newHashSet("POST", "GET"); HashSet supportMethod = Sets.newHashSet("POST", "GET");
if (StringUtils.isBlank(apiUrl) || deptId == null || deptId == 0 || StringUtils.isBlank(methods) || !supportMethod.contains(methods)) { 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); log.info(msg);

View File

@ -1,19 +1,24 @@
package io.renren.modules.processForm.service.impl; package io.renren.modules.processForm.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.DateUtils;
import io.renren.modules.processForm.dao.TAbilityApplicationDao; import io.renren.modules.processForm.dao.TAbilityApplicationDao;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import io.renren.modules.processForm.service.TAbilityApplicationService; 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.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.math.BigDecimal;
import java.util.Map; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -26,6 +31,9 @@ import java.util.stream.Collectors;
public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityApplicationDao, TAbilityApplicationEntity, TAbilityApplicationDTO> implements TAbilityApplicationService { public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityApplicationDao, TAbilityApplicationEntity, TAbilityApplicationDTO> implements TAbilityApplicationService {
private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationServiceImpl.class);
@Autowired
private TAbilityApplicationDao abilityApplicationDao;
@Override @Override
public QueryWrapper<TAbilityApplicationEntity> getWrapper(Map<String, Object> params) { public QueryWrapper<TAbilityApplicationEntity> getWrapper(Map<String, Object> params) {
QueryWrapper<TAbilityApplicationEntity> wrapper = new QueryWrapper<>(); QueryWrapper<TAbilityApplicationEntity> wrapper = new QueryWrapper<>();
@ -131,5 +139,45 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
return baseDao.getDeptInfrastructureApply(deptId); return baseDao.getDeptInfrastructureApply(deptId);
} }
@Override
public Object getApplyDeptList() {
return abilityApplicationDao.getApplyDeptList();
}
@Override
public Object getApplyCameraList() {
UserDetail userDetail = SecurityUser.getUser();
String currentTime = DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN);
List<Map> cameraList = abilityApplicationDao.getApplyCameraList(userDetail.getId(), currentTime);
return cameraList.isEmpty() ? new ArrayList<>() : cameraList;
}
@Override
public void delApplyCamera(List<Long> 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<String, Object> params) {
Map<String, Object> 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<String, Object> params) {
return abilityApplicationDao.exportFundStatementTable(params);
}
} }

View File

@ -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<WillApplyCameraDao, WillApplyCameraEntity, WillApplyCameraDTO> implements WillApplyCameraService {
@Autowired
private WillApplyCameraDao willApplyCameraDao;
@Override
public QueryWrapper<WillApplyCameraEntity> getWrapper(Map<String, Object> params) {
return null;
}
@Override
public Object selectByUserId(Long id) {
QueryWrapper<WillApplyCameraEntity> wrapper = new QueryWrapper<>();
wrapper.eq("user_id", id)
.orderByDesc("create_date");
return willApplyCameraDao.selectList(wrapper) == null ? new ArrayList<>() : willApplyCameraDao.selectList(wrapper);
}
}

View File

@ -82,33 +82,6 @@ public class ResourceController {
@Value("${qdyjj.ipAndPort}") @Value("${qdyjj.ipAndPort}")
private String 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}") @Value("${resource.path}")
private String uploadPath; private String uploadPath;
@ -939,4 +912,38 @@ public class ResourceController {
} }
} }
@PostMapping("/getPolicyCloudService")
@ApiOperation("/获取政务云服务资源")
@LogOperation("/获取政务云服务资源")
public Result<PageData<Map<String, Object>>> getPolicyCloudService(@RequestBody Map<String, Object> 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<Map<String, Object>> result = jdbcTemplate.queryForList(sql);
return new Result<PageData<Map<String, Object>>>().ok(new PageData<>(result, count));
}
} }

View File

@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@ -129,6 +130,12 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable {
@ApiModelProperty(value = "置顶时间") @ApiModelProperty(value = "置顶时间")
private Date pinTopTime; private Date pinTopTime;
@ApiModelProperty(value = "下架流程实例ID")
private Long undercarriageInstanceId;
@ApiModelProperty(value = "价格")
private BigDecimal price;
public String getDelFlagTip() { public String getDelFlagTip() {
if (this.delFlag != null) { if (this.delFlag != null) {
Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag)); Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag));

View File

@ -8,6 +8,7 @@ import io.renren.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -173,4 +174,14 @@ public class ResourceEntity extends BaseEntity {
* 申请单号 * 申请单号
*/ */
private String applyNumber; private String applyNumber;
/**
* 下架流程实例ID
*/
private Long undercarriageInstanceId;
/**
* 价格
*/
private BigDecimal price;
} }

View File

@ -83,6 +83,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -158,6 +159,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Value("${zsk.catalogIds}") @Value("${zsk.catalogIds}")
private String[] catalogIds; private String[] catalogIds;
@Value("${big_date.name}")
private String bigDataDeptName;
@Autowired @Autowired
private ResourceDao resourceDao; private ResourceDao resourceDao;
@ -2128,10 +2132,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override @Override
public Object selectApplyDeptDetailTypeCountList(Map params) { public Object selectApplyDeptDetailTypeCountList(Map params) {
UserDetail user = SecurityUser.getUser(); UserDetail user = SecurityUser.getUser();
if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
if (user.getSuperAdmin() == SuperAdminEnum.YES.value() || bigDataDeptName.equals(sysDeptDTO.getName())) {
logger.info("管理员区域"); logger.info("管理员区域");
} else if (user.getDeptId() != null) { } else if (user.getDeptId() != null) {
SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict()); logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
} }
@ -2313,10 +2317,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override @Override
public Object selectDeptDetailTypeCountList(Map params) { public Object selectDeptDetailTypeCountList(Map params) {
UserDetail user = SecurityUser.getUser(); UserDetail user = SecurityUser.getUser();
if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
if (user.getSuperAdmin() == SuperAdminEnum.YES.value() || bigDataDeptName.equals(sysDeptDTO.getName())) {
logger.info("管理员区域"); logger.info("管理员区域");
} else if (user.getDeptId() != null) { } else if (user.getDeptId() != null) {
SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict()); logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
} }
@ -2606,6 +2610,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
//resource,attr表 //resource,attr表
CompletableFuture<Void> delRes = CompletableFuture.runAsync(() -> { CompletableFuture<Void> delRes = CompletableFuture.runAsync(() -> {
resourceDao.deleteById(id); resourceDao.deleteById(id);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("data_resource_id", id); map.put("data_resource_id", id);
@ -2638,6 +2643,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
}, executor); }, executor);
//删除下架流程表单相关数据及通知消息数据
CompletableFuture<Void> delUnderData = CompletableFuture.runAsync(() -> {
Long instanceId = resourceDao.selectById(id).getUndercarriageInstanceId();
this.delProcinstBySuAd(instanceId, "能力下架", null);
}, executor);
//会客厅 //会客厅
CompletableFuture<Void> delRoom = CompletableFuture.runAsync(() -> { CompletableFuture<Void> delRoom = CompletableFuture.runAsync(() -> {
meetingroomMapper.deleteById(id); meetingroomMapper.deleteById(id);
@ -2657,7 +2668,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
abilityApplicationDao.deleteByMap(map); abilityApplicationDao.deleteByMap(map);
}, executor); }, executor);
CompletableFuture<Void> all = CompletableFuture.allOf(delRes, delResOthers, delMountData, delAbilityData, delRoom, delFormData); CompletableFuture<Void> all = CompletableFuture.allOf(delRes, delResOthers, delMountData, delUnderData, delAbilityData, delRoom, delFormData);
all.join(); all.join();
} }
@ -2716,7 +2727,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
break; break;
case "能力下架": { case "能力下架": {
resourceDao.updateByDelProcinst(resourceId); if (resourceId != null) {
resourceDao.updateByDelProcinst(resourceId);
}
} }
break; break;
case "需求评论": { case "需求评论": {
@ -2742,7 +2755,13 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
param.add("userAccount", userAccount); param.add("userAccount", userAccount);
param.add("status", status); param.add("status", status);
HttpEntity<String> requestEntity = new HttpEntity(param, new HttpHeaders()); HttpEntity<String> 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 @Override
@ -2752,7 +2771,13 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
param.add("userAccount", userAccount); param.add("userAccount", userAccount);
param.add("status", status); param.add("status", status);
HttpEntity<String> requestEntity = new HttpEntity(param, new HttpHeaders()); HttpEntity<String> 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;
} }
} }

View File

@ -13,6 +13,7 @@ import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
@ -26,6 +27,9 @@ public class Oauth2Realm extends AuthorizingRealm {
@Autowired @Autowired
private ShiroService shiroService; private ShiroService shiroService;
@Value("${system.allowSimultaneousLogin}")
private int allowSimultaneousLogin;
@Override @Override
public boolean supports(AuthenticationToken token) { public boolean supports(AuthenticationToken token) {
return token instanceof Oauth2Token; return token instanceof Oauth2Token;
@ -55,8 +59,15 @@ public class Oauth2Realm extends AuthorizingRealm {
//根据accessToken查询用户信息 //根据accessToken查询用户信息
SysUserTokenEntity tokenEntity = shiroService.getByToken(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失效 //token失效
if (tokenEntity == null || tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()) { if (tokenEntity == null) {
throw new IncorrectCredentialsException(MessageUtils.getMessage(ErrorCode.TOKEN_INVALID)); throw new IncorrectCredentialsException(MessageUtils.getMessage(ErrorCode.TOKEN_INVALID));
} }
@ -66,11 +77,15 @@ public class Oauth2Realm extends AuthorizingRealm {
//转换成UserDetail对象 //转换成UserDetail对象
UserDetail userDetail = ConvertUtils.sourceToTarget(userEntity, UserDetail.class); UserDetail userDetail = ConvertUtils.sourceToTarget(userEntity, UserDetail.class);
//账号锁定 //账号停用
if (userDetail.getStatus() == 0) { if (userDetail.getStatus() == 0) {
throw new LockedAccountException(MessageUtils.getMessage(ErrorCode.ACCOUNT_LOCK)); throw new LockedAccountException(MessageUtils.getMessage(ErrorCode.ACCOUNT_LOCK));
} }
if (userDetail.getStatus() == 2) {
throw new LockedAccountException(MessageUtils.getMessage(500 ,"账号已锁定!"));
}
//获取用户对应的部门数据权限 //获取用户对应的部门数据权限
List<Long> deptIdList = shiroService.getDataScopeList(userDetail.getId()); List<Long> deptIdList = shiroService.getDataScopeList(userDetail.getId());
userDetail.setDeptIdList(deptIdList); userDetail.setDeptIdList(deptIdList);

View File

@ -12,6 +12,7 @@ import io.renren.modules.security.entity.SysUserTokenEntity;
import io.renren.modules.security.oauth2.TokenGenerator; import io.renren.modules.security.oauth2.TokenGenerator;
import io.renren.modules.security.service.SysUserTokenService; import io.renren.modules.security.service.SysUserTokenService;
import io.renren.modules.sys.entity.SysOnlineEntity; import io.renren.modules.sys.entity.SysOnlineEntity;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
@ -21,10 +22,15 @@ import java.util.Map;
@Service @Service
public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, SysUserTokenEntity> implements SysUserTokenService { public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, SysUserTokenEntity> implements SysUserTokenService {
/** /**
* 12小时后过期 * 12小时后过期
*/ */
private final static int EXPIRE = 3600 * 12; @Value("${system.tokenExpireTime}")
private int EXPIRE;
@Value("${system.allowSimultaneousLogin}")
private int allowSimultaneousLogin;
@Override @Override
public Result createToken(Long userId) { public Result createToken(Long userId) {
@ -34,47 +40,38 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, Sy
//当前时间 //当前时间
Date now = new Date(); Date now = new Date();
//过期时间 //过期时间
Date expireTime = new Date(now.getTime() + EXPIRE * 1000); Date expireTime = new Date(now.getTime() + EXPIRE * 3600000);
token = TokenGenerator.generateValue();
SysUserTokenEntity tokenEntity = new SysUserTokenEntity();
tokenEntity.setUserId(userId);
tokenEntity.setToken(token);
tokenEntity.setUpdateDate(now);
tokenEntity.setExpireDate(expireTime);
//保存token
this.insert(tokenEntity);
//支持单账号多地登录
//判断是否生成过token //判断是否生成过token
// SysUserTokenEntity tokenEntity = baseDao.getByUserId(userId); SysUserTokenEntity tokenEntity = baseDao.getByUserId(userId);
// if(tokenEntity == null){ if(tokenEntity == null){
// //生成一个token //生成一个token
// token = TokenGenerator.generateValue(); token = TokenGenerator.generateValue();
//
// tokenEntity = new SysUserTokenEntity(); tokenEntity = new SysUserTokenEntity();
// tokenEntity.setUserId(userId); tokenEntity.setUserId(userId);
// tokenEntity.setToken(token); tokenEntity.setToken(token);
// tokenEntity.setUpdateDate(now); tokenEntity.setUpdateDate(now);
// tokenEntity.setExpireDate(expireTime); tokenEntity.setExpireDate(expireTime);
//
// //保存token //保存token
// this.insert(tokenEntity); this.insert(tokenEntity);
// }else{ }else{
// //判断token是否过期 //判断是否允许同时登录,0不允许1允许
//// if(tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()){ //允许同时在线时返回同一token且不校验过期时间
//// //token过期重新生成token if (allowSimultaneousLogin == 0 && tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()) {
//// token = TokenGenerator.generateValue(); //token过期重新生成token
//// }else { token = TokenGenerator.generateValue();
//// token = tokenEntity.getToken(); tokenEntity.setToken(token);
//// } tokenEntity.setUpdateDate(now);
// token = TokenGenerator.generateValue(); tokenEntity.setExpireDate(expireTime);
// tokenEntity.setToken(token); //更新token
// tokenEntity.setUpdateDate(now); this.updateById(tokenEntity);
// tokenEntity.setExpireDate(expireTime); } else {
// token = tokenEntity.getToken();
// //更新token }
// this.updateById(tokenEntity);
// } }
Map<String, Object> map = new HashMap<>(2); Map<String, Object> map = new HashMap<>(2);
map.put(Constant.TOKEN_HEADER, token); map.put(Constant.TOKEN_HEADER, token);
@ -82,6 +79,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, Sy
return new Result().ok(map); return new Result().ok(map);
} }
@Override @Override
public void logout(Long userId) { public void logout(Long userId) {
Date expireDate = DateUtils.addDateMinutes(new Date(), -1); Date expireDate = DateUtils.addDateMinutes(new Date(), -1);

View File

@ -55,8 +55,8 @@ public class SysMenuController {
@ApiOperation("列表") @ApiOperation("列表")
@ApiImplicitParam(name = "type", value = "菜单类型 0菜单 1按钮 null全部", paramType = "query", dataType = "int") @ApiImplicitParam(name = "type", value = "菜单类型 0菜单 1按钮 null全部", paramType = "query", dataType = "int")
// @RequiresPermissions("sys:menu:list") // @RequiresPermissions("sys:menu:list")
public Result<List<SysMenuDTO>> list(Integer type) { public Result<List<SysMenuDTO>> list(Integer type, String name) {
List<SysMenuDTO> list = sysMenuService.getAllMenuList(type); List<SysMenuDTO> list = sysMenuService.getAllMenuList(type, name);
return new Result<List<SysMenuDTO>>().ok(list); return new Result<List<SysMenuDTO>>().ok(list);
} }

View File

@ -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<String, Object> 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<String, Object> params) {
return new Result().ok(sysUserService.getApproverUnconfiguredRegion(params));
}
} }

View File

@ -21,7 +21,7 @@ public interface SysMenuDao extends BaseDao<SysMenuEntity> {
* @param type 菜单类型 * @param type 菜单类型
* @param language 语言 * @param language 语言
*/ */
List<SysMenuEntity> getMenuList(@Param("type") Integer type, @Param("language") String language); List<SysMenuEntity> getMenuList(@Param("type") Integer type, @Param("language") String language, @Param("name") String name);
/** /**
* 查询用户菜单列表 * 查询用户菜单列表

View File

@ -3,6 +3,7 @@ package io.renren.modules.sys.dao;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.sys.entity.SysRoleUserEntity; import io.renren.modules.sys.entity.SysRoleUserEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -26,7 +27,7 @@ public interface SysRoleUserDao extends BaseDao<SysRoleUserEntity> {
* *
* @param userIds 用户ids * @param userIds 用户ids
*/ */
void deleteByUserIds(Long[] userIds); void deleteByUserIds(@Param("userIds") Long[] userIds, @Param("updater") Long updater);
/** /**
* 角色ID列表 * 角色ID列表

View File

@ -5,6 +5,7 @@ import io.renren.modules.sys.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -48,4 +49,8 @@ public interface SysUserDao extends BaseDao<SysUserEntity> {
SysUserEntity getUserByName(@Param("username") String username); SysUserEntity getUserByName(@Param("username") String username);
String getDeptNameByUserId(@Param("id") String id); String getDeptNameByUserId(@Param("id") String id);
List<Map> getApproverUnconfiguredDepartment(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);
List<Map> getApproverUnconfiguredRegion(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);
} }

View File

@ -47,4 +47,13 @@ public class SysRoleDTO implements Serializable {
@ApiModelProperty(value = "部门ID列表") @ApiModelProperty(value = "部门ID列表")
private List<Long> deptIdList; private List<Long> deptIdList;
@ApiModelProperty(value = "删除标志")
private Integer delFlag;
@ApiModelProperty(value = "修改时间")
private Date updateDate;
@ApiModelProperty(value = "修改人")
private Long updater;
} }

View File

@ -1,10 +1,15 @@
package io.renren.modules.sys.entity; 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 com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.entity.BaseEntity; import io.renren.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* 角色用户关系 * 角色用户关系
* *
@ -25,4 +30,12 @@ public class SysRoleUserEntity extends BaseEntity {
*/ */
private Long userId; private Long userId;
private Integer delFlag;
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
} }

View File

@ -26,7 +26,7 @@ public interface SysMenuService extends BaseService<SysMenuEntity> {
* *
* @param type 菜单类型 * @param type 菜单类型
*/ */
List<SysMenuDTO> getAllMenuList(Integer type); List<SysMenuDTO> getAllMenuList(Integer type, String name);
/** /**
* 用户菜单列表 * 用户菜单列表

View File

@ -62,4 +62,7 @@ public interface SysUserService extends BaseService<SysUserEntity> {
int backSysUser(); int backSysUser();
Object getApproverUnconfiguredDepartment(Map<String, Object> params);
Object getApproverUnconfiguredRegion(Map<String, Object> params);
} }

View File

@ -76,8 +76,8 @@ public class SysMenuServiceImpl extends BaseServiceImpl<SysMenuDao, SysMenuEntit
} }
@Override @Override
public List<SysMenuDTO> getAllMenuList(Integer type) { public List<SysMenuDTO> getAllMenuList(Integer type, String name) {
List<SysMenuEntity> menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); List<SysMenuEntity> menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage(), name);
List<SysMenuDTO> dtoList = ConvertUtils.sourceToTarget(menuList, SysMenuDTO.class); List<SysMenuDTO> dtoList = ConvertUtils.sourceToTarget(menuList, SysMenuDTO.class);
@ -90,7 +90,7 @@ public class SysMenuServiceImpl extends BaseServiceImpl<SysMenuDao, SysMenuEntit
//系统管理员拥有最高权限 //系统管理员拥有最高权限
if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) {
menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage(), null);
} else { } else {
menuList = baseDao.getUserMenuList(user.getId(), type, HttpContextUtils.getLanguage()); menuList = baseDao.getUserMenuList(user.getId(), type, HttpContextUtils.getLanguage());
} }

View File

@ -2,10 +2,12 @@ package io.renren.modules.sys.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import io.renren.common.service.impl.BaseServiceImpl; import io.renren.common.service.impl.BaseServiceImpl;
import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.sys.dao.SysRoleUserDao; import io.renren.modules.sys.dao.SysRoleUserDao;
import io.renren.modules.sys.entity.SysRoleUserEntity; import io.renren.modules.sys.entity.SysRoleUserEntity;
import io.renren.modules.sys.service.SysRoleUserService; import io.renren.modules.sys.service.SysRoleUserService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -18,6 +20,7 @@ import java.util.List;
public class SysRoleUserServiceImpl extends BaseServiceImpl<SysRoleUserDao, SysRoleUserEntity> implements SysRoleUserService { public class SysRoleUserServiceImpl extends BaseServiceImpl<SysRoleUserDao, SysRoleUserEntity> implements SysRoleUserService {
@Override @Override
@Transactional
public void saveOrUpdate(Long userId, List<Long> roleIdList) { public void saveOrUpdate(Long userId, List<Long> roleIdList) {
//先删除角色用户关系 //先删除角色用户关系
deleteByUserIds(new Long[]{userId}); deleteByUserIds(new Long[]{userId});
@ -45,7 +48,9 @@ public class SysRoleUserServiceImpl extends BaseServiceImpl<SysRoleUserDao, SysR
@Override @Override
public void deleteByUserIds(Long[] userIds) { public void deleteByUserIds(Long[] userIds) {
baseDao.deleteByUserIds(userIds);
Long updater = SecurityUser.getUserId();
baseDao.deleteByUserIds(userIds, updater);
} }
@Override @Override

View File

@ -1,5 +1,6 @@
package io.renren.modules.sys.service.impl; package io.renren.modules.sys.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -26,6 +27,8 @@ import io.renren.modules.sys.enums.JhDeptsEnum;
import io.renren.modules.sys.enums.SuperAdminEnum; import io.renren.modules.sys.enums.SuperAdminEnum;
import io.renren.modules.sys.service.*; import io.renren.modules.sys.service.*;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.ObjectUtils;
import org.h2.util.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -37,7 +40,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
/** /**
* 系统用户 * 系统用户
*/ */
@ -520,4 +522,34 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
return result; return result;
} }
} }
@Override
public Object getApproverUnconfiguredDepartment(Map<String, Object> 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<Object> resultList = new ArrayList<>();
resultList.addAll(sysUserDao.getApproverUnconfiguredDepartment(pageNum, pageSize));
return resultList;
}
@Override
public Object getApproverUnconfiguredRegion(Map<String, Object> 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<Object> resultList = new ArrayList<>();
resultList.addAll(sysUserDao.getApproverUnconfiguredRegion(pageNum, pageSize));
return resultList;
}
} }

View File

@ -125,6 +125,8 @@ system:
resumeLogonTime: 2 resumeLogonTime: 2
#允许账号多地同时登录: 0(不允许), 1(允许) #允许账号多地同时登录: 0(不允许), 1(允许)
allowSimultaneousLogin: 1 allowSimultaneousLogin: 1
#token过期时间单位小时
tokenExpireTime: 12
yawei: yawei:
enable: true enable: true

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -0,0 +1 @@
ALTER TABLE tb_data_resource ADD COLUMN `undercarriage_instance_id` bigint NULL COMMENT '下架流程实例ID';

View File

@ -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 '申请价格';

View File

@ -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 '修改时间';

View File

@ -18,6 +18,7 @@
<result column="audit_viem" property="auditViem"/> <result column="audit_viem" property="auditViem"/>
<result column="auditor" property="auditor"/> <result column="auditor" property="auditor"/>
<result column="audit_time" property="auditTime"/> <result column="audit_time" property="auditTime"/>
<result column="apply_price" property="applyPrice"/>
</resultMap> </resultMap>
<resultMap id="dtoMap" type="io.renren.modules.meeting.dto.TMeetingroomBookDTO"> <resultMap id="dtoMap" type="io.renren.modules.meeting.dto.TMeetingroomBookDTO">
@ -37,6 +38,7 @@
<result column="audit_viem" property="auditViem"/> <result column="audit_viem" property="auditViem"/>
<result column="auditor" property="auditor"/> <result column="auditor" property="auditor"/>
<result column="audit_time" property="auditTime"/> <result column="audit_time" property="auditTime"/>
<result column="apply_price" property="applyPrice"/>
</resultMap> </resultMap>
<!-- 表字段 --> <!-- 表字段 -->
@ -57,6 +59,7 @@
, t.audit_viem , t.audit_viem
, t.auditor , t.auditor
, t.audit_time , t.audit_time
, t.apply_price
</sql> </sql>
<select id="selectByRoomAndTime" resultMap="dtoMap"> <select id="selectByRoomAndTime" resultMap="dtoMap">

View File

@ -14,6 +14,7 @@
<result column="modify_time" property="modifyTime"/> <result column="modify_time" property="modifyTime"/>
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
<result column="modifier" property="modifier"/> <result column="modifier" property="modifier"/>
<result column="price" property="price"/>
</resultMap> </resultMap>
<resultMap id="meetingroomDto" type="io.renren.modules.meeting.dto.TMeetingroomDTO"> <resultMap id="meetingroomDto" type="io.renren.modules.meeting.dto.TMeetingroomDTO">
@ -29,6 +30,7 @@
<result column="modify_time" property="modifyTime"/> <result column="modify_time" property="modifyTime"/>
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
<result column="modifier" property="modifier"/> <result column="modifier" property="modifier"/>
<result column="price" property="price"/>
</resultMap> </resultMap>
<!-- 表字段 --> <!-- 表字段 -->
@ -45,6 +47,7 @@
, t.del_flag , t.del_flag
, t.creator , t.creator
, t.modifier , t.modifier
, t.price
</sql> </sql>
<select id="queryCount" resultType="java.lang.Integer"> <select id="queryCount" resultType="java.lang.Integer">

View File

@ -29,7 +29,9 @@
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
<result property="applyNumber" column="apply_number"/> <result property="applyNumber" column="apply_number"/>
<result property="createDate" column="create_date"/> <result property="createDate" column="create_date"/>
<result property="applyPrice" column="apply_price"/>
</resultMap> </resultMap>
<resultMap id="resourceDTO" type="io.renren.modules.processForm.dto.TAbilityApplicationDTO"> <resultMap id="resourceDTO" type="io.renren.modules.processForm.dto.TAbilityApplicationDTO">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="user" column="user"/> <result property="user" column="user"/>
@ -55,12 +57,22 @@
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
<result property="applyNumber" column="apply_number"/> <result property="applyNumber" column="apply_number"/>
<result property="createDate" column="create_date"/> <result property="createDate" column="create_date"/>
<result property="applyPrice" column="apply_price"/>
</resultMap> </resultMap>
<update id="updateInstanceId"> <update id="updateInstanceId">
update t_ability_application set instance_id = #{instanceId} where id = #{id} update t_ability_application set instance_id = #{instanceId} where id = #{id}
</update> </update>
<update id="delApplyCamera">
UPDATE t_ability_application taa
SET expire_date = now()
WHERE id IN
<foreach collection="ids" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</update>
<select id="getByInstanceId" resultMap="tAbilityApplicationMap"> <select id="getByInstanceId" resultMap="tAbilityApplicationMap">
SELECT SELECT
t1.* t1.*
@ -292,4 +304,397 @@
<select id="getInstanceIdByResId" resultType="java.lang.Long"> <select id="getInstanceIdByResId" resultType="java.lang.Long">
SELECT instance_id FROM t_ability_application WHERE resource_id = #{id} SELECT instance_id FROM t_ability_application WHERE resource_id = #{id}
</select> </select>
<select id="getApplyDeptList" resultType="java.util.Map">
SELECT DISTINCT
sd.id,
sd.NAME
FROM
t_ability_application taa,
sys_dept sd,
sys_user su
WHERE 1 = 1
AND taa.user_id = su.id
AND su.dept_id = sd.id
AND taa.del_flag = 0
UNION
SELECT
sd.id,
tmb.dept
FROM
sys_dept sd,
t_meetingroom_book tmb
WHERE
sd.NAME = tmb.dept
</select>
<select id="getApplyCameraList" resultType="java.util.Map">
SELECT id, camera_list AS "cameraInfo", approve_status AS "approveStatus", instance_id AS "instanceId"
FROM t_ability_application taa
WHERE 1 = 1
AND del_flag = 0
AND camera_list IS NOT NULL
AND camera_list != ''
AND approve_status IN ('通过', '审核中')
AND user_id = #{userId}
AND expire_date > #{date}
ORDER BY create_date DESC
</select>
<select id="countUserCameraApply" resultType="java.lang.Integer">
SELECT
COUNT( 1 )
FROM
( SELECT id FROM t_ability_application WHERE user_id = #{userId} AND resource_id = #{resourceId} AND IFNULL( expire_date > #{today}, 1 ) > 0 ) temp
</select>
<select id="getFundStatement" resultType="java.util.Map">
SELECT
taa.id,
tdr.NAME AS "resourceName",
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) AS "resourceType",
sd.NAME AS "provideDept",
taa.unit AS "applyDept",
taa.create_date AS "applyDate",
taa.apply_price AS "applyPrice",
taa.approve_status AS "applyResult"
FROM
t_ability_application taa
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
WHERE
1 = 1
<choose>
<when test="params.applyResult == null or params.applyResult == ''">
AND taa.approve_status IN ( '审核中', '通过' )
</when>
<otherwise>
AND taa.approve_status = #{params.applyResult}
</otherwise>
</choose>
AND taa.del_flag = 0
AND tdr.del_flag = 0
<if test = "params.startDate != null and params.startDate != ''" >
AND taa.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= taa.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND sd.id = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND taa.unit LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tdr.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND ( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) = #{params.resourceType}
</if>
UNION ALL
SELECT
tmb.id,
tm.NAME AS "resourceName",
'会客厅' AS "resourceType",
'青岛市大数据发展管理局' AS "provideDept",
tmb.dept AS "applyDept",
tmb.create_date AS "applyDate",
tmb.apply_price AS "applyPrice",
( CASE tmb.state WHEN 0 THEN '审核中' WHEN 2 THEN '通过' ELSE '审核中' END ) AS "applyResult"
FROM
t_meetingroom_book tmb
LEFT JOIN t_meetingroom tm ON tmb.room_id = tm.id
WHERE
tm.del_flag = 0
<choose>
<when test="params.applyResult == '审核中'">
AND tmb.state = 0
</when>
<when test="params.applyResult == '通过'">
AND tmb.state = 2
</when>
<otherwise>
AND tmb.state IN (0, 2)
</otherwise>
</choose>
<if test = "params.startDate != null and params.startDate != ''" >
AND tmb.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= tmb.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND 1067246875800000066 = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND tmb.dept LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tm.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND '会客厅' = #{params.resourceType}
</if>
ORDER BY applyDate DESC
LIMIT ${params.pageNum}, ${params.pageSize}
</select>
<select id="getFundStatementSum" resultType="java.lang.Long">
SELECT SUM(temp.applyPrice) FROM (
SELECT
taa.apply_price AS "applyPrice"
FROM
t_ability_application taa
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
WHERE
1 = 1
<choose>
<when test="params.applyResult == null or params.applyResult == ''">
AND taa.approve_status IN ( '审核中', '通过' )
</when>
<otherwise>
AND taa.approve_status = #{params.applyResult}
</otherwise>
</choose>
AND taa.del_flag = 0
AND tdr.del_flag = 0
<if test = "params.startDate != null and params.startDate != ''" >
AND taa.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= taa.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND sd.id = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND taa.unit LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tdr.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND ( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) = #{params.resourceType}
</if>
UNION ALL
SELECT
tmb.apply_price AS "applyPrice"
FROM
t_meetingroom_book tmb
LEFT JOIN t_meetingroom tm ON tmb.room_id = tm.id
WHERE
tm.del_flag = 0
<choose>
<when test="params.applyResult == '审核中'">
AND tmb.state = 0
</when>
<when test="params.applyResult == '通过'">
AND tmb.state = 2
</when>
<otherwise>
AND tmb.state IN (0, 2)
</otherwise>
</choose>
<if test = "params.startDate != null and params.startDate != ''" >
AND tmb.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= tmb.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND 1067246875800000066 = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND tmb.dept LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tm.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND '会客厅' = #{params.resourceType}
</if>
) temp
</select>
<select id="exportFundStatementTable" resultType="java.util.Map">
SELECT
taa.id,
tdr.NAME AS "resourceName",
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) AS "resourceType",
sd.NAME AS "provideDept",
taa.unit AS "applyDept",
taa.create_date AS "applyDate",
taa.apply_price AS "applyPrice",
taa.approve_status AS "applyResult"
FROM
t_ability_application taa
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
WHERE
1 = 1
<choose>
<when test="params.applyResult == null or params.applyResult == ''">
AND taa.approve_status IN ( '审核中', '通过' )
</when>
<otherwise>
AND taa.approve_status = #{params.applyResult}
</otherwise>
</choose>
AND taa.del_flag = 0
AND tdr.del_flag = 0
<if test = "params.startDate != null and params.startDate != ''" >
AND taa.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= taa.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND sd.id = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND taa.unit LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tdr.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND ( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) = #{params.resourceType}
</if>
UNION ALL
SELECT
tmb.id,
tm.NAME AS "resourceName",
'会客厅' AS "resourceType",
'青岛市大数据发展管理局' AS "provideDept",
tmb.dept AS "applyDept",
tmb.create_date AS "applyDate",
tmb.apply_price AS "applyPrice",
( CASE tmb.state WHEN 0 THEN '审核中' WHEN 2 THEN '通过' ELSE '审核中' END ) AS "applyResult"
FROM
t_meetingroom_book tmb
LEFT JOIN t_meetingroom tm ON tmb.room_id = tm.id
WHERE
tm.del_flag = 0
<choose>
<when test="params.applyResult == '审核中'">
AND tmb.state = 0
</when>
<when test="params.applyResult == '通过'">
AND tmb.state = 2
</when>
<otherwise>
AND tmb.state IN (0, 2)
</otherwise>
</choose>
<if test = "params.startDate != null and params.startDate != ''" >
AND tmb.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= tmb.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND 1067246875800000066 = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND tmb.dept LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tm.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND '会客厅' = #{params.resourceType}
</if>
ORDER BY applyDate DESC
</select>
<select id="getFundStatementCount" resultType="java.lang.Long">
SELECT COUNT(1) FROM (
SELECT
taa.id
FROM
t_ability_application taa
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
WHERE
1 = 1
<choose>
<when test="params.applyResult == null or params.applyResult == ''">
AND taa.approve_status IN ( '审核中', '通过' )
</when>
<otherwise>
AND taa.approve_status = #{params.applyResult}
</otherwise>
</choose>
AND taa.del_flag = 0
AND tdr.del_flag = 0
<if test = "params.startDate != null and params.startDate != ''" >
AND taa.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= taa.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND sd.id = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND taa.unit LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tdr.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND ( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) = #{params.resourceType}
</if>
UNION ALL
SELECT
tmb.id
FROM
t_meetingroom_book tmb
LEFT JOIN t_meetingroom tm ON tmb.room_id = tm.id
WHERE
tm.del_flag = 0
<choose>
<when test="params.applyResult == '审核中'">
AND tmb.state = 0
</when>
<when test="params.applyResult == '通过'">
AND tmb.state = 2
</when>
<otherwise>
AND tmb.state IN (0, 2)
</otherwise>
</choose>
<if test = "params.startDate != null and params.startDate != ''" >
AND tmb.create_date >= #{params.startDate}
</if>
<if test = "params.endDate != null and params.endDate != ''" >
AND #{params.endDate} >= tmb.create_date
</if>
<if test = "params.provideDept != null and params.provideDept != ''" >
AND 1067246875800000066 = #{params.provideDept}
</if>
<if test = "params.applyDept != null and params.applyDept != ''" >
AND tmb.dept LIKE CONCAT('%', #{params.applyDept} ,'%')
</if>
<if test = "params.resourceName != null and params.resourceName != ''" >
AND tm.NAME LIKE CONCAT('%', #{params.resourceName} ,'%')
</if>
<if test = "params.resourceType != null and params.resourceType != ''" >
AND '会客厅' = #{params.resourceType}
</if>
) temp
</select>
</mapper> </mapper>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.processForm.dao.WillApplyCameraDao">
<resultMap type="io.renren.modules.processForm.entity.WillApplyCameraEntity" id="willApplyCameraEntityMap">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="delFlag" column="del_flag"/>
<result property="cameraPointTypeName" column="camera_point_type_name"/>
<result property="channelCode" column="channel_code"/>
<result property="channelId" column="channel_id"/>
<result property="channelName" column="channel_name"/>
<result property="checkStatus" column="checkstatus"/>
<result property="gpsX" column="gpsX"/>
<result property="gpsY" column="gpsY"/>
<result property="idtCameraChannel" column="idt_camera_channel"/>
<result property="managementUnitName" column="management_unit_name"/>
<result property="nodeName" column="node_name"/>
<result property="parentId" column="parent_id"/>
<result property="status" column="status"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
<resultMap id="willApplyCameraDTO" type="io.renren.modules.processForm.dto.WillApplyCameraDTO">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="delFlag" column="del_flag"/>
<result property="cameraPointTypeName" column="camera_point_type_name"/>
<result property="channelCode" column="channel_code"/>
<result property="channelId" column="channel_id"/>
<result property="channelName" column="channel_name"/>
<result property="checkStatus" column="checkstatus"/>
<result property="gpsX" column="gpsX"/>
<result property="gpsY" column="gpsY"/>
<result property="idtCameraChannel" column="idt_camera_channel"/>
<result property="managementUnitName" column="management_unit_name"/>
<result property="nodeName" column="node_name"/>
<result property="parentId" column="parent_id"/>
<result property="status" column="status"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>

View File

@ -42,6 +42,7 @@
<result property="undercarriageTitle" column="undercarriage_title"/> <result property="undercarriageTitle" column="undercarriage_title"/>
<result property="undercarriageUserPhone" column="undercarriage_phone"/> <result property="undercarriageUserPhone" column="undercarriage_phone"/>
<result property="undercarriageEnclosureName" column="undercarriage_enclosure_name"/> <result property="undercarriageEnclosureName" column="undercarriage_enclosure_name"/>
<result property="price" column="price"/>
</resultMap> </resultMap>
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO"> <resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
@ -91,6 +92,7 @@
<result property="undercarriageTitle" column="undercarriage_title"/> <result property="undercarriageTitle" column="undercarriage_title"/>
<result property="undercarriageUserPhone" column="undercarriage_phone"/> <result property="undercarriageUserPhone" column="undercarriage_phone"/>
<result property="undercarriageEnclosureName" column="undercarriage_enclosure_name"/> <result property="undercarriageEnclosureName" column="undercarriage_enclosure_name"/>
<result property="price" column="price"/>
</resultMap> </resultMap>
<update id="deleteByIds"> <update id="deleteByIds">
@ -2016,6 +2018,9 @@
<if test="resourceName != null and resourceName != ''"> <if test="resourceName != null and resourceName != ''">
AND tdr.name LIKE CONCAT( '%', #{resourceName}, '%' ) AND tdr.name LIKE CONCAT( '%', #{resourceName}, '%' )
</if> </if>
<if test="provideDept != null and provideDept != ''">
AND dept.`name` LIKE CONCAT( '%', #{provideDept}, '%' )
</if>
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''"> <if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate} AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
</if> </if>
@ -2051,6 +2056,9 @@
<if test="deptId != null and deptId != ''"> <if test="deptId != null and deptId != ''">
AND tmb.dept = #{deptId} AND tmb.dept = #{deptId}
</if> </if>
<if test="provideDept != null and provideDept != ''">
AND '青岛市大数据发展管理局' LIKE CONCAT( '%', #{provideDept}, '%' )
</if>
<if test="resourceName != null and resourceName != ''"> <if test="resourceName != null and resourceName != ''">
AND tm.name LIKE CONCAT( '%', #{resourceName}, '%' ) AND tm.name LIKE CONCAT( '%', #{resourceName}, '%' )
</if> </if>
@ -2322,6 +2330,7 @@
1 = 1 1 = 1
AND tdr.del_flag = 0 AND tdr.del_flag = 0
AND tdr.dept_id = #{deptId} AND tdr.dept_id = #{deptId}
AND tdr.type = '应用资源'
<if test="key != null and key != ''"> <if test="key != null and key != ''">
AND tdr.name like CONCAT('%', #{key}, '%') AND tdr.name like CONCAT('%', #{key}, '%')
</if> </if>

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.security.dao.SysUserTokenDao">
<select id="getByToken" resultType="io.renren.modules.security.entity.SysUserTokenEntity">
select * from sys_user_token where token = #{value}
</select>
<select id="getByUserId" resultType="io.renren.modules.security.entity.SysUserTokenEntity">
select * from sys_user_token where user_id = #{value}
</select>
<update id="logout">
update sys_user_token set expire_date = #{expireDate} where user_id = #{userId}
</update>
<select id="getOnlineList" resultType="io.renren.modules.sys.entity.SysOnlineEntity">
select t1.user_id, t1.expire_date, t1.update_date as login_date, t2.username, t2.real_name
from sys_user_token t1, sys_user t2
where t1.user_id = t2.id and expire_date > #{expireDate}
<if test="username != null and username.trim() != ''">
and t2.username like #{username}
</if>
</select>
</mapper>

View File

@ -14,14 +14,20 @@
</select> </select>
<select id="getMenuList" resultType="io.renren.modules.sys.entity.SysMenuEntity"> <select id="getMenuList" resultType="io.renren.modules.sys.entity.SysMenuEntity">
select t1.*, (select lang.field_value from sys_language lang where lang.table_name='sys_menu' and select t1.*, lang.field_value as "name"
lang.field_name='name' from sys_menu t1, sys_language lang
and lang.table_id=t1.id and lang.language=#{language}) as name
from sys_menu t1
<where> <where>
1 = 1
<if test="type != null"> <if test="type != null">
t1.type = #{type} and t1.type = #{type}
</if> </if>
<if test="name != null and name != ''">
and lang.field_value like CONCAT('%', #{name}, '%')
</if>
and lang.table_name = 'sys_menu'
and lang.field_name = 'name'
and lang.table_id = t1.id
and lang.language = #{language}
</where> </where>
order by t1.sort asc order by t1.sort asc
</select> </select>
@ -33,6 +39,7 @@
left join sys_role_menu t2 on t1.role_id = t2.role_id left join sys_role_menu t2 on t1.role_id = t2.role_id
left join sys_menu t3 on t2.menu_id = t3.id left join sys_menu t3 on t2.menu_id = t3.id
where t1.user_id = #{userId} where t1.user_id = #{userId}
AND t1.del_flag = 0
<if test="type != null"> <if test="type != null">
and t3.type = #{type} and t3.type = #{type}
</if> </if>
@ -42,7 +49,7 @@
<select id="getUserPermissionsList" resultType="string"> <select id="getUserPermissionsList" resultType="string">
select t3.permissions from sys_role_user t1 left join sys_role_menu t2 on t1.role_id = t2.role_id select t3.permissions from sys_role_user t1 left join sys_role_menu t2 on t1.role_id = t2.role_id
left join sys_menu t3 on t2.menu_id = t3.id left join sys_menu t3 on t2.menu_id = t3.id
where t1.user_id = #{userId} order by t3.sort asc where t1.user_id = #{userId} AND t1.del_flag = 0 order by t3.sort
</select> </select>
<select id="getPermissionsList" resultType="string"> <select id="getPermissionsList" resultType="string">

View File

@ -9,7 +9,7 @@
<select id="getDataScopeList" resultType="long"> <select id="getDataScopeList" resultType="long">
select t2.dept_id from sys_role_user t1, sys_role_data_scope t2 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
</select> </select>
<delete id="deleteByRoleIds"> <delete id="deleteByRoleIds">

View File

@ -9,6 +9,7 @@
#{roleId} #{roleId}
</foreach> </foreach>
</delete> </delete>
<!--
<delete id="deleteByUserIds"> <delete id="deleteByUserIds">
delete from sys_role_user where user_id in delete from sys_role_user where user_id in
@ -17,12 +18,21 @@
</foreach> </foreach>
</delete> </delete>
-->
<update id="deleteByUserIds">
UPDATE sys_role_user SET del_flag = 0, update_date = NOW(), updater = #{updater}
where user_id in
<foreach item="userId" collection="userIds" open="(" separator="," close=")">
#{userId}
</foreach>
</update>
<select id="getRoleIdList" resultType="long"> <select id="getRoleIdList" resultType="long">
select role_id from sys_role_user where user_id = #{value} select role_id from sys_role_user where user_id = #{value} AND del_flag = 0
</select> </select>
<select id="getUserIdsByRoleId" resultType="java.lang.Long"> <select id="getUserIdsByRoleId" resultType="java.lang.Long">
select user_id from sys_role_user where role_id = #{roleId} select user_id from sys_role_user where role_id = #{roleId} AND del_flag = 0
</select> </select>
</mapper> </mapper>

View File

@ -33,7 +33,7 @@
</if> </if>
<if test="role_id != null"> <if test="role_id != null">
AND EXISTS(SELECT 1 FROM sys_role_user WHERE sys_role_user.user_id = t1.id AND sys_role_user.role_id = 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
</if> </if>
</select> </select>
@ -71,6 +71,7 @@
AND t1.role_id = #{roleId} AND t1.role_id = #{roleId}
AND t2.dept_id = #{deptId} AND t2.dept_id = #{deptId}
AND t2.status = 1 AND t2.status = 1
AND t1.del_flag = 0
ORDER BY ORDER BY
update_date DESC update_date DESC
LIMIT 1 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} SELECT name FROM sys_dept LEFT JOIN sys_user ON sys_user.dept_id = sys_dept.id WHERE sys_user.id = #{id}
</select> </select>
<select id="getApproverUnconfiguredDepartment" resultType="java.util.Map">
SELECT
id,
name,
(CASE type
WHEN 1 THEN
'省'
WHEN 2 THEN
'市'
WHEN 3 THEN
'区'
ELSE
' '
END) AS "type",
sort
FROM
sys_dept sd
WHERE
id NOT IN (
SELECT
sd.id
FROM
sys_user su,
sys_dept sd,
sys_role sr,
sys_role_user sru
WHERE
su.dept_id = sd.id
AND su.id = sru.user_id
AND sru.role_id = sr.id
AND sru.del_flag = 0
AND sr.`name` = '部门审批人'
)
AND sd.type != 4
ORDER BY sd.type, sort
LIMIT ${pageNum}, ${pageSize}
</select>
<select id="getApproverUnconfiguredRegion" resultType="java.util.Map">
SELECT
id,
NAME,
sort
FROM
sys_region srg
WHERE
id NOT IN (
SELECT
srg.id
FROM
sys_user su,
sys_dept sd,
sys_region srg,
sys_role sr,
sys_role_user sru
WHERE
su.dept_id = sd.id
AND su.id = sru.user_id
AND sru.role_id = sr.id
AND sd.district = srg.id
AND sru.del_falg = 0
AND sr.`name` = '区审批人'
)
AND srg.tree_level = 3
AND 9 >= srg.sort
ORDER BY srg.sort
LIMIT ${pageNum}, ${pageSize}
</select>
</mapper> </mapper>

View File

@ -8,7 +8,7 @@
</select> </select>
<select id="getByUserId" resultType="io.renren.modules.security.entity.SysUserTokenEntity"> <select id="getByUserId" resultType="io.renren.modules.security.entity.SysUserTokenEntity">
select * from sys_user_token where user_id = #{value} select * from sys_user_token where user_id = #{value} ORDER BY create_date DESC LIMIT 1
</select> </select>
<update id="logout"> <update id="logout">